kubeadm安装kubernetes(calico)

来源:互联网 发布:美国历年财政支出数据 编辑:程序博客网 时间:2024/05/16 12:54

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


1.calico官网描述
自行下载 calico.yaml文件

[root@master kubernetes]# kubectl get pods -n kube-systemNAME                             READY     STATUS    RESTARTS   AGEetcd-master                      1/1       Running   0          2hkube-apiserver-master            1/1       Running   0          2hkube-controller-manager-master   1/1       Running   0          2hkube-dns-692378583-1h70j         3/3       Running   3          2hkube-proxy-2gzvq                 1/1       Running   0          1hkube-proxy-31lrc                 1/1       Running   0          1hkube-proxy-3rk7z                 1/1       Running   0          2hkube-scheduler-master            1/1       Running   0          2h
[root@slave ~]# docker images REPOSITORY                                  TAG                 IMAGE ID            CREATED             SIZEquay.io/calico/node                         v1.3.0              1948433a7679        5 days ago          256.1 MBgcr.io/google_containers/kube-proxy-amd64   v1.6.6              b01133efa4f0        7 days ago          109 MBquay.io/calico/cni                          v1.9.1              2902c3f3337e        11 days ago         70.82 MBquay.io/calico/kube-policy-controller       v0.6.0              b0d769544ab9        6 weeks ago         22.73 MBgcr.io/google_containers/pause-amd64        3.0                 99e59f495ffa        13 months ago       746.9 kBgcr.io/google_containers/etcd               2.2.1               ef5842ca5c42        20 months ago       28.19 MB
[root@master kubernetes]# kubectl apply -f http://docs.projectcalico.org/v2.3/getting-started/kubernetes/installation/hosted/kubeadm/1.6/calico.yamlconfigmap "calico-config" createddaemonset "calico-etcd" createdservice "calico-etcd" createddaemonset "calico-node" createddeployment "calico-policy-controller" createdclusterrolebinding "calico-cni-plugin" createdclusterrole "calico-cni-plugin" createdserviceaccount "calico-cni-plugin" createdclusterrolebinding "calico-policy-controller" createdclusterrole "calico-policy-controller" createdserviceaccount "calico-policy-controller" created
[root@master kubernetes]# kubectl get nodesNAME      STATUS    AGE       VERSIONmaster    Ready     2h        v1.6.6slave     Ready     1h        v1.6.6slave1    Ready     1h        v1.6.6[root@master kubernetes]# kubectl get pods -n kube-systemNAME                                        READY     STATUS    RESTARTS   AGEcalico-etcd-shwp0                           1/1       Running   0          1mcalico-node-3kgzq                           2/2       Running   0          57scalico-node-hdqr2                           2/2       Running   0          57scalico-policy-controller-1324707180-wkr0m   1/1       Running   0          57setcd-master                                 1/1       Running   0          2hkube-apiserver-master                       1/1       Running   0          2hkube-controller-manager-master              1/1       Running   0          2hkube-dns-692378583-1h70j                    3/3       Running   3          2hkube-proxy-2gzvq                            1/1       Running   0          1hkube-proxy-31lrc                            1/1       Running   0          1hkube-proxy-3rk7z                            1/1       Running   0          2hkube-scheduler-master                       1/1       Running   0          2h
[root@master kubernetes]# kubectl create -f dashboard.yaml serviceaccount "kubernetes-dashboard" createdclusterrolebinding "kubernetes-dashboard" createddeployment "kubernetes-dashboard" createdservice "kubernetes-dashboard" created
[root@master kubernetes]# kubectl get pods -n kube-systemNAME                                        READY     STATUS    RESTARTS   AGEcalico-etcd-shwp0                           1/1       Running   0          4mcalico-node-3kgzq                           2/2       Running   0          4mcalico-node-hdqr2                           2/2       Running   0          4mcalico-policy-controller-1324707180-wkr0m   1/1       Running   0          4metcd-master                                 1/1       Running   0          2hkube-apiserver-master                       1/1       Running   0          2hkube-controller-manager-master              1/1       Running   0          2hkube-dns-692378583-1h70j                    3/3       Running   3          2hkube-proxy-2gzvq                            1/1       Running   0          1hkube-proxy-31lrc                            1/1       Running   0          1hkube-proxy-3rk7z                            1/1       Running   0          2hkube-scheduler-master                       1/1       Running   0          2hkubernetes-dashboard-2039414953-8lsvq       1/1       Running   0          2m

dashboard
end