更新时间:2023-12-02 18:37:40
服务使用选择器选择 Pod.查看服务的选择器,并使用该选择器获取 pod.对于 kubectl,命令如下所示:
A service chooses the pods using the selector. Look at the selector for the service, and get the pods using that selector. For kubectl, the command looks like:
kubectl get pods --selector <selector>