CentOS 7.4下二进制安装 Kubernetes 1.12(5)

检查集群状态 # 在 master 上 kubectl get node kubectl get cs 注册登录阿里云容器仓库

因国内无法获得 google 的 pause-amd64 镜像,我这里使用阿里云的。这里需要阿里云的帐号和密码。

在 node 节点上执行 sudo docker login --username={帐号} registry.cn-hangzhou.aliyuncs.com 运行测试实例 # 在 master 上执行 kubectl run nginx --image=nginx --replicas=3 kubectl expose deployment nginx --port=88 --target-port=80 --type=NodePort 获取 node 节点的 pod,svc 信息 # 提升权限 kubectl create clusterrolebinding system:anonymous --clusterrole=cluster-admin --user=system:anonymous kubectl get pods -o wide kubectl get svc

根据获得的端口,访问nginx

CentOS 7.4下二进制安装 Kubernetes 1.12

Linux公社的RSS地址https://www.linuxidc.com/rssFeed.aspx

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/122e26c7611f5bb74ee5cea1dc8bb092.html