Skip to content

Instantly share code, notes, and snippets.

@danfairs
Created July 21, 2016 14:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danfairs/7262e6aae2ae39d053bbee933a344711 to your computer and use it in GitHub Desktop.
Save danfairs/7262e6aae2ae39d053bbee933a344711 to your computer and use it in GitHub Desktop.
Deploy snippet
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels: {name: twist-server, role: app}
name: twist-server
spec:
replicas: 1
selector:
matchLabels:
name: twist-server
role: app
template:
metadata:
labels: {name: twist-server, role: app}
name: twist-server
spec:
containers:
- command: [/usr/bin/python3, /app/main.py, "--statsd-host=graphite-statsd:8125"]
image: gcr.io/twist-api-1350/twist-server:v3
name: twist-server
ports:
- {containerPort: 8888, name: twist-http}
---
apiVersion: v1
kind: Service
metadata:
name: twist-server
spec:
selector:
name: twist-server
role: app
ports:
- protocol: TCP
port: 80
targetPort: 8888
---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment