kubeadm安装kubernetes(canal)

声明:接博客kubeadm安装kubernetes(flannel)
环境等都是一样,只是换了CNI而已,相关环境请参考kubeadm安装kubernetes(flannel)

1.请查看 canal github
2.canal是flannel以及calico的综合产物,所需的镜像

image: quay.io/calico/node:v1.2.1
image: quay.io/calico/cni:v1.8.3
image: quay.io/coreos/flannel:v0.7.1

请执行

kubectl apply -f https://raw.githubusercontent.com/projectcalico/canal/master/k8s-install/1.6/rbac.yaml

kubectl apply -f https://raw.githubusercontent.com/projectcalico/canal/master/k8s-install/1.6/canal.yaml
[root@master kubernetes]# kubectl apply -f https://raw.githubusercontent.com/projectcalico/canal/master/k8s-install/1.6/rbac.yaml
clusterrole "canal" created
clusterrole "flannel" created
clusterrolebinding "flannel" created
clusterrolebinding "canal" created
[root@master kubernetes]# kubectl get nodes
NAME      STATUS    AGE       VERSION
master    Ready     5h        v1.6.6
slave     Ready     4h        v1.6.6
slave1    Ready     4h        v1.6.6

[root@master kubernetes]# kubectl apply -f https://raw.githubusercontent.com/projectcalico/canal/master/k8s-install/1.6/canal.yaml
configmap "canal-config" created
daemonset "canal" created
serviceaccount "canal" created
[root@master kubernetes]# kubectl get pods -n kube-system
NAME                             READY     STATUS    RESTARTS   AGE
canal-426md                      3/3       Running   0          13s
canal-srhh7                      3/3       Running   0          13s
etcd-master                      1/1       Running   0          5h
kube-apiserver-master            1/1       Running   0          5h
kube-controller-manager-master   1/1       Running   0          5h
kube-dns-692378583-1h70j         3/3       Running   3          5h
kube-proxy-2gzvq                 1/1       Running   0          4h
kube-proxy-31lrc                 1/1       Running   0          4h
kube-proxy-3rk7z                 1/1       Running   0          5h
kube-scheduler-master            1/1       Running   0          5h
[root@master kubernetes]# kubectl create -f dashboard.yaml 
serviceaccount "kubernetes-dashboard" created
clusterrolebinding "kubernetes-dashboard" created
deployment "kubernetes-dashboard" created
service "kubernetes-dashboard" created

[root@master kubernetes]# kubectl get pods -n kube-system
NAME                                    READY     STATUS    RESTARTS   AGE
canal-426md                             3/3       Running   0          3m
canal-srhh7                             3/3       Running   0          3m
etcd-master                             1/1       Running   0          5h
kube-apiserver-master                   1/1       Running   0          5h
kube-controller-manager-master          1/1       Running   0          5h
kube-dns-692378583-1h70j                3/3       Running   3          5h
kube-proxy-2gzvq                        1/1       Running   0          4h
kube-proxy-31lrc                        1/1       Running   0          4h
kube-proxy-3rk7z                        1/1       Running   0          5h
kube-scheduler-master                   1/1       Running   0          5h
kubernetes-dashboard-2039414953-d6rjq   1/1       Running   0          59s

kubeadm安装kubernetes(canal)_第1张图片

你可能感兴趣的:(kubetnetes)