Skip to content

Instantly share code, notes, and snippets.

@karl-cardenas-coding
Created September 17, 2021 17:49
Show Gist options
  • Save karl-cardenas-coding/f35d4349ca6d3a7fc03f396e123b66d4 to your computer and use it in GitHub Desktop.
Save karl-cardenas-coding/f35d4349ca6d3a7fc03f396e123b66d4 to your computer and use it in GitHub Desktop.
k8s label-matching
apiVersion: apps/v1
kind: Deployment
metadata:
name: deployment-hello-world
spec:
selector:
matchLabels: &pod-label
run: pod-hello-world
template:
metadata:
labels: *pod-label
spec:
containers:
- name: cont1
image: learnk8s/app:1.0.0
ports:
- containerPort: 8080
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment