Skip to content

Instantly share code, notes, and snippets.

@desaijay315
Created August 30, 2021 13:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save desaijay315/8747060b978e56228ff249ace2ffe2bd to your computer and use it in GitHub Desktop.
Save desaijay315/8747060b978e56228ff249ace2ffe2bd to your computer and use it in GitHub Desktop.
533 minikube status
534 kubectl version
535 kubectl get nodes
536 kubectl api-resources
537 kubectl api-versions
538 clear
539 kubectl get pods
540 kubectl get deployments
541 kubectl run nginx --image=nginx
542 kubectl get pods
543 kubectl get pods -w
544 kubectl get pods
545 kubectl describe pod nginx
546 clear
547 kubectl get pods
548 kubectl expose pod nginx --port 80 --type NodePort
549 kubectl get svc
550 minikube ip
551 curl http://192.168.64.21:32420
552 history
553 kubectl get svc
554 kubectl run -it --rm debug --image=busybox:1.27 -- /bin/bash
555 ls
556 kubectl get pods
557 kubectl run -it --rm debug --image=busybox:1.27 -- /bin/bash
558 kubectl run -it --rm debug --image=busybox:1.27 -- /bin/sh
559 kubectl get pods
560 kubectl delete pods debug
561 kubectl run -it --rm debug --image=busybox:1.27 -- /bin/sh
562 kubectl get pods
563 clear
564 kubectl get pods
565 kubectl delete pods nginx
566 kubectl get pods
567 kubectl create deployment nginx --image=nginx
568 kubectl get pods
569 curl http://192.168.64.21:32420
570 curl http://192.168.64.21:32420
571 kubectl scale deployment nginx --replicas 4
572 kubectl get pods
573 kubectl get pods
574 kubectl get pods
575 kubectl get pods -w
576 kubectl get pods
577 kubectl scale deployment nginx --replicas 2
578 kubectl get pods
579 kubectl get pods
580 kubectl delete pods v
581 kubectl delete pods nginx-6799fc88d8-2hv8j
582 kubectl get pods
583 kubectl delete pods nginx-6799fc88d8-7q7nc
584 kubectl get pods
585 clear
586 kubectl get deployment
587 kubectl get replicaset
588 kubectl get pod
589 kubectl edit deployment nginx
590 kubectl get deployment
591 kubectl get replicaset
592 kubectl get pods
593 kubectl get pods
594 kubectl get pods --show-labels
595 kubectl edit deployment nginx
596 kubectl get replicaset
597 kubectl get pods
598 kubectl get pods
599 kubectl get pods -l covid=sucks
600 kubectl get pods
601 kubectl get pods --show-labels
602 kubectl label pods nginx-599497c58f-csscx covid=getyourshot --overwrite
603 kubectl get pods --show-labels
604 kubectl get pods --show-labels
605 kubectl get pods
606 kubectl label pods nginx-599497c58f-csscx app=nocovid --overwrite
607 kubectl get pods --show-labels
608 kubectl get pods --show-labels
609 clear
610 kubectl get svc
611 kubectl get endpoints
612 kubectl edit svc nginx
613 kubectl get endpoints
614 kubectl get pods -l app=nginx
615 kubectl get pods -l app=nginx -o wide
616 kubectl scale deployment nginx --replicas 3
617 kubectl get pods -l app=nginx -o wide
618 kubectl get pods -l app=nginx -o wide
619 kubectl get pods -l app=nginx -o wide
620 kubectl get pods -l app=nginx -o wide
621 kubectl get pods -l app=nginx -o wide
622 kubectl get pods -l app=nginx -o wide
623 kubectl get pods -l app=nginx -o wide
624 kubectl get pods -l app=nginx -o wide
625 kubectl get pods -l app=nginx -o wide -w
626 kubectl get endpoints
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment