Skip to content

Instantly share code, notes, and snippets.

@Dakuan
Last active December 22, 2017 12:23
Show Gist options
  • Save Dakuan/a2ecf45f034b702103de3f6b1473ac41 to your computer and use it in GitHub Desktop.
Save Dakuan/a2ecf45f034b702103de3f6b1473ac41 to your computer and use it in GitHub Desktop.
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
run: invoices-svc
name: invoices-svc
namespace: default
spec:
replicas: 3
selector:
matchLabels:
run: invoices-svc
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
type: RollingUpdate
template:
metadata:
labels:
run: invoices-svc
spec:
containers:
- image: invoices_svc:v1
imagePullPolicy: IfNotPresent
name: invoices-svc
ports:
- containerPort: 8080
dnsPolicy: ClusterFirst
restartPolicy: Always
---
apiVersion: v1
kind: Service
metadata:
labels:
run: invoices-svc
name: invoices-svc
namespace: default
spec:
ports:
- port: 80
protocol: TCP
targetPort: 8080
selector:
run: invoices-svc
sessionAffinity: None
type: ClusterIP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment