How to use “kubectl” command instead of “sudo kubectl”

Fix file permissions Most likely your kubectl files are not owned by your user. You can set these permissions using below command. sudo chown -R $USER $HOME/.kube Run kubectl with sudo Alternatively you can run kubectl as sudo user using a persistent sudo shell. sudo -s then run your kubectl commands kubectl get pods kubectl … Read more

Minikube with ingress example not working

Here’s what worked for me: minikube start minikube addons enable ingress minikube addons enable ingress-dns Wait until you see the ingress-nginx-controller-XXXX is up and running using Kubectl get pods -n ingress-nginx Create an ingress using the K8s example yaml file Update the service section to point to the NodePort Service that you already created Append … Read more

netstat showing foreign ports as kubernetes:port. What does this mean?

That happens because of the way netstat renders output. It has nothing to do with actual Kubernetes. I have Docker Desktop for Windows and it adds this to the hosts file: # Added by Docker Desktop 192.168.43.196 host.docker.internal 192.168.43.196 gateway.docker.internal # To allow the same kube context to work on the host and the container: … Read more

Kubernetes Readiness probe failed error

For anyone else here, if using helm to manage your deployments, you need to set initialDelaySeconds it in the deployments.yaml template in the /templates folder under livenessProbe. The livenessProbe will force restart your pod if the probe cannot connect, as was happening with mine. It wasn’t giving my application enough time to build.