记录k8s:k8s1.8.4无坑离线安装

安装部署:

  1. 使用vagrant 准备3太虚拟机,自己使用Vbox 准备3太也可以。

  2. 按照 https://github.com/gjmzj/kubeasz 安装。

  3. 使用letsencrypt + harbor + nginx 搭建dockerhub. (正在进行)

准备好环境后的安装过程:

root@k8s1:/etc/ansible# ansible-playbook 01.prepare.yml 

PLAY [deploy] ************************************************************************************

TASK [ca : prepare some dirs] ********************************************************************
changed: [192.168.3.11] => (item=/root/local/bin)
changed: [192.168.3.11] => (item=/etc/kubernetes/ssl)
changed: [192.168.3.11] => (item=/etc/ansible/roles/prepare/files/)

TASK [ca : 下载证书工具 CFSSL] *************************************************************************
changed: [192.168.3.11] => (item=cfssl)
changed: [192.168.3.11] => (item=cfssl-certinfo)
changed: [192.168.3.11] => (item=cfssljson)

TASK [ca : 准备CA配置文件] *****************************************************************************
changed: [192.168.3.11]

TASK [ca : 准备CA签名请求] *****************************************************************************
changed: [192.168.3.11]

TASK [ca : 生成 CA 证书和私钥] **************************************************************************
changed: [192.168.3.11]

TASK [ca : 准备分发 CA证书] ****************************************************************************
changed: [192.168.3.11]

PLAY [kube-cluster,deploy,etcd] ******************************************************************

TASK [prepare : prepare some dirs] ***************************************************************
ok: [192.168.3.11] => (item=/root/local/bin)
ok: [192.168.3.11] => (item=/etc/kubernetes/ssl)
changed: [192.168.3.11] => (item=/root/.kube)
changed: [192.168.3.11] => (item=/etc/docker)
changed: [192.168.3.12] => (item=/root/local/bin)
changed: [192.168.3.13] => (item=/root/local/bin)
changed: [192.168.3.12] => (item=/etc/kubernetes/ssl)
changed: [192.168.3.13] => (item=/etc/kubernetes/ssl)
changed: [192.168.3.12] => (item=/root/.kube)
changed: [192.168.3.13] => (item=/root/.kube)
changed: [192.168.3.13] => (item=/etc/docker)
changed: [192.168.3.12] => (item=/etc/docker)

TASK [prepare : 写入环境变量$PATH] *********************************************************************
changed: [192.168.3.11]
changed: [192.168.3.12]
changed: [192.168.3.13]

TASK [prepare : 下载证书工具 CFSSL] ********************************************************************
ok: [192.168.3.11] => (item=cfssl)
ok: [192.168.3.11] => (item=cfssl-certinfo)
ok: [192.168.3.11] => (item=cfssljson)
changed: [192.168.3.12] => (item=cfssl)
changed: [192.168.3.13] => (item=cfssl)
changed: [192.168.3.12] => (item=cfssl-certinfo)
changed: [192.168.3.13] => (item=cfssl-certinfo)
changed: [192.168.3.12] => (item=cfssljson)
changed: [192.168.3.13] => (item=cfssljson)

TASK [prepare : 分发CA 证书] *************************************************************************
changed: [192.168.3.12] => (item=ca.pem)
changed: [192.168.3.13] => (item=ca.pem)
ok: [192.168.3.11] => (item=ca.pem)
changed: [192.168.3.12] => (item=ca-key.pem)
changed: [192.168.3.13] => (item=ca-key.pem)
changed: [192.168.3.11] => (item=ca-key.pem)
changed: [192.168.3.12] => (item=ca.csr)
changed: [192.168.3.13] => (item=ca.csr)
ok: [192.168.3.11] => (item=ca.csr)
ok: [192.168.3.11] => (item=ca-config.json)
changed: [192.168.3.12] => (item=ca-config.json)
changed: [192.168.3.13] => (item=ca-config.json)
 [WARNING]: Could not match supplied host pattern, ignoring: lb


PLAY [lb] ****************************************************************************************
skipping: no hosts matched

PLAY RECAP ***************************************************************************************
192.168.3.11               : ok=10   changed=9    unreachable=0    failed=0   
192.168.3.12               : ok=4    changed=4    unreachable=0    failed=0   
192.168.3.13               : ok=4    changed=4    unreachable=0    failed=0   

root@k8s1:/etc/ansible# ansible-playbook 02.etcd.yml 

PLAY [etcd] **************************************************************************************

TASK [etcd : 下载etcd二进制文件] ************************************************************************
changed: [192.168.3.12] => (item=etcd)
changed: [192.168.3.13] => (item=etcd)
changed: [192.168.3.11] => (item=etcd)
changed: [192.168.3.11] => (item=etcdctl)
changed: [192.168.3.13] => (item=etcdctl)
changed: [192.168.3.12] => (item=etcdctl)

TASK [etcd : 创建etcd证书目录] *************************************************************************
changed: [192.168.3.11]
changed: [192.168.3.12]
changed: [192.168.3.13]

TASK [etcd : 创建etcd证书请求] *************************************************************************
changed: [192.168.3.12]
changed: [192.168.3.11]
changed: [192.168.3.13]

TASK [etcd : 创建 etcd证书和私钥] ***********************************************************************
changed: [192.168.3.13]
changed: [192.168.3.12]
changed: [192.168.3.11]

TASK [etcd : 创建etcd工作目录] *************************************************************************
changed: [192.168.3.11]
changed: [192.168.3.12]
changed: [192.168.3.13]

TASK [etcd : 创建etcd的systemd unit文件] **************************************************************
changed: [192.168.3.11]
changed: [192.168.3.12]
changed: [192.168.3.13]

TASK [etcd : 开启etcd服务] ***************************************************************************
changed: [192.168.3.12]
changed: [192.168.3.13]
changed: [192.168.3.11]

PLAY RECAP ***************************************************************************************
192.168.3.11               : ok=7    changed=7    unreachable=0    failed=0   
192.168.3.12               : ok=7    changed=7    unreachable=0    failed=0   
192.168.3.13               : ok=7    changed=7    unreachable=0    failed=0   

root@k8s1:/etc/ansible# ansible-playbook 03.kubectl.yml 

PLAY [kube-cluster,deploy] ***********************************************************************

TASK [kubectl : 下载kubectl二进制] ********************************************************************
changed: [192.168.3.11]
changed: [192.168.3.13]
changed: [192.168.3.12]

TASK [kubectl : 准备kubectl使用的admin 证书签名请求] ********************************************************
changed: [192.168.3.12]
changed: [192.168.3.11]
changed: [192.168.3.13]

TASK [kubectl : 创建 admin证书与私钥] *******************************************************************
changed: [192.168.3.12]
changed: [192.168.3.11]
changed: [192.168.3.13]

TASK [kubectl : 设置集群参数] **************************************************************************
changed: [192.168.3.12]
changed: [192.168.3.11]
changed: [192.168.3.13]

TASK [kubectl : 设置客户端认证参数] ***********************************************************************
changed: [192.168.3.11]
changed: [192.168.3.13]
changed: [192.168.3.12]

TASK [kubectl : 设置上下文参数] *************************************************************************
changed: [192.168.3.12]
changed: [192.168.3.11]
changed: [192.168.3.13]

TASK [kubectl : 选择默认上下文] *************************************************************************
changed: [192.168.3.11]
changed: [192.168.3.12]
changed: [192.168.3.13]

PLAY RECAP ***************************************************************************************
192.168.3.11               : ok=7    changed=7    unreachable=0    failed=0   
192.168.3.12               : ok=7    changed=7    unreachable=0    failed=0   
192.168.3.13               : ok=7    changed=7    unreachable=0    failed=0   

root@k8s1:/etc/ansible# ansible-playbook 04.docker.yml 

PLAY [kube-cluster] ******************************************************************************

TASK [docker : 下载 docker 二进制文件] ******************************************************************
changed: [192.168.3.12] => (item=docker-containerd)
changed: [192.168.3.11] => (item=docker-containerd)
changed: [192.168.3.13] => (item=docker-containerd)
changed: [192.168.3.11] => (item=docker-containerd-shim)
changed: [192.168.3.12] => (item=docker-containerd-shim)
changed: [192.168.3.13] => (item=docker-containerd-shim)
changed: [192.168.3.11] => (item=docker-init)
changed: [192.168.3.12] => (item=docker-init)
changed: [192.168.3.13] => (item=docker-init)
changed: [192.168.3.11] => (item=docker-runc)
changed: [192.168.3.13] => (item=docker-runc)
changed: [192.168.3.12] => (item=docker-runc)
changed: [192.168.3.11] => (item=docker)
changed: [192.168.3.12] => (item=docker)
changed: [192.168.3.13] => (item=docker)
changed: [192.168.3.11] => (item=docker-containerd-ctr)
changed: [192.168.3.13] => (item=docker-containerd-ctr)
changed: [192.168.3.12] => (item=docker-containerd-ctr)
changed: [192.168.3.11] => (item=dockerd)
changed: [192.168.3.12] => (item=dockerd)
changed: [192.168.3.13] => (item=dockerd)
changed: [192.168.3.11] => (item=docker-proxy)
changed: [192.168.3.12] => (item=docker-proxy)
changed: [192.168.3.13] => (item=docker-proxy)

TASK [docker : docker命令自动补全] *********************************************************************
changed: [192.168.3.11]
changed: [192.168.3.12]
changed: [192.168.3.13]

TASK [docker : docker国内镜像加速] *********************************************************************
changed: [192.168.3.11]
changed: [192.168.3.12]
changed: [192.168.3.13]

TASK [docker : flush-iptables] *******************************************************************
changed: [192.168.3.11]
changed: [192.168.3.13]
changed: [192.168.3.12]

TASK [docker : 创建docker的systemd unit文件] **********************************************************
changed: [192.168.3.12]
changed: [192.168.3.11]
changed: [192.168.3.13]

TASK [docker : 开启docker 服务] **********************************************************************
changed: [192.168.3.11]
changed: [192.168.3.13]
changed: [192.168.3.12]

TASK [docker : apt更新缓存刷新] ************************************************************************
ok: [192.168.3.13]
ok: [192.168.3.12]
ok: [192.168.3.11]

TASK [docker : 安装轻量JSON处理程序] *********************************************************************
changed: [192.168.3.13]
changed: [192.168.3.12]
changed: [192.168.3.11]

TASK [docker : 下载 docker-tag] ********************************************************************
changed: [192.168.3.12]
changed: [192.168.3.13]
changed: [192.168.3.11]

PLAY RECAP ***************************************************************************************
192.168.3.11               : ok=9    changed=8    unreachable=0    failed=0   
192.168.3.12               : ok=9    changed=8    unreachable=0    failed=0   
192.168.3.13               : ok=9    changed=8    unreachable=0    failed=0   

root@k8s1:/etc/ansible# ansible-playbook 05.calico.yml 

PLAY [kube-cluster] ******************************************************************************

TASK [calico : 创建calico 相关目录] ********************************************************************
changed: [192.168.3.11] => (item=/etc/calico/ssl)
changed: [192.168.3.12] => (item=/etc/calico/ssl)
changed: [192.168.3.13] => (item=/etc/calico/ssl)
changed: [192.168.3.13] => (item=/etc/cni/net.d)
changed: [192.168.3.12] => (item=/etc/cni/net.d)
changed: [192.168.3.11] => (item=/etc/cni/net.d)

TASK [calico : 复制CA 证书到calico 证书目录] **************************************************************
changed: [192.168.3.11]
changed: [192.168.3.12]
changed: [192.168.3.13]

TASK [calico : 创建calico 证书请求] ********************************************************************
changed: [192.168.3.11]
changed: [192.168.3.12]
changed: [192.168.3.13]

TASK [calico : 创建 calico证书和私钥] *******************************************************************
changed: [192.168.3.12]
changed: [192.168.3.13]
changed: [192.168.3.11]

TASK [calico : 创建 calico 的 systemd unit 文件] ******************************************************
changed: [192.168.3.11]
changed: [192.168.3.12]
changed: [192.168.3.13]

TASK [calico : 启动calico 服务] **********************************************************************
changed: [192.168.3.12]
changed: [192.168.3.13]
changed: [192.168.3.11]

TASK [calico : 下载calico cni plugins和calicoctl 客户端] ***********************************************
changed: [192.168.3.11] => (item=calico)
changed: [192.168.3.13] => (item=calico)
changed: [192.168.3.12] => (item=calico)
changed: [192.168.3.11] => (item=calico-ipam)
changed: [192.168.3.11] => (item=loopback)
changed: [192.168.3.12] => (item=calico-ipam)
changed: [192.168.3.13] => (item=calico-ipam)
changed: [192.168.3.12] => (item=loopback)
changed: [192.168.3.13] => (item=loopback)
changed: [192.168.3.11] => (item=calicoctl)
changed: [192.168.3.13] => (item=calicoctl)
changed: [192.168.3.12] => (item=calicoctl)

TASK [calico : 准备 calicoctl配置文件] *****************************************************************
changed: [192.168.3.13]
changed: [192.168.3.12]
changed: [192.168.3.11]

TASK [calico : 准备 cni配置文件] ***********************************************************************
changed: [192.168.3.12]
changed: [192.168.3.13]
changed: [192.168.3.11]

PLAY RECAP ***************************************************************************************
192.168.3.11               : ok=9    changed=9    unreachable=0    failed=0   
192.168.3.12               : ok=9    changed=9    unreachable=0    failed=0   
192.168.3.13               : ok=9    changed=9    unreachable=0    failed=0   

root@k8s1:/etc/ansible# ansible-playbook 06.kube-master.yml 

PLAY [kube-master] *******************************************************************************

TASK [kube-master : 下载 kube-master 二进制] **********************************************************
changed: [192.168.3.11] => (item=kube-apiserver)
changed: [192.168.3.11] => (item=kube-controller-manager)
changed: [192.168.3.11] => (item=kube-scheduler)
ok: [192.168.3.11] => (item=kubectl)
changed: [192.168.3.11] => (item=kube-proxy)
changed: [192.168.3.11] => (item=kubelet)

TASK [kube-master : 创建 kubernetes 证书签名请求] ********************************************************
changed: [192.168.3.11]

TASK [kube-master : 创建 kubernetes 证书和私钥] *********************************************************
changed: [192.168.3.11]

TASK [kube-master : 创建 token.csv] ****************************************************************
changed: [192.168.3.11]

TASK [kube-master : 创建 basic-auth.csv] ***********************************************************
changed: [192.168.3.11]

TASK [kube-master : 创建kube-apiserver的systemd unit文件] *********************************************
changed: [192.168.3.11]

TASK [kube-master : 创建kube-controller-manager的systemd unit文件] ************************************
changed: [192.168.3.11]

TASK [kube-master : 创建kube-scheduler的systemd unit文件] *********************************************
changed: [192.168.3.11]

TASK [kube-master : daemon-reload] ***************************************************************
changed: [192.168.3.11]

TASK [kube-master : enable-kube-apiserver] *******************************************************
changed: [192.168.3.11]

TASK [kube-master : enable-kube-controller-manager] **********************************************
changed: [192.168.3.11]

TASK [kube-master : enable-kube-scheduler] *******************************************************
changed: [192.168.3.11]

TASK [kube-master : start-kube-apiserver] ********************************************************
changed: [192.168.3.11]

TASK [kube-master : start-kube-controller-manager] ***********************************************
changed: [192.168.3.11]

TASK [kube-master : start-kube-scheduler] ********************************************************
changed: [192.168.3.11]

PLAY RECAP ***************************************************************************************
192.168.3.11               : ok=15   changed=15   unreachable=0    failed=0   

root@k8s1:/etc/ansible# ansible-playbook 07.kube-master.yml 
ERROR! the playbook: 07.kube-master.yml could not be found
root@k8s1:/etc/ansible# ansible-playbook 07.kube-node.yml 

PLAY [kube-node] *********************************************************************************

TASK [kube-node : 下载 kubelet和kube-proxy 二进制] *****************************************************
ok: [192.168.3.11] => (item=kubelet)
ok: [192.168.3.11] => (item=kube-proxy)
changed: [192.168.3.13] => (item=kubelet)
changed: [192.168.3.12] => (item=kubelet)
changed: [192.168.3.13] => (item=kube-proxy)
changed: [192.168.3.12] => (item=kube-proxy)

TASK [kube-node : kubelet-bootstrap-setting] *****************************************************
skipping: [192.168.3.12]
skipping: [192.168.3.13]
changed: [192.168.3.11]

TASK [kube-node : 设置集群参数] ************************************************************************
changed: [192.168.3.11]
changed: [192.168.3.13]
changed: [192.168.3.12]

TASK [kube-node : 设置客户端认证参数] *********************************************************************
changed: [192.168.3.13]
changed: [192.168.3.12]
changed: [192.168.3.11]

TASK [kube-node : 设置上下文参数] ***********************************************************************
changed: [192.168.3.11]
changed: [192.168.3.12]
changed: [192.168.3.13]

TASK [kube-node : 选择默认上下文] ***********************************************************************
changed: [192.168.3.11]
changed: [192.168.3.12]
changed: [192.168.3.13]

TASK [kube-node : 安装bootstrap.kubeconfig配置文件] ****************************************************
changed: [192.168.3.13]
changed: [192.168.3.12]
changed: [192.168.3.11]

TASK [kube-node : 创建kubelet的工作目录] ****************************************************************
changed: [192.168.3.12]
changed: [192.168.3.13]
changed: [192.168.3.11]

TASK [kube-node : 创建kubelet的systemd unit文件] ******************************************************
changed: [192.168.3.12]
changed: [192.168.3.11]
changed: [192.168.3.13]

TASK [kube-node : 开启kubelet 服务] ******************************************************************
changed: [192.168.3.13]
changed: [192.168.3.11]
changed: [192.168.3.12]

TASK [kube-node : approve-kubelet-csr] ***********************************************************
skipping: [192.168.3.12]
skipping: [192.168.3.13]
changed: [192.168.3.11]

TASK [kube-node : 准备kube-proxy 证书签名请求] ***********************************************************
changed: [192.168.3.11]
changed: [192.168.3.13]
changed: [192.168.3.12]

TASK [kube-node : 创建 kube-proxy证书与私钥] ************************************************************
changed: [192.168.3.13]
changed: [192.168.3.12]
changed: [192.168.3.11]

TASK [kube-node : 设置集群参数] ************************************************************************
changed: [192.168.3.11]
changed: [192.168.3.13]
changed: [192.168.3.12]

TASK [kube-node : 设置客户端认证参数] *********************************************************************
changed: [192.168.3.12]
changed: [192.168.3.11]
changed: [192.168.3.13]

TASK [kube-node : 设置上下文参数] ***********************************************************************
changed: [192.168.3.12]
changed: [192.168.3.13]
changed: [192.168.3.11]

TASK [kube-node : 选择默认上下文] ***********************************************************************
changed: [192.168.3.11]
changed: [192.168.3.12]
changed: [192.168.3.13]

TASK [kube-node : 安装kube-proxy.kubeconfig配置文件] ***************************************************
changed: [192.168.3.12]
changed: [192.168.3.11]
changed: [192.168.3.13]

TASK [kube-node : 创建kube-proxy的工作目录] *************************************************************
changed: [192.168.3.12]
changed: [192.168.3.11]
changed: [192.168.3.13]

TASK [kube-node : 创建kube-proxy 服务文件] *************************************************************
changed: [192.168.3.11]
changed: [192.168.3.13]
changed: [192.168.3.12]

TASK [kube-node : 开启kube-proxy 服务] ***************************************************************
changed: [192.168.3.11]
changed: [192.168.3.12]
changed: [192.168.3.13]

TASK [kube-node : 创建calico-kube-controllers目录] ***************************************************
changed: [192.168.3.11]
changed: [192.168.3.12]
changed: [192.168.3.13]

TASK [kube-node : 准备RBAC 配置文件] *******************************************************************
changed: [192.168.3.13]
changed: [192.168.3.12]
changed: [192.168.3.11]

TASK [kube-node : 准备calico-kube-controllers.yaml 文件] *********************************************
changed: [192.168.3.13]
changed: [192.168.3.12]
changed: [192.168.3.11]

TASK [kube-node : 运行calico-kube-controllers] *****************************************************
skipping: [192.168.3.12]
skipping: [192.168.3.13]
changed: [192.168.3.11]

PLAY RECAP ***************************************************************************************
192.168.3.11               : ok=25   changed=24   unreachable=0    failed=0   
192.168.3.12               : ok=22   changed=22   unreachable=0    failed=0   
192.168.3.13               : ok=22   changed=22   unreachable=0    failed=0   

root@k8s1:/etc/ansible# ansible-playbook 08.^C
root@k8s1:/etc/ansible# cd/
-bash: cd/: No such file or directory
root@k8s1:/etc/ansible# cd
root@k8s1:~# kubectl
-bash: kubectl: command not found
root@k8s1:~# kube
-bash: kube: command not found
root@k8s1:~# exit
logout
vagrant@k8s1:/etc/ansible$ exit
logout
Connection to 127.0.0.1 closed.
[evlon@qtrj-xuzx-02 api]$ vagrant ssh k8s1
Welcome to Ubuntu 16.04.3 LTS (GNU/Linux 4.4.0-92-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

2 packages can be updated.
2 updates are security updates.


Last login: Fri Dec  8 03:56:28 2017 from 10.0.2.2
vagrant@k8s1:~$ sudo -i
root@k8s1:~# kubectl version
Client Version: version.Info{Major:"1", Minor:"8", GitVersion:"v1.8.4", GitCommit:"9befc2b8928a9426501d3bf62f72849d5cbcd5a3", GitTreeState:"clean", BuildDate:"2017-11-20T05:28:34Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"8", GitVersion:"v1.8.4", GitCommit:"9befc2b8928a9426501d3bf62f72849d5cbcd5a3", GitTreeState:"clean", BuildDate:"2017-11-20T05:17:43Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
root@k8s1:~# kubectl get componentstatus
NAME                 STATUS    MESSAGE              ERROR
controller-manager   Healthy   ok                   
scheduler            Healthy   ok                   
etcd-0               Healthy   {"health": "true"}   
etcd-1               Healthy   {"health": "true"}   
etcd-2               Healthy   {"health": "true"}   
root@k8s1:~# kubectl cluster-info
Kubernetes master is running at https://192.168.3.11:6443

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
root@k8s1:~# kubectl get node
NAME           STATUS    ROLES     AGE       VERSION
192.168.3.11   Ready     <none>    6m        v1.8.4
192.168.3.12   Ready     <none>    6m        v1.8.4
192.168.3.13   Ready     <none>    6m        v1.8.4
root@k8s1:~# kubectl get pod --all-namespaces
NAMESPACE     NAME                                       READY     STATUS    RESTARTS   AGE
kube-system   calico-kube-controllers-5f98db6d48-68p72   1/1       Running   0          6m
root@k8s1:~# kubectl get svc --all-namespaces
NAMESPACE   NAME         TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)   AGE
default     kubernetes   ClusterIP   10.68.0.1    <none>        443/TCP   36m
root@k8s1:~# calicoctl node status
Calico process is running.

IPv4 BGP status
+--------------+-------------------+-------+----------+-------------+
| PEER ADDRESS |     PEER TYPE     | STATE |  SINCE   |    INFO     |
+--------------+-------------------+-------+----------+-------------+
| 192.168.3.12 | node-to-node mesh | up    | 04:07:14 | Established |
| 192.168.3.13 | node-to-node mesh | up    | 04:07:16 | Established |
+--------------+-------------------+-------+----------+-------------+

IPv6 BGP status
No IPv6 peers found.

root@k8s1:~# kubectl create -f manifests/kubedns
error: the path "manifests/kubedns" does not exist
root@k8s1:~# cd /etc/ansible/
root@k8s1:/etc/ansible# ls
01.prepare.yml  05.calico.yml       90.setup.yml  docs     hosts.1    README.md
02.etcd.yml     06.kube-master.yml  99.clean.yml  down     LICENSE    roles
03.kubectl.yml  07.kube-node.yml    ansible.cfg   example  manifests
04.docker.yml   20.addnode.yml      bin           hosts    pics
root@k8s1:/etc/ansible# cd manifests/
root@k8s1:/etc/ansible/manifests# ls
dashboard  heapster  ingress  kubedns
root@k8s1:/etc/ansible/manifests# cd ..
root@k8s1:/etc/ansible# kubectl create -f manifests/kubedns
configmap "kube-dns" created
deployment "kube-dns" created
serviceaccount "kube-dns" created
service "kube-dns" created
root@k8s1:/etc/ansible# kubectl create -f manifests/heapster/
deployment "monitoring-grafana" created
service "monitoring-grafana" created
serviceaccount "heapster" created
clusterrolebinding "heapster" created
deployment "heapster" created
service "heapster" created
deployment "monitoring-influxdb" created
service "monitoring-influxdb" created
configmap "influxdb-config" created
root@k8s1:/etc/ansible# kubectl create -f manifests/dashboard
serviceaccount "kubernetes-dashboard" created
clusterrolebinding "kubernetes-dashboard" created
deployment "kubernetes-dashboard" created
service "kubernetes-dashboard" created
root@k8s1:/etc/ansible# kubectl get componentstatus
NAME                 STATUS    MESSAGE              ERROR
controller-manager   Healthy   ok                   
scheduler            Healthy   ok                   
etcd-0               Healthy   {"health": "true"}   
etcd-1               Healthy   {"health": "true"}   
etcd-2               Healthy   {"health": "true"}   
root@k8s1:/etc/ansible# kubectl get svc --all-namespaces
NAMESPACE     NAME                   TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)                       AGE
default       kubernetes             ClusterIP   10.68.0.1       <none>        443/TCP                       39m
kube-system   heapster               ClusterIP   10.68.197.153   <none>        80/TCP                        47s
kube-system   kube-dns               ClusterIP   10.68.0.2       <none>        53/UDP,53/TCP                 1m
kube-system   kubernetes-dashboard   NodePort    10.68.28.189    <none>        80:7209/TCP                   34s
kube-system   monitoring-grafana     NodePort    10.68.250.67    <none>        80:2690/TCP                   48s
kube-system   monitoring-influxdb    NodePort    10.68.96.182    <none>        8086:6413/TCP,8083:4506/TCP   47s
root@k8s1:/etc/ansible# calicoctl node status
Calico process is running.

IPv4 BGP status
+--------------+-------------------+-------+----------+-------------+
| PEER ADDRESS |     PEER TYPE     | STATE |  SINCE   |    INFO     |
+--------------+-------------------+-------+----------+-------------+
| 192.168.3.12 | node-to-node mesh | up    | 04:07:14 | Established |
| 192.168.3.13 | node-to-node mesh | up    | 04:07:16 | Established |
+--------------+-------------------+-------+----------+-------------+

IPv6 BGP status
No IPv6 peers found.

root@k8s1:/etc/ansible# cd ..
root@k8s1:/etc# 

  

posted @ 2017-12-09 09:31 阿牛 阅读(...) 评论(...) 编辑 收藏