forked from docs/doc-exports
Reviewed-by: Kovács, Zoltán <zkovacs@t-systems.com> Co-authored-by: Dong, Qiu Jian <qiujiandong1@huawei.com> Co-committed-by: Dong, Qiu Jian <qiujiandong1@huawei.com>
4.9 KiB
4.9 KiB
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
- 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.
Parent topic: Manual Fixing Items