Skip to content

Instantly share code, notes, and snippets.

@addshore
Created April 2, 2018 21:40
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save addshore/61065686427fa795e54fd6b9d2b8d236 to your computer and use it in GitHub Desktop.
apiVersion: apps/v1
kind: Deployment
metadata:
name: guids
labels:
app: guids
spec:
replicas: 2
selector:
matchLabels:
app: guids
template:
metadata:
labels:
app: guids
spec:
containers:
- name: guids
image: alexellis2/guid-service:latest
ports:
- containerPort: 9000
livenessProbe:
httpGet:
scheme: HTTP
path: /guid
port: 9000
initialDelaySeconds: 30
timeoutSeconds: 30
---
kind: Service
apiVersion: v1
metadata:
name: guids
spec:
selector:
app: guids
ports:
- protocol: TCP
port: 80
targetPort: 9000
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: guids
spec:
rules:
- host: guids.k8s-example.addshore.com
http:
paths:
- backend:
serviceName: guids
servicePort: 80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment