Skip to content

Instantly share code, notes, and snippets.

@bharatmicrosystems
Created July 18, 2021 06:56
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/8c795ea3b1b56be37a2af8cc61d49be8 to your computer and use it in GitHub Desktop.
Save bharatmicrosystems/8c795ea3b1b56be37a2af8cc61d49be8 to your computer and use it in GitHub Desktop.
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-nginx
spec:
selector:
matchLabels:
run: my-nginx
replicas: 2
template:
metadata:
labels:
run: my-nginx
spec:
containers:
- name: my-nginx
image: nginx
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: my-nginx
labels:
run: my-nginx
spec:
ports:
- port: 80
protocol: TCP
type: LoadBalancer
selector:
run: my-nginx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment