Created
May 12, 2021 12:06
-
-
Save jdato/2ecd410c1e1ca4f0cc718db8a9d48822 to your computer and use it in GitHub Desktop.
Example of a Kubernetes Deployment
This file contains 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: | |
labels: | |
app: my-application-deployment | |
name: my-application | |
spec: | |
replicas: 2 | |
selector: | |
matchLabels: | |
app: my-application | |
template: | |
metadata: | |
labels: | |
app: my-application | |
spec: | |
affinity: | |
podAntiAffinity: | |
preferredDuringSchedulingIgnoredDuringExecution: | |
- weight: 100 | |
podAffinityTerm: | |
labelSelector: | |
matchExpressions: | |
- key: app | |
operator: In | |
values: | |
- my-application | |
topologyKey: kubernetes.io/hostname | |
containers: | |
- name: hello-world-app | |
image: hello-world | |
ports: | |
- containerPort: 9024 | |
status: {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment