我的笔记本是mac m2,使用的是VMware Fusion,虚拟机使用的是CentIOS 7 Arm64
因此未使用kubectl apply -f kubeblog/docs/Chapter4/flannel.yaml
,使用的是kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
,输出如下:
namespace/kube-flannel created
clusterrole.rbac.authorization.k8s.io/flannel created
clusterrolebinding.rbac.authorization.k8s.io/flannel created
serviceaccount/flannel created
configmap/kube-flannel-cfg created
daemonset.apps/kube-flannel-ds created
使用docker images
查看镜像,如下:
REPOSITORY TAG IMAGE ID CREATED SIZE
flannel/flannel-cni-plugin v1.1.2 b45062ceea49 6 months ago 7.76MB
registry.aliyuncs.com/google_containers/kube-proxy v1.19.3 9fdc62aa33d0 2 years ago 116MB
registry.aliyuncs.com/google_containers/kube-apiserver v1.19.3 0e7c54b13941 2 years ago 110MB
registry.aliyuncs.com/google_containers/kube-controller-manager v1.19.3 ef1814513b01 2 years ago 103MB
registry.aliyuncs.com/google_containers/kube-scheduler v1.19.3 8b97cd6f6089 2 years ago 42.6MB
registry.aliyuncs.com/google_containers/etcd 3.4.13-0 05b738aa1bc6 2 years ago 312MB
registry.aliyuncs.com/google_containers/coredns 1.7.0 db91994f4ee8 3 years ago 42.8MB
registry.aliyuncs.com/google_containers/pause 3.2 2a060e2e7101 3 years ago 484kB
使用ifconfig | grep flan
输出如下:
flannel.1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1450
使用kubectl get node
输出如下:
NAME STATUS ROLES AGE VERSION
master Ready master 40m v1.19.3
使用kubectl get pod -n kube-system
输出如下:
NAME READY STATUS RESTARTS AGE
coredns-6d56c8448f-49dcc 1/1 Running 0 31m
coredns-6d56c8448f-qvqx4 1/1 Running 0 31m
etcd-master 1/1 Running 0 31m
kube-apiserver-master 1/1 Running 0 31m
kube-controller-manager-master 1/1 Running 0 31m
kube-proxy-gkd72 1/1 Running 0 31m
kube-scheduler-master 1/1 Running 0 31m
未看到kube-flannel-ds-XXXXX
这个pod,请问是什么原因?是不是代表flannel网络插件安装失败?
注:
使用docker ps -a | grep Exited
输出如下:
cfa54d293942 flannel/flannel "cp -f /etc/kube-fla…" 13 minutes ago Exited (0) 13 minutes ago k8s_install-cni_kube-flannel-ds-pjt79_kube-flannel_1d40447d-9dcc-46d2-916c-8787984476cb_0
dca0e0e2e02a flannel/flannel-cni-plugin "cp -f /flannel /opt…" 14 minutes ago Exited (0) 14 minutes ago k8s_install-cni-plugin_kube-flannel-ds-pjt79_kube-flannel_1d40447d-9dcc-46d2-916c-8787984476cb_0