All Pods Share the Same app and version Labels
Description
All pods of a Service must share the same app and version labels. app traces traffic in traffic monitoring, and version distinguishes different versions in grayscale release. If pods with different app or version labels exist, this item is abnormal.
Rectification Guide
The labels of pods are configured in spec.template.metadata.labels of the Deployment. The recommended configuration is as follows:
labels: app: {serviceName} version: v1
To modify the labels of multiple pods to the same value, perform the following steps:
- View the labels configured for spec.selector.
kubectl get svc {serviceName} -o yaml
For example, the labels are app: ratings and release: istio-bookinfo.
- Search for the pods of a Service by label.
kubectl get pod -n {namespace} -l app=ratings,release=istio-bookinfo
{namespace} is the same as the namespace of the Service.
- Find the workload of a pod by the pod name.
kubectl get deployment {deploymentName} -n {namespace}
- For details about how to modify the app and version labels of a pod, see Rectification Guide.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot