Skip to content

Instantly share code, notes, and snippets.

@nimboya
Last active July 28, 2020 13:03
Show Gist options
  • Select an option

  • Save nimboya/35030a56c2b6a2df62479d22e970d7ae to your computer and use it in GitHub Desktop.

Select an option

Save nimboya/35030a56c2b6a2df62479d22e970d7ae to your computer and use it in GitHub Desktop.
A simple Deployment YAML file
apiVersion: apps/v1
kind: Deployment
metadata:
name: myapp
spec:
selector:
matchLabels:
app: myappms
replicas: 2
template:
metadata:
labels:
app: myappms
spec:
containers:
- name: myappms
image: nginx:1.14.2
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: myapp-svc
spec:
selector:
app: myappms
ports:
- name: http
protocol: TCP
port: 80
targetPort: 80
type: LoadBalancer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment