Thursday, November 7, 2019

Kubernetes Commands

 Kubernetes Commands


Minikube :

     Steps for Running minikube in console:

            Starting Minikube in console by assigning memory 6G with virtualbox-

            minikube start --vm-driver=virtualbox --memory 6000 

             

             Setting up docker environment-

            minikube docker-env


       To load minikube dashboard in browser-

            minikube dashboard




Kubernetes: 

        When You want to reset your minikube with specific namespace,

    kubectl -n <namespace> delete deployment,pod,svc/secret,rs,jobs,statefulset,daemonset --all


    Get all Namespace & Deleting specific namespace,

        kubectl get namespaces

        kubectl delete namespaces <namespace>


Some Other useful kubernetes commands:

        kubectl run <servicename> --image=<imagename>

        kubectl get pods

        kubectl get services

        kubectl get ep

        kubectl delete svc <service name>

        kubectl apply -f <yaml file name>



Useful Docker commands:

    Create Dockerfile in project's base directory & then run command in command prompt to build the Docker image.

                docker build -t <output imagename> <outputpath>





Home

Mastering Java Interview Questions: Your Comprehensive Guide         If you're preparing for a Java interview or just lookin...