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

How to use NodePort with kind?

Kind cluster configuration needs to be like below apiVersion: kind.x-k8s.io/v1alpha4 kind: Cluster nodes: – role: control-plane extraPortMappings: – containerPort: 30000 hostPort: 30000 listenAddress: “0.0.0.0” # Optional, defaults to “0.0.0.0” protocol: tcp # Optional, defaults to tcp – role: worker This file is then passed to your creation command as kind create cluster –config=config.yaml (according to … Read more

How can I install kubectx on Ubuntu Linux 20.04?

This package contains in deb http://ftp.de.debian.org/debian buster main repo which is not available in ubuntu. First you need to do add this to /etc/apt/sources.list like below #for kubectlx deb [trusted=yes] http://ftp.de.debian.org/debian buster main Then run sudo apt-get update Then you can install using this cmd. sudo apt install kubectx

Is it possible to install curl into busybox in kubernetes pod

The short answer, is you cannot. Why? Because busybox does not have package manager like: yum, apk, or apt-get .. Acutally you have two solutions: 1. Either use a modified busybox You can use other busybox images like progrium/busybox which provides opkg-install as a package manager. image: progrium/busybox Then: kubectl exec -it busybox — opkg-install … Read more

Import data to config map from kubernetes secret

Kubernetes can’t make that substitution for you, you should do it with shell in the entrypoint of the container. This is a working example. I modify the default entrypoint to create a new variable with that substitution. After this command you should add the desired entrypoint. apiVersion: extensions/v1beta1 kind: Deployment metadata: name: app labels: app: … Read more