Skip to content

Instantly share code, notes, and snippets.

@bharatmicrosystems
Created February 27, 2021 15:17
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save bharatmicrosystems/3eff21967081a8bd5740559fbb27d4e2 to your computer and use it in GitHub Desktop.
Save bharatmicrosystems/3eff21967081a8bd5740559fbb27d4e2 to your computer and use it in GitHub Desktop.
cat <<EOF | kubectl apply -f -
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
selector:
matchLabels:
app: nginx
replicas: 2
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:latest
resources:
requests:
memory: "100Mi"
cpu: "250m"
limits:
memory: "250Mi"
cpu: "500m"
EOF
deployment.apps/nginx-deployment created
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment