记录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: ...
随机推荐
- CF1029A Many Equal Substrings
题目描述 你有一个字符串t,它由n个字母组成. 定义一个字符串s的子串为s[l...r],表示从位置l到r构成的一个新的串. 你的目标是构造一个字符串s,使得它的可能长度最小,要求s中存在k个位置i, ...
- spring security 学习一
1.配置基本的springboot web项目,加入security5依赖,启动项目 浏览器访问,即可出现一个默认的登录页面 2.什么都没有配置 登录页面哪里来的 一般不知从何入手,就看官方文档里是如 ...
- 2018-2019-2 网络对抗技术 20165206 Exp2 后门原理与实践
- 2018-2019-2 网络对抗技术 20165206 Exp2 后门原理与实践 - 实验任务 (1)使用netcat获取主机操作Shell,cron启动 (0.5分) (2)使用socat获取主 ...
- 获取Ajax通信对象方法
function getXHR() { // 该方法用于获取Ajax通信对象 var xhr = null; if (window.XMLHttpRequest != null && ...
- golang 读书笔记
介绍 Go语言是一种让代码分享更容易的编程语言.Go语言自带一些工具,让使用别人写的包更容易,并且分享自己写的包更容易. Go语言对并发的支持是这门语言最重要的特性之一.goroutine很像线程,但 ...
- Python学习(四十三)—— Djago-admin管理工具
一.admin组件使用 Django 提供了基于 web 的管理工具. Django 自动管理工具是 django.contrib 的一部分.你可以在项目的 settings.py 中的 INSTAL ...
- xpath解析html
XPath XPath 是一门在 XML 文档中查找信息的语言.XPath 可用来在 XML 文档中对元素和属性进行遍历.XPath 是 W3C XSLT 标准的主要元素,并且 XQuery 和 XP ...
- XFire+Spring构建Web Service经验总结
使用工具 MyEclipse:6.5 ,tomcat6.x. 1.新建web项目,要导入用的包: 2程序结构: 3 web.xml配置文件 <?xml version="1.0&quo ...
- 在ASP.NET Core 中怎样使用 EF 框架读取数据库数据
添加测试数据 我们首先使用 SQLite Studio 添加三条数据 ID Name 1 李白 2 杜甫 3 白居易 使用 SQLite Studio 打开我们的 blogging.db 数据库,双击 ...
- altiumdesigner的基本你操作
一:中英文切换 DXP ->Preferences ->System ->General ->Localization(使用本地资源) 本地资源对应的是汉语