apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: hpa-example
spec:
replicas: 3
template:
metadata:
labels:
app: hpa-example
spec:
containers:
- name: hpa-example
image: gcr.io/google_containers/hpa-example
ports:
- name: http-port
containerPort: 80
resources:
requests:
cpu: 200m
---
apiVersion: v1
kind: Service
metadata:
name: hpa-example
spec:
ports:
- port: 31001
nodePort: 31001
targetPort: http-port
protocol: TCP
selector:
app: hpa-example
type: NodePort
---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: hpa-example-autoscaler
spec:
scaleTargetRef:
apiVersion: extensions/v1beta1
kind: Deployment
name: hpa-example
minReplicas: 1
maxReplicas: 10
targetCPUUtilizationPercentage: 50
session-1-kubernetes-fundamental-tutorials-by-rajesh-jan-2021
session-2-kubernetes-fundamental-tutorials-by-rajesh-jan-2021
session-3-kubernetes-fundamental-tutorials-by-rajesh-jan-2021
session-4-kubernetes-fundamental-tutorials-by-rajesh-jan-2021
session-5-kubernetes-fundamental-tutorials-by-rajesh-jan-2021
session-6-kubernetes-fundamental-tutorials-by-rajesh-jan-2021
session-7-kubernetes-fundamental-tutorials-by-rajesh-jan-2021
session-8-kubernetes-fundamental-tutorials-by-rajesh-jan-2021
session-9-kubernetes-fundamental-tutorials-by-rajesh-jan-2021
session-10-kubernetes-fundamental-tutorials-by-rajesh-jan-2021
session-11-kubernetes-fundamental-tutorials-by-rajesh-jan-2021
Latest posts by Rajesh Kumar (see all)
- Best AI tools for Software Engineers - November 4, 2024
- Installing Jupyter: Get up and running on your computer - November 2, 2024
- An Introduction of SymOps by SymOps.com - October 30, 2024