Skip to content

Instantly share code, notes, and snippets.

@prasvats
Created July 8, 2020 13:37
Show Gist options
  • Save prasvats/f0d5038d613dd65a14ba235790ee7349 to your computer and use it in GitHub Desktop.
Save prasvats/f0d5038d613dd65a14ba235790ee7349 to your computer and use it in GitHub Desktop.
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-deployment-50001
spec:
selector:
matchLabels:
app: products
department: sales
replicas: 3
template:
metadata:
labels:
app: products
department: sales
spec:
containers:
- name: hello
image: "gcr.io/google-samples/hello-app:2.0"
env:
- name: "PORT"
value: "50001"
---
apiVersion: v1
kind: Service
metadata:
name: my-lb-service
spec:
type: LoadBalancer
selector:
app: products
department: sales
ports:
- protocol: TCP
port: 80
targetPort: 50001
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment