Labels
Add labels to be applied to the deployment resource, pods managed by the deployment resource, the service and the ingress.
Required
rules is satisfied. In effect this means theRequired
rules are combined with the boolean "or" operator. Preferred
rules will attempt to be satisfied, but if not the pods will still be scheduled.apiVersion: apps/v1 kind: Deployment metadata: name: octopus-deployment labels: app: web spec: selector: matchLabels: octopusexport: OctopusExport replicas: 1 strategy: type: RollingUpdate template: metadata: labels: app: web octopusexport: OctopusExport spec: containers: - name: nginx image: nginx ports: - containerPort: 80 affinity: podAntiAffinity: preferredDuringSchedulingIgnoredDuringExecution: - weight: 100 podAffinityTerm: labelSelector: matchExpressions: - key: app operator: In values: - web topologyKey: kubernetes.io/hostname