You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# 获取所有 Service
kubectl get services
kubectl get service
kubectl get svc
# 通过标签过滤删除服务
kubectl delete service -l <LABEL-KEY>=<LABEL-VALUE># 通过指定名称删除服务
kubectl delete service <SERVER-NAME># 查看服务的 cluster-ip
kubectl get svc <SERVER-NAME> -o go-template='{{.spec.clusterIP}}'# 查看服务的端口
kubectl get svc <SERVER-NAME> -o go-template='{{(index .spec.ports 0).port}}'# 获取 service 的 endpoints(endpoints分别对应服务的 pod)
kubectl get ep
Basic Commands
kubectl delete -f using-projected-volume.yml
kubectl get deploy
kubectl get svc
kubectl get rs/foo
Troubleshooting and Debugging Commands
kubectl logs -f {POD-NAME} -c {CONTAINER-NAME}
kubectl logs -f --tail 500 -c {CONTAINER-NAME}
将 localhost:3000的请求转发到 nginx-pod Pod 的80端口
Detailed Commands
Cluster
Pod
Deployment
Services
Service Account
The text was updated successfully, but these errors were encountered: