Skip to content

Instantly share code, notes, and snippets.

@bendrucker
Created September 19, 2018 20:24
Show Gist options
  • Save bendrucker/fb5cef86e7e2e57604bba7383a2691a2 to your computer and use it in GitHub Desktop.
Save bendrucker/fb5cef86e7e2e57604bba7383a2691a2 to your computer and use it in GitHub Desktop.
Hello World deployment + service for Kubernetes
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: hello-world
labels:
app: hello-world
spec:
replicas: 4
template:
metadata:
labels:
app: hello-world
spec:
containers:
- name: hello-app
image: 'gcr.io/google-samples/hello-app:1.0'
ports:
- name: http
containerPort: 8080
---
apiVersion: v1
kind: Service
metadata:
name: hello-world
spec:
ports:
- name: http
port: 80
targetPort: http
selector:
app: hello-world
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment