首页 > Web开发 > 详细

K8S(十)——验证kubernetes集群

时间:2020-05-18 17:25:03      阅读:50      评论:0      收藏:0      [点我收藏+]

一、在一个节点配置资源清单

[root@sx7-22 ~]# vim nginx-ds.yaml
apiVersion: extensions/v1beta1 kind: DaemonSet metadata: name: nginx-ds spec: template: metadata: labels: app: nginx-ds spec: containers: - name: my-nginx image: harbor.od.com/public/nginx:v1.7.9 ports: - containerPort: 80

二、配置和检查

[root@sx7-22 ~]# kubectl create -f nginx-ds.yaml
daemonset.extensions/nginx-ds created
[root@sx7-22 ~]# kubectl get pods
[root@sx7-22 ~]# kubectl get pods -o wide
[root@sx7-22 ~]# curl 172.7.22.2

三、验证集群是否ok

[root@sx7-22 ~]# kubectl get pods
[root@sx7-22 ~]# kubectl get cs
[root@sx7-22 ~]# kubectl get nodes

 

K8S(十)——验证kubernetes集群

原文:https://www.cnblogs.com/xyly/p/12911731.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!