Last active
December 18, 2023 10:50
-
-
Save ahmad-elbatanouni/92cd6f574eceb067e3e8c19610629e96 to your computer and use it in GitHub Desktop.
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: | |
name: my-deployment | |
spec: | |
selector: | |
matchLabels: | |
my-label: some-value | |
replicas: 3 | |
template: | |
metadata: | |
name: any-name-that-you-like | |
labels: | |
my-label: some-value # Must be the same as the one in the selector | |
spec: | |
containers: | |
- image: nginx | |
name: nginx-container | |
resources: # Will cause errors when used on killerCoda due to the limited resources | |
limits: | |
memory: '512Mi' | |
cpu: '1' | |
# Create by running the following command in the terminal | |
# kubectl apply -f pod.yml | |
# Access on your browser using | |
# kubectl port-forward deployments/my-deployment-controller 8080:80 --address='0.0.0.0' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment