Skip to content

Instantly share code, notes, and snippets.

@kevinsimper
Created October 11, 2018 17:45
Show Gist options
  • Save kevinsimper/b8a8882bfcadd5cd85769545b559e2a8 to your computer and use it in GitHub Desktop.
Save kevinsimper/b8a8882bfcadd5cd85769545b559e2a8 to your computer and use it in GitHub Desktop.
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
labels:
app: nginx
spec:
replicas: 3
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.15.4
ports:
- containerPort: 80
---
kind: Service
apiVersion: v1
metadata:
name: my-service
spec:
type: NodePort
selector:
app: nginx
ports:
- protocol: TCP
port: 80
targetPort: 9000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment