kubernetes 删除 service
程序员文章站
2024-03-11 10:27:55
...
查看service命令: kubectl get services
删除service命令: kubectl delete service [service命令]
[[email protected] ~]# kubectl get services
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 42h
nginx-service NodePort 10.109.80.167 <none> 80:30335/TCP 8m17s
[[email protected] ~]# kubectl delete service nginx-service
service "nginx-service" deleted
[[email protected] ~]# kubectl get services
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 42h
下一篇: CentOS7安装Python3环境