Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sseidenthal/cc741d1d77f3a0a928996508d4a59b5f to your computer and use it in GitHub Desktop.
Save sseidenthal/cc741d1d77f3a0a928996508d4a59b5f to your computer and use it in GitHub Desktop.
apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
kind: Deployment
metadata:
name: hello-world-deployment
spec:
selector:
matchLabels:
app: hello-world
replicas: 3
template:
metadata:
labels:
app: hello-world
spec:
containers:
- name: hello
image: tutum/hello-world
---
apiVersion: v1
kind: Service
metadata:
name: hello-world-service
labels:
app: hello-world
spec:
ports:
- port: 80
targetPort: 80
name: http
protocol: TCP
selector:
app: hello-world
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: hello-world-ingress
annotations:
ingress.kubernetes.io/rewrite-target: /
traefik.frontend.rule.type: PathPrefixStrip
spec:
rules:
- host: my-domain.com
http:
paths:
- path: /hello-world
backend:
serviceName: hello-world-service
servicePort: 80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment