Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@cassanellicarlo
Created November 10, 2020 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cassanellicarlo/3cdb857420488c6cb8d2397b0735ab77 to your computer and use it in GitHub Desktop.
Save cassanellicarlo/3cdb857420488c6cb8d2397b0735ab77 to your computer and use it in GitHub Desktop.
Kubernetes Deployment
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: node-hello-world
name: node-hello-world
namespace: default
spec:
replicas: 3
selector:
matchLabels:
app: node-hello-world
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
labels:
app: node-hello-world
spec:
containers:
- image: >-
gcr.io/kubernetes-helm-295208/github_cassanellicarlo_kubernetes-terraform
imagePullPolicy: IfNotPresent
name: kubernetes-terraform-1
---
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
labels:
app: node-hello-world
name: node-hello-world-hpa-m9zi
namespace: default
spec:
maxReplicas: 5
metrics:
- resource:
name: cpu
targetAverageUtilization: 80
type: Resource
minReplicas: 1
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: node-hello-world
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment