kubectl: get specific value from a secret in plaintext
Try this kubectl get secret foo –template={{.data.bar}} | base64 –decode No need of jq.
Try this kubectl get secret foo –template={{.data.bar}} | base64 –decode No need of jq.
In Kubernetes 1.24, ServiceAccount token secrets are no longer automatically generated. See “Urgent Upgrade Notes” in the 1.24 changelog file: The LegacyServiceAccountTokenNoAutoGeneration feature gate is beta, and enabled by default. When enabled, Secret API objects containing service account tokens are no longer auto-generated for every ServiceAccount. Use the TokenRequest API to acquire service account tokens, … Read more
CHECK WITHOUT METRICS SERVER or ANY THIRD PARTY TOOL If you want to check pods cpu/memory usage without installing any third party tool then you can get memory and cpu usage of pod from cgroup. Go to pod’s exec mode kubectl exec -it pod_name -n namespace — /bin/bash Run cat /sys/fs/cgroup/cpu/cpuacct.usage for cpu usage Run … Read more
You can just download the previous version binary and replace the one you have now. Linux: curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.5.2/bin/linux/amd64/kubectl chmod +x ./kubectl sudo mv ./kubectl /usr/local/bin/kubectl macOS: curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.5.2/bin/darwin/amd64/kubectl chmod +x ./kubectl sudo mv ./kubectl /usr/local/bin/kubectl Windows: curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.5.2/bin/windows/amd64/kubectl.exe And add it to PATH. If not follow instructions for other Operating Systems here: … Read more
You can just use kubectl get pod <your pod name> -w whenever any update/change/delete happen to the pod, you will see the update. You can also use watch -n 1 kubectl get pod <your pod name> This will continuously run kubectl get pod … with 1 seconds interval. So, you will see latest state.