devops33 0.7.0__tar.gz → 0.9.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {devops33-0.7.0 → devops33-0.9.0}/PKG-INFO +1 -1
- {devops33-0.7.0 → devops33-0.9.0}/devops/main.py +285 -27
- {devops33-0.7.0 → devops33-0.9.0}/devops33.egg-info/PKG-INFO +1 -1
- {devops33-0.7.0 → devops33-0.9.0}/pyproject.toml +1 -1
- {devops33-0.7.0 → devops33-0.9.0}/LICENSE +0 -0
- {devops33-0.7.0 → devops33-0.9.0}/README.md +0 -0
- {devops33-0.7.0 → devops33-0.9.0}/devops/__init__.py +0 -0
- {devops33-0.7.0 → devops33-0.9.0}/devops/__main__.py +0 -0
- {devops33-0.7.0 → devops33-0.9.0}/devops33.egg-info/SOURCES.txt +0 -0
- {devops33-0.7.0 → devops33-0.9.0}/devops33.egg-info/dependency_links.txt +0 -0
- {devops33-0.7.0 → devops33-0.9.0}/devops33.egg-info/entry_points.txt +0 -0
- {devops33-0.7.0 → devops33-0.9.0}/devops33.egg-info/top_level.txt +0 -0
- {devops33-0.7.0 → devops33-0.9.0}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: devops33
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.9.0
|
|
4
4
|
Summary: An interactive CLI tool for learning Docker, Git, Prometheus, and Kubernetes commands.
|
|
5
5
|
Author-email: DevOps Assistant <assistant@example.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/example/devops-lab-assistant
|
|
@@ -639,6 +639,23 @@ services:
|
|
|
639
639
|
|
|
640
640
|
ports:
|
|
641
641
|
- "3000:3000"
|
|
642
|
+
nginx:
|
|
643
|
+
image: nginx
|
|
644
|
+
container_name: nginx
|
|
645
|
+
ports:
|
|
646
|
+
- "80:80"
|
|
647
|
+
volumes:
|
|
648
|
+
- ./nginx.conf:/etc/nginx/nginx.conf
|
|
649
|
+
|
|
650
|
+
nginx-exporter:
|
|
651
|
+
image: nginx/nginx-prometheus-exporter
|
|
652
|
+
container_name: nginx-exporter
|
|
653
|
+
command:
|
|
654
|
+
- -nginx.scrape-uri=http://nginx/nginx_status
|
|
655
|
+
ports:
|
|
656
|
+
- "9113:9113";
|
|
657
|
+
depends_on:
|
|
658
|
+
- nginx
|
|
642
659
|
|
|
643
660
|
# =========================================================
|
|
644
661
|
# STEP 10 — SAVE FILE
|
|
@@ -804,37 +821,278 @@ sudo docker compose down
|
|
|
804
821
|
# =========================================================
|
|
805
822
|
|
|
806
823
|
""",
|
|
807
|
-
"Kubernetes": """
|
|
808
|
-
|
|
809
|
-
|
|
824
|
+
"Kubernetes": """Kubernetes Basics Lab — Complete Command Flow (Minikube + kubectl)
|
|
825
|
+
|
|
826
|
+
This is the complete end-to-end Kubernetes lab procedure from installation to shutdown.
|
|
827
|
+
You can directly follow this in your lab exam or share it with your friend.
|
|
828
|
+
|
|
829
|
+
=========================================================
|
|
830
|
+
PHASE 1 — INSTALL REQUIRED PACKAGES
|
|
831
|
+
=========================================================
|
|
832
|
+
Step 1 — Update Ubuntu Packages
|
|
833
|
+
sudo apt update
|
|
834
|
+
Step 2 — Install Basic Dependencies
|
|
835
|
+
sudo apt install curl wget apt-transport-https -y
|
|
836
|
+
|
|
837
|
+
Expected:
|
|
838
|
+
|
|
839
|
+
curl installed
|
|
840
|
+
wget installed
|
|
841
|
+
apt-transport-https installed
|
|
842
|
+
=========================================================
|
|
843
|
+
PHASE 2 — INSTALL kubectl
|
|
844
|
+
=========================================================
|
|
845
|
+
Step 3 — Download kubectl Binary
|
|
846
|
+
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
|
|
847
|
+
|
|
848
|
+
Expected:
|
|
849
|
+
|
|
850
|
+
kubectl binary downloads successfully
|
|
851
|
+
Step 4 — Give Execute Permission
|
|
852
|
+
chmod +x kubectl
|
|
853
|
+
Step 5 — Move kubectl to System Path
|
|
854
|
+
sudo mv kubectl /usr/local/bin/
|
|
855
|
+
Step 6 — Verify kubectl Installation
|
|
856
|
+
kubectl version --client
|
|
857
|
+
|
|
858
|
+
Expected Output:
|
|
859
|
+
|
|
860
|
+
Client Version: v1.xx.x
|
|
861
|
+
=========================================================
|
|
862
|
+
PHASE 3 — INSTALL MINIKUBE
|
|
863
|
+
=========================================================
|
|
864
|
+
Step 7 — Download Minikube
|
|
865
|
+
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
|
|
866
|
+
|
|
867
|
+
Expected:
|
|
868
|
+
|
|
869
|
+
Minikube binary downloads
|
|
870
|
+
Step 8 — Install Minikube
|
|
871
|
+
sudo install minikube-linux-amd64 /usr/local/bin/minikube
|
|
872
|
+
Step 9 — Verify Minikube Installation
|
|
873
|
+
minikube version
|
|
874
|
+
|
|
875
|
+
Expected Output:
|
|
876
|
+
|
|
877
|
+
minikube version: v1.xx.x
|
|
878
|
+
=========================================================
|
|
879
|
+
PHASE 4 — START DOCKER
|
|
880
|
+
=========================================================
|
|
881
|
+
Step 10 — Start Docker Service
|
|
882
|
+
sudo systemctl start docker
|
|
883
|
+
Step 11 — Enable Docker on Boot
|
|
884
|
+
sudo systemctl enable docker
|
|
885
|
+
Step 12 — Verify Docker Status
|
|
886
|
+
sudo systemctl status docker
|
|
887
|
+
|
|
888
|
+
Expected:
|
|
889
|
+
|
|
890
|
+
Docker should show:
|
|
891
|
+
Active: active (running)
|
|
810
892
|
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
893
|
+
Press:
|
|
894
|
+
|
|
895
|
+
Q
|
|
896
|
+
|
|
897
|
+
to exit status screen.
|
|
898
|
+
|
|
899
|
+
=========================================================
|
|
900
|
+
PHASE 5 — START KUBERNETES CLUSTER
|
|
901
|
+
=========================================================
|
|
902
|
+
Step 13 — Start Minikube Cluster
|
|
903
|
+
minikube start --driver=docker
|
|
904
|
+
|
|
905
|
+
Expected:
|
|
906
|
+
|
|
907
|
+
Kubernetes cluster initializes
|
|
908
|
+
Minikube downloads Kubernetes components
|
|
909
|
+
Cluster starts successfully
|
|
910
|
+
|
|
911
|
+
Important Message:
|
|
912
|
+
|
|
913
|
+
Done! kubectl is now configured to use "minikube"
|
|
914
|
+
Step 14 — Verify Cluster Status
|
|
915
|
+
kubectl get nodes
|
|
916
|
+
|
|
917
|
+
Expected Output:
|
|
918
|
+
|
|
919
|
+
NAME STATUS ROLES AGE VERSION
|
|
920
|
+
minikube Ready control-plane ... ...
|
|
921
|
+
=========================================================
|
|
922
|
+
PHASE 6 — CREATE POD
|
|
923
|
+
=========================================================
|
|
924
|
+
Step 15 — Create Nginx Pod
|
|
925
|
+
kubectl run my-nginx --image=nginx
|
|
926
|
+
|
|
927
|
+
Expected:
|
|
928
|
+
|
|
929
|
+
pod/my-nginx created
|
|
930
|
+
Step 16 — Check Pod Status
|
|
931
|
+
kubectl get pods
|
|
932
|
+
|
|
933
|
+
Initially:
|
|
934
|
+
|
|
935
|
+
ContainerCreating
|
|
936
|
+
|
|
937
|
+
Wait few seconds and run again:
|
|
815
938
|
|
|
816
|
-
STEP 2 — POD OPERATIONS
|
|
817
|
-
-----------------------
|
|
818
|
-
kubectl run my-pod --image=nginx
|
|
819
939
|
kubectl get pods
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
940
|
+
|
|
941
|
+
Expected:
|
|
942
|
+
|
|
943
|
+
STATUS = Running
|
|
944
|
+
=========================================================
|
|
945
|
+
PHASE 7 — EXPOSE POD USING NODEPORT
|
|
946
|
+
=========================================================
|
|
947
|
+
Step 17 — Expose Nginx Pod
|
|
948
|
+
kubectl expose pod my-nginx --type=NodePort --port=80
|
|
949
|
+
|
|
950
|
+
Expected:
|
|
951
|
+
|
|
952
|
+
service/my-nginx exposed
|
|
953
|
+
Step 18 — View Services
|
|
954
|
+
kubectl get services
|
|
955
|
+
|
|
956
|
+
Expected:
|
|
957
|
+
|
|
958
|
+
NodePort service visible
|
|
959
|
+
|
|
960
|
+
Example:
|
|
961
|
+
|
|
962
|
+
my-nginx NodePort 80:31261/TCP
|
|
963
|
+
Step 19 — Get Browser Access URL
|
|
964
|
+
minikube service my-nginx --url
|
|
965
|
+
|
|
966
|
+
Expected:
|
|
967
|
+
|
|
968
|
+
http://192.xxx.xx.xx:xxxxx
|
|
969
|
+
|
|
970
|
+
Open that URL in browser.
|
|
971
|
+
|
|
972
|
+
Expected:
|
|
973
|
+
|
|
974
|
+
Nginx welcome page appears
|
|
975
|
+
=========================================================
|
|
976
|
+
PHASE 8 — CREATE DEPLOYMENT
|
|
977
|
+
=========================================================
|
|
978
|
+
Step 20 — Create Deployment with 2 Replicas
|
|
979
|
+
kubectl create deployment my-dep --image=nginx --replicas=2
|
|
980
|
+
|
|
981
|
+
Expected:
|
|
982
|
+
|
|
983
|
+
deployment.apps/my-dep created
|
|
984
|
+
Step 21 — Verify Deployment
|
|
985
|
+
kubectl get deployments
|
|
986
|
+
|
|
987
|
+
Expected:
|
|
988
|
+
|
|
989
|
+
READY 2/2
|
|
990
|
+
Step 22 — Verify Pods
|
|
991
|
+
kubectl get pods
|
|
992
|
+
|
|
993
|
+
Expected:
|
|
994
|
+
|
|
995
|
+
2 deployment pods running
|
|
996
|
+
1 nginx pod running
|
|
997
|
+
=========================================================
|
|
998
|
+
PHASE 9 — SCALE DEPLOYMENT
|
|
999
|
+
=========================================================
|
|
1000
|
+
Step 23 — Scale Deployment to 5 Replicas
|
|
1001
|
+
kubectl scale deployment my-dep --replicas=5
|
|
1002
|
+
|
|
1003
|
+
Expected:
|
|
1004
|
+
|
|
1005
|
+
deployment.apps/my-dep scaled
|
|
1006
|
+
Step 24 — Verify Scaling
|
|
1007
|
+
kubectl get pods
|
|
1008
|
+
|
|
1009
|
+
Expected:
|
|
1010
|
+
|
|
1011
|
+
Total 5 deployment pods running
|
|
1012
|
+
=========================================================
|
|
1013
|
+
PHASE 10 — VIEW ALL RESOURCES
|
|
1014
|
+
=========================================================
|
|
1015
|
+
Step 25 — Display Complete Cluster Resources
|
|
1016
|
+
kubectl get all
|
|
1017
|
+
|
|
1018
|
+
Expected:
|
|
1019
|
+
|
|
1020
|
+
Pods
|
|
1021
|
+
Services
|
|
1022
|
+
Deployments
|
|
1023
|
+
ReplicaSets
|
|
1024
|
+
|
|
1025
|
+
all visible
|
|
1026
|
+
|
|
1027
|
+
=========================================================
|
|
1028
|
+
PHASE 11 — OPEN KUBERNETES DASHBOARD
|
|
1029
|
+
=========================================================
|
|
1030
|
+
Step 26 — Launch Dashboard
|
|
1031
|
+
minikube dashboard
|
|
1032
|
+
|
|
1033
|
+
Expected:
|
|
1034
|
+
|
|
1035
|
+
Dashboard opens automatically in browser
|
|
1036
|
+
=========================================================
|
|
1037
|
+
OPTIONAL COMMANDS
|
|
1038
|
+
=========================================================
|
|
1039
|
+
View Logs
|
|
1040
|
+
kubectl logs my-nginx
|
|
1041
|
+
Describe Pod
|
|
1042
|
+
kubectl describe pod my-nginx
|
|
1043
|
+
List Nodes
|
|
1044
|
+
kubectl get nodes
|
|
1045
|
+
List Everything
|
|
1046
|
+
kubectl get all
|
|
1047
|
+
=========================================================
|
|
1048
|
+
PHASE 12 — CLEANUP
|
|
1049
|
+
=========================================================
|
|
1050
|
+
Step 27 — Delete Service
|
|
1051
|
+
kubectl delete service my-nginx
|
|
1052
|
+
Step 28 — Delete Deployment
|
|
1053
|
+
kubectl delete deployment my-dep
|
|
1054
|
+
Step 29 — Delete Pod
|
|
1055
|
+
kubectl delete pod my-nginx
|
|
1056
|
+
Step 30 — Verify Cleanup
|
|
1057
|
+
kubectl get all
|
|
1058
|
+
|
|
1059
|
+
Expected:
|
|
1060
|
+
|
|
1061
|
+
No deployment
|
|
1062
|
+
No nginx pod
|
|
1063
|
+
=========================================================
|
|
1064
|
+
PHASE 13 — STOP MINIKUBE
|
|
1065
|
+
=========================================================
|
|
1066
|
+
Step 31 — Stop Kubernetes Cluster
|
|
837
1067
|
minikube stop
|
|
1068
|
+
|
|
1069
|
+
Expected:
|
|
1070
|
+
|
|
1071
|
+
Stopped "minikube"
|
|
1072
|
+
=========================================================
|
|
1073
|
+
FINAL LAB OUTCOME
|
|
1074
|
+
=========================================================
|
|
1075
|
+
|
|
1076
|
+
IMPORTANT VIVA QUESTIONS
|
|
1077
|
+
1. What is kubectl?
|
|
1078
|
+
|
|
1079
|
+
kubectl is the command-line tool used to communicate with Kubernetes clusters.
|
|
1080
|
+
|
|
1081
|
+
2. What is Minikube?
|
|
1082
|
+
|
|
1083
|
+
Minikube is a local single-node Kubernetes cluster used for learning and testing.
|
|
1084
|
+
|
|
1085
|
+
3. Difference between Pod and Deployment?
|
|
1086
|
+
Pod Deployment
|
|
1087
|
+
Runs single container/app Manages multiple Pods
|
|
1088
|
+
No auto-healing Supports auto-healing
|
|
1089
|
+
Manual scaling Automatic scaling
|
|
1090
|
+
4. What is NodePort?
|
|
1091
|
+
|
|
1092
|
+
NodePort exposes a Kubernetes service externally using a port on the node.
|
|
1093
|
+
|
|
1094
|
+
5. Which command scales applications?
|
|
1095
|
+
kubectl scale de
|
|
838
1096
|
"""
|
|
839
1097
|
}
|
|
840
1098
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: devops33
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.9.0
|
|
4
4
|
Summary: An interactive CLI tool for learning Docker, Git, Prometheus, and Kubernetes commands.
|
|
5
5
|
Author-email: DevOps Assistant <assistant@example.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/example/devops-lab-assistant
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|