KUBERNETES

How to Sort by Last Seen …

When we run kubectl get events command output shows us details of cluster events like nginx pod has …

Validate Yaml Files with …

When you change something in specs of yaml file, it would be good if run dry-run first before …

Use Regex to Get Specific …

1kubectl get configmap kafka-default-config -o yaml | grep -oP …

Restart All Deployments …

NOTE Below example is for only default namespace. add -n option for specific namespace add -A …

Kubectl Apply Command …

Apply a configuration to a resource by file name or stdin. This resource will be created if it …

How to Switch Kubernetes …

1# when you have the context name then run below command to switch 2kubectl config use-context …

Kubectl Label Command …

A label key and value must beging with a letter or number and may contain letters, numbers, hyphens, …

Kubectl Scale Command …

Set a new size for a deployment, replica set, replication controller, or stateful set. 1# syntax …

Kubectl Rollout Command …

Manage the rollout of one or many resources for deployments, deamonsets and statefulsets. 1# syntax …

How to Find Request …

if you are getting “pod didn’t trigger scale-up: 2 max node group size reached” or …

How to Decode Kubernetes …

We can read kubernetes secrets with few similar options like below but decode it only with base64 …

Scale Deployment using …

OPTION 1 1# syntax 2kubectl scale deployment <deployment-name> --replicas=5 3kubectl scale …