欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

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

相关标签: Kubernetes