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
{{ message }}
This repository was archived by the owner on Sep 19, 2022. It is now read-only.
Service label is app: pytorch-operator, while selector is name: pytorch-operator. Deployment spec label and selector are both name: pytorch-operator.
In such a case, both the service and deployment have been deployed via kubectl create -f manifests/base. Then we want to update the operator image, but now we need to run kubectl apply -k manifests/overlays/latest. kustomize will add all the labels of service to selector, as shown below:
Service label is
app: pytorch-operator, while selector isname: pytorch-operator. Deployment spec label and selector are bothname: pytorch-operator.In such a case, both the service and deployment have been deployed via
kubectl create -f manifests/base. Then we want to update the operator image, but now we need to runkubectl apply -k manifests/overlays/latest.kustomizewill add all the labels of service to selector, as shown below:$ kustomize build manifests/overlays/latest apiVersion: v1 kind: Service metadata: annotations: prometheus.io/path: /metrics prometheus.io/port: "8443" prometheus.io/scrape: "true" labels: app: pytorch-operator name: pytorch-operator namespace: phx-system spec: ports: - name: monitoring-port port: 8443 targetPort: 8443 selector: app: pytorch-operator name: pytorch-operator type: ClusterIP --- apiVersion: apps/v1 kind: Deployment metadata: labels: app: pytorch-operator name: pytorch-operator namespace: phx-system spec: replicas: 1 selector: matchLabels: app: pytorch-operator name: pytorch-operator template: metadata: labels: app: pytorch-operator name: pytorch-operator spec: containers: command: - /pytorch-operator.v1 - --alsologtostderr - -v=1 - --monitoring-port=8443 env: - name: KUBEFLOW_NAMESPACE value: kubeflow image: ${pytorch-operator-image} name: pytorch-operator serviceAccountName: pytorch-operatorThen the following error occurs:
Better to match service labels with selectors and deployment's labels and selectors.