Skip to content

Instantly share code, notes, and snippets.

@santisbon
Last active March 16, 2023 15:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save santisbon/78909fd6775288f905e997de73cd46f3 to your computer and use it in GitHub Desktop.
Save santisbon/78909fd6775288f905e997de73cd46f3 to your computer and use it in GitHub Desktop.
k8s deployment example #kubernetes #k8s
cat <<EOF | kubectl create -f -
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
labels:
app: nginx
spec:
replicas: 2
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.15.4
ports:
- containerPort: 80
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment