二进制部署K8s集群第13节之验证集群

网友投稿 278 2022-10-27

二进制部署K8s集群第13节之验证集群

一、创建一个资源配置清单nginx容器在hdss7-21或hdss7-22任意一个节点上创建一个资源配置清单

cat > /root/nginx-ds.yaml <<'eof' apiVersion: apps/v1 kind: DaemonSet metadata: name: my-nginx spec: selector: matchLabels: app: my-nginx template: metadata: labels: app: my-nginx spec: containers: - name: my-nginx image: harbor.od.com/public/nginx:v1.7.9 ports: - containerPort: 80 eof kubectl create -f /root/nginx-ds.yaml

二、集群检查在hdss7-21 curl 172.7.21.2在hdss7-22 curl 172.7.22.2

[root@hdss7-21 bin]# kubectl get cs # 查看各组件状态 Warning: v1 ComponentStatus is deprecated in v1.19+ NAME STATUS MESSAGE ERROR scheduler Healthy ok controller-manager Healthy ok etcd-0 Healthy {"health": "true"} etcd-1 Healthy {"health": "true"} etcd-2 Healthy {"health": "true"} [root@hdss7-21 bin]# kubectl get node -o wide # 查看各节点状态 NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME hdss7-21.host.com Ready master,node 11h v1.19.2 10.4.7.21 CentOS Linux 7 (Core) 3.10.0-1127.el7.x86_64 docker://19.3.13 hdss7-22.host.com Ready master,node 11h v1.19.2 10.4.7.22 CentOS Linux 7 (Core) 3.10.0-1127.el7.x86_64 docker://19.3.13 [root@hdss7-21 bin]# kubectl get pods -o wide NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES my-nginx-h88nr 1/1 Running 1 10h 172.7.22.2 hdss7-22.host.com my-nginx-vrlsk 1/1 Running 0 10h 172.7.21.2 hdss7-21.host.com [root@hdss7-21 ~]# curl 172.7.21.2 Welcome to nginx! Welcome to nginx!

If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

For online documentation and support please refer to nginx.org.
Commercial support is available at nginx.com.

Thank you for using nginx.

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:springboot实现敏感字段加密存储解密显示功能
下一篇:脑机接口可以给人类带来什么?
相关文章

 发表评论

暂时没有评论,来抢沙发吧~