kubernetes tips and tricks.🏗

Share some tips and tricks for kubernetes deployment and management.

Ian Oliv / 1 View(s)


🏗 Kubernetes tips and tricks

This article is a collection of tips and tricks for kubernetes deployment and management.

🏗 Deploying a pod to kubernetes

Deploying a pod to kubernetes is easy.

kubectl create deployment nginx --image=nginx

🏗 Pod Services

kubectl apply -f https://raw.githubusercontent.com/kubernetes/kubernetes/master/examples/pod-with-readiness-probe/pod.yaml

🏗 Pod Autoscaling

kubectl autoscale deployment nginx --cpu-percent=80 --min=1 --max=10

🏗 Pod Scheduling

kubectl label node node-1 node-label=true
kubectl label node node-2 node-label=false

🏗 Pod Security

kubectl create -f https://raw.githubusercontent.com/kubernetes/kubernetes/master/examples/pod-security-policy/pod-security-policy.yaml

🏗 Pod Priority

kubectl run nginx --image=nginx --port=80 --priority=High

🏗 Pod init

kubectl run nginx --image=nginx --port=80 --init

🏗 Pod restart

kubectl run nginx --image=nginx --port=80 --restart=Never

🏗 Pod Logs

kubectl logs -f nginx

🏗 Pod Port

kubectl run nginx --image=nginx --port=80

🏗 Pod Port with Service

kubectl expose deployment nginx --port=80

🏗 Pod Port with Service

kubectl expose deployment nginx --port=80 --name=nginx-service

🏗 Pod Port with Service

kubectl expose deployment nginx --port=80 --name=nginx-service --type=NodePort

🏗 Pod Port with Service

kubectl expose deployment