Skip to content

Instantly share code, notes, and snippets.

@mousetree
Created July 10, 2018 17:21
Show Gist options
  • Save mousetree/cbd2f8fe38bf17c58c19f74e3a90953c to your computer and use it in GitHub Desktop.
Save mousetree/cbd2f8fe38bf17c58c19f74e3a90953c to your computer and use it in GitHub Desktop.
Kubernetes deployment and service config (no templating)
kind: Service
apiVersion: v1
metadata:
name: my-app
spec:
selector:
app: my-app
ports:
- protocol: TCP
port: 80
targetPort: 3000
type: LoadBalancer
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: my-app
labels:
app: my-app
spec:
replicas: 2
selector:
matchLabels:
app: my-app
template:
metadata:
labels:
app: my-app
spec:
containers:
- name: my-app
image: eu.gcr.io/my-project/my-app:a78f061c524e9357eed33f489fad900077f6cb5f
ports:
- name: http
containerPort: 3000
protocol: TCP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment