Skip to content

Instantly share code, notes, and snippets.

@cbluth
Last active October 31, 2017 18:20
Show Gist options
  • Save cbluth/e49c37f9ec23d3768176d2e197375447 to your computer and use it in GitHub Desktop.
Save cbluth/e49c37f9ec23d3768176d2e197375447 to your computer and use it in GitHub Desktop.
apiVersion: v1
items:
- apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
application: web
name: web
role: application
name: web
namespace: default
spec:
replicas: 3
selector:
matchLabels:
application: web
name: web
role: application
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
type: RollingUpdate
template:
metadata:
labels:
application: web
name: web
role: application
spec:
containers:
- image: cbluth/web:1
imagePullPolicy: Always
name: web
ports:
- containerPort: 8080
protocol: TCP
resources:
limits:
cpu: 50m
memory: 50Mi
requests:
cpu: 50m
memory: 50Mi
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
- apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: web
namespace: default
spec:
maxReplicas: 15
minReplicas: 3
scaleTargetRef:
apiVersion: extensions/v1beta1
kind: Deployment
name: web
targetCPUUtilizationPercentage: 1
- apiVersion: v1
kind: Service
metadata:
labels:
name: web
name: web
namespace: default
spec:
ports:
- name: http
port: 80
protocol: TCP
targetPort: 8080
selector:
name: web
sessionAffinity: None
type: LoadBalancer
kind: List
metadata:
resourceVersion: ""
selfLink: ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment