Skip to content

Instantly share code, notes, and snippets.

@andersonkxiass
Created April 12, 2020 15:30
Show Gist options
  • Save andersonkxiass/f3769d317e134cd17b95aadd6a685f88 to your computer and use it in GitHub Desktop.
Save andersonkxiass/f3769d317e134cd17b95aadd6a685f88 to your computer and use it in GitHub Desktop.
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx
spec:
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1
ports:
- name: http
containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: nginx
spec:
ports:
- name: http
port: 80
protocol: TCP
targetPort: 80
selector:
app: nginx
type: LoadBalancer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment