记录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#
记录k8s:k8s1.8.4无坑离线安装的更多相关文章
- [转帖]无网络离线安装 vs2017
无网络离线安装 vs2017 公司电脑禁止,只有一个老的vs2017的安装目录(之前通过 --layout 安装时生成的离线文件).找了一圈百度,没能解决问题,最后,问bing,查微软的官方网站命令, ...
- Linux(Red hat)无网离线安装TensorFlow
文件下载 首先,下载想要安装的版本,目前最新的是1.8.0 根据你的python版本下载对应的whl文件,下载连接:https://pypi.org/project/tensorflow/#files ...
- 三万字无坑搭建基于Docker+K8S+GitLab/SVN+Jenkins+Harbor持续集成交付环境
写在前面 最近在 K8S 1.18.2 版本的集群上搭建DevOps环境,期间遇到了各种坑.目前,搭建环境的过程中出现的各种坑均已被填平,特此记录,并分享给大家! 文章和搭建环境所需要的yml文件已收 ...
- 在阿里云托管kubernetes上利用 cert-manager 自动签发 TLS 证书[无坑版]
前言 排错的过程是痛苦的也是有趣的. 运维乃至IT,排错能力是拉开人与人之间的重要差距. 本篇会记录我的排错之旅. 由来 现如今我司所有业务都运行在阿里云托管kubernetes环境上,因为前端需要对 ...
- centos7.3 kubernetes/k8s 1.10 离线安装 --已验证
本文介绍在centos7.3使用kubeadm快速离线安装kubernetes 1.10. 采用单master,单node(可以多node),占用资源较少,方便在笔记本或学习环境快速部署,不适用于生产 ...
- Harbor私有镜像仓库无坑搭建
转载:https://k8s.abcdocker.com/kubernetes_harbor.html 一.介绍 Docker容器应用的开发和运行路不开可靠的镜像管理,虽然Docker官方也提供了公共 ...
- Linux 安装GCC讲解(在线和无网离线)
本文主要介绍如何在无网络的环境下怎么离线安装GCC,如果有网,只需要通过命令 yum install gcc 进行安装就可以了,yum会自动把所有关联的依赖包也一起安装了,一键安装. yum inst ...
- 记录vue中一些有意思的坑
记录vue中一些有意思的坑 'message' handler took 401ms 在出现这个之前,我一直纠结于 是如何使用vue-router或者不使用它,通过类似的v-if来实现.结果却出现这个 ...
- hadoop-hdp-ambari离线安装记录
一.系统准备 1. 创建user——ambari 2.关闭防火墙 redhat6: chkconfig iptables off /etc/init.d/iptables stop redhat7: ...
随机推荐
- ThinkPHP 2053错误
这个报错是调用存储过程的时候产生的,用的是5.1的代码是根据官方文档写的,我怀疑5.0也有这个问题.去官方查了一下发现不少人有这个问题,但是官方都没有回应过,只能自己动手一步步调了. $center ...
- 关于el-upload上传
<el-upload class="edit-input-upload" :action="config.baseUrl + '/joinus/candidate/ ...
- Uni-app中Class绑定与Style绑定
为了节约性能,我们将Class与Style的表达式通过compiler硬编码到uni-app中 支持语法和转换效果如下: Class支持语法: <view :class="{ acti ...
- 高可用Redis(十):Redis原生命令搭建集群
1.搭建Redis Cluster主要步骤 1.配置开启节点 2.meet 3.指派槽 4.主从关系分配 2.环境说明 两台虚拟机,IP地址分别为:192.168.81.100和192.168.81. ...
- 译文 - Recommender Systems: Issues, Challenges, and Research Opportunities
REF: 原文 Recommender Systems: Issues, Challenges, and Research Opportunities Shah Khusro, Zafar Ali a ...
- vue中使用postMessage进行跨越传值
想在“当前位置”获取子页面的title属性,但是main页面和子页面在不同的端口上,直接获取会出现: “Blocked a frame with origin from accessing a cro ...
- Codeforces 1153D Serval and Rooted Tree (简单树形DP)
<题目链接> 题目大意: Serval拥有的有根树有n个节点,节点1是根. Serval会将一些数字写入树的所有节点.但是,有一些限制.除叶子之外的每个节点都有一个写入操作的最大值或最小值 ...
- 【nuget】PackageReference
.net 爬虫 <PackageReference Include="HtmlAgilityPack" Version="1.9.0" /> < ...
- PCB Mark点相关
1)Mark点用于锡膏印刷和元件贴片时的光学定位.根据Mark点在PCB上的作用,可分为拼板Mark点.单板Mark点.局部Mark点(也称器件级MARK点) 2)拼板的工艺边上和不需拼板的单板上应至 ...
- 英语知识积累-D01-body+animal
My body What's your name? Here are lots of children playing. Are they happy or sad? Who's waving at ...