dockerized kubernetes code example

Example 1: kubernetes /bin/bash

sudo kubectl -n <namespace> --context=<context-with-access> exec <pod-name> -it /bin/bash

ex:
sudo kubectl -n default --context=staging-devops exec microservice1-jd830k-880 -it /bin/bash

Example 2: kubernetes dashbaord

kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-beta8/aio/deploy/recommended.yaml

Example 3: errimagepull in kubernetes

sudo docker login

sudo docker image build -t YOUR_DOCKERHUB_USERNAME/your-image-name:0.0.1 .
sudo docker push YOUR_DOCKERHUB_USERNAME/your-image-name:0.0.1

Tags:

Misc Example