Last active
May 19, 2022 13:06
-
-
Save welshstew/e170e243d12ac917769eef262d26959e to your computer and use it in GitHub Desktop.
pdb-demonstration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps.openshift.io/v1 | |
kind: DeploymentConfig | |
metadata: | |
name: example | |
spec: | |
selector: | |
app: httpd | |
replicas: 3 | |
template: | |
metadata: | |
labels: | |
app: httpd | |
spec: | |
containers: | |
- name: httpd | |
image: >- | |
image-registry.openshift-image-registry.svc:5000/openshift/httpd:latest | |
ports: | |
- containerPort: 8080 | |
affinity: | |
podAntiAffinity: | |
preferredDuringSchedulingIgnoredDuringExecution: | |
- weight: 100 | |
podAffinityTerm: | |
labelSelector: | |
matchExpressions: | |
- key: app | |
operator: In | |
values: | |
- httpd | |
topologyKey: "kubernetes.io/hostname" | |
strategy: | |
type: Rolling |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: nginx | |
spec: | |
replicas: 3 | |
selector: | |
matchLabels: | |
app: nginx-app | |
template: | |
metadata: | |
labels: | |
app: nginx-app | |
spec: | |
containers: | |
- name: nginx | |
image: quay.io/swinches/nginx-ex:latest | |
ports: | |
- containerPort: 80 | |
affinity: | |
podAntiAffinity: | |
preferredDuringSchedulingIgnoredDuringExecution: | |
- weight: 100 | |
podAffinityTerm: | |
labelSelector: | |
matchExpressions: | |
- key: app | |
operator: In | |
values: | |
- nginx-app | |
topologyKey: "kubernetes.io/hostname" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: nginx | |
spec: | |
replicas: 3 | |
selector: | |
matchLabels: | |
app: nginx-app | |
template: | |
metadata: | |
labels: | |
app: nginx-app | |
spec: | |
containers: | |
- name: nginx | |
image: quay.io/swinches/nginx-ex:latest | |
ports: | |
- containerPort: 80 | |
affinity: | |
podAntiAffinity: | |
requiredDuringSchedulingIgnoredDuringExecution: | |
- labelSelector: | |
matchExpressions: | |
- key: app | |
operator: In | |
values: | |
- nginx-app | |
topologyKey: "kubernetes.io/hostname" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: policy/v1 | |
kind: PodDisruptionBudget | |
metadata: | |
name: nginx-pdb | |
spec: | |
minAvailable: 2 | |
selector: | |
matchLabels: | |
app: nginx-app |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment