Skip to content

Commit 6604aee

Browse files
Kalyan Reddy DaidaKalyan Reddy Daida
Kalyan Reddy Daida
authored and
Kalyan Reddy Daida
committed
Welcome to Stack Simplify
1 parent d65980e commit 6604aee

File tree

3 files changed

+55
-8
lines changed

3 files changed

+55
-8
lines changed

15-EKS-HPA-Horizontal-Pod-Autoscaler/README.md

+11-8
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,17 @@ kubectl get pods
7070
- Default cooldown period is 5 minutes.
7171
- Once CPU utilization of pods is less than 50%, it will starting terminating pods and will reach to minimum 1 pod as configured.
7272

73-
## Step-08: Imperative vs Declarative for HPA
73+
74+
## Step-08: Clean-Up
75+
```
76+
# Delete HPA
77+
kubectl delete hpa hpa-demo-deployment
78+
79+
# Delete Deployment & Service
80+
kubectl delete -f kube-manifests/
81+
```
82+
83+
## Step-09: Imperative vs Declarative for HPA
7484
- From Kubernetes v1.18 onwards, we have a declarative way of defining HPA policies using `behavior` object in yaml.
7585
- **Support for configurable scaling behavior**
7686
- Starting from v1.18 the v2beta2 API allows scaling behavior to be configured through the HPA behavior field.
@@ -97,14 +107,7 @@ behavior:
97107
- **Reference:** Select V1.18 from top right corner on Kubernetes website for V1.18 documentation
98108
- https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/
99109
100-
## Step-06: Clean-Up
101-
```
102-
# Delete HPA
103-
kubectl delete hpa hpa-demo-deployment
104110
105-
# Delete Deployment & Service
106-
kubectl delete -f V1-HPA/01-kubenginx-Deployment-NodePort-Service-for-HPA-Demo.yml
107-
```
108111
109112
## Referencess
110113
### Metrics Server Releases
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: hpa-demo-deployment
5+
labels:
6+
app: hpa-nginx
7+
spec:
8+
replicas: 1
9+
selector:
10+
matchLabels:
11+
app: hpa-nginx
12+
template:
13+
metadata:
14+
labels:
15+
app: hpa-nginx
16+
spec:
17+
containers:
18+
- name: hpa-nginx
19+
image: stacksimplify/kubenginx:1.0.0
20+
ports:
21+
- containerPort: 80
22+
resources:
23+
requests:
24+
memory: "128Mi"
25+
cpu: "100m"
26+
limits:
27+
memory: "500Mi"
28+
cpu: "200m"
29+
---
30+
apiVersion: v1
31+
kind: Service
32+
metadata:
33+
name: hpa-demo-service-nginx
34+
labels:
35+
app: hpa-nginx
36+
spec:
37+
type: NodePort
38+
selector:
39+
app: hpa-nginx
40+
ports:
41+
- port: 80
42+
targetPort: 80
43+
nodePort: 31231
44+
-1 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)