Skip to content

Instantly share code, notes, and snippets.

@willejs
Last active July 6, 2016 15:57
Show Gist options
  • Save willejs/8b0e8f5aff04b1b88e88c9b686b15f5a to your computer and use it in GitHub Desktop.
Save willejs/8b0e8f5aff04b1b88e88c9b686b15f5a to your computer and use it in GitHub Desktop.
Example kubernetes deployment and service
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: hello
spec:
replicas: 1
template:
metadata:
labels:
app: hello
spec:
containers:
- name: hello
image: willejs/hello
ports:
- containerPort: 3000
---
kind: Service
apiVersion: v1
metadata:
name: hello
spec:
type: LoadBalancer
selector:
app: hello
ports:
-
protocol: TCP
port: 80
targetPort: 3000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment