Monday 27 December 2021

kubernetes commands

Kubernetes command

1)minikube start --vm-driver=hyperkit  : Will start one node cluster on virtual machine.

2)minikube status : toc check the status of the cluster.

Note: Minikube is just for starting and deleting the cluster specific stuff whereas kubectl is another client which is basically used to interact with cluster and used to perform different task like create deployment etc.

3)kubectl get pod: to list the pods created.

4)kubectl get services: list all the created servces.

5)kubectl get nodes: list all the nodes in clsuter.

6)kubectl create deployment deploymnet1 --image=nginx : create deployment for nginx image wherein the image will be pulled from docker hub.

7)kubectl get deployment :: will list the deployment details.

8)kubectl get replicaset:: will list how many replica set are created for each deployment .

9)kubectl edit deployment :: to edit deployment file.

10)kubectl logs pod-name :

11)kubectl describe pod pod-name:

12)

No comments:

Post a Comment