Skip to content

Instantly share code, notes, and snippets.

@bharatmicrosystems
Created May 13, 2020 23:57
Show Gist options
  • Save bharatmicrosystems/5141dd2ef20265dd6b769b986e9b9736 to your computer and use it in GitHub Desktop.
Save bharatmicrosystems/5141dd2ef20265dd6b769b986e9b9736 to your computer and use it in GitHub Desktop.
$ kubectl apply -f - <<EOF
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-v1
spec:
replicas: 1
selector:
matchLabels:
app: nginx
version: v1
template:
metadata:
labels:
app: nginx
version: v1
spec:
containers:
- image: docker.io/bharamicrosystems/nginx:v1
imagePullPolicy: IfNotPresent
name: nginx
ports:
- containerPort: 80
EOF
deployment.apps/nginx-v1 created
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment