Cette page n'est pas encore disponible dans votre langue. Nous nous efforçons d'ajouter d'autres langues. Nous vous remercions de votre compréhension.
- What's New
- Service Overview
- Getting Started
- User Guide
- Best Practices
-
FAQs
- Service Mesh Cluster
- Mesh Management
-
Adding a Service
- What Do I Do If an Added Gateway Does Not Take Effect?
- Why Does It Take a Long Time to Start the Demo Application in Experiencing Service Mesh in One Click?
- Why Can't I Access the page of the Demo Application After It Is Successfully Deployed?
- Why Cannot I Select the Corresponding Service When Adding a Route?
- Performing Grayscale Release
- Videos
Show all
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
NOTE:
{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.