Author: Natthapon Pinyo
-
Kubernetes – Patch number of replicas for HPA
Patch minimum/maximum number of replicas in HPA can be done easily by using kubectl patch command Patch minReplicas For example, minReplicas to 2 Patch maxReplicas For example, maxReplicas to 4 To work with multiple HPA Again, wrap it in basic for loop
-
Kubernetes – Fix Pod status stuck at Terminating or ContainerCreating
The issue of Pod status stuck at Terminating or ContainerCreating can be happened in various root-cause. One of the most reason is the ETCD have invalid or outdate list of lease. This will cause a connection refused (randomly) issue when Kubernetes’s pod try to connect Kubernetes API server. To fix that, you need kubectl and…
-
ETCD – Backup and Restore
Sometime you crash the ETCD. Restore the previous stable configuration seem to be a best way to recovery. Download a binary of ETCD Manager Visit https://github.com/kopeio/etcd-manager/tags and download the latest stable version. As of Feb 2, 2024 the tag 3.0.20210228 is the most recent one. List available backup There are two types of ETCD, main…
-
Kubernetes – Scale Up/Down Deployment
Play with an attribute named replicas to scale up/down your deployment. To scale down To scale up To work with multiple deployment Wrap it in basic for loop. This example will scaled down all deployment in the default namespace.