sample deployment files for Kubernetes objects
Minikube installation:
Setup:
-
Installing minikube
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube
-
Verifying Minikube installation
minikube version
-
Starting Minikube
minikube start -p minikube-demo --output='text' --nodes 3 --cpus='2' --disk-size='20000mb' --container-runtime='docker' --cni='calico' --cache-images=true --driver='docker' --force-systemd=true --extra-config=kubelet.cgroup-driver=systemd --wait-timeout=6m0s --delete-on-failure=false --kubernetes-version=v1.28.3 --auto-update-drivers=false --force
-
Get pods
minikube kubectl -- get pods -A
-
Minikube status
minikube status
-
Minikube profile list
minikube profile list
-
Current profile
minikube profile
-
Switch profile
minikube profile minikube-demo
-
Minikube status
minikube status
-
Rename worker nodes
minikube kubectl label node minikube-demo-m02 node-role.kubernetes.io/worker=worker
minikube kubectl label node minikube-demo-m03 node-role.kubernetes.io/worker=worker
-
Add worker node role
minikube kubectl label nodes minikube-demo-m02 role=worker
minikube kubectl label nodes minikube-demo-m03 role=worker
-
Apply minikube deployment
minikube kubectl -- apply --filename redis-deployment.yaml
-
Get pod details
minikube kubectl -- get pods -o wide
-
Get pod logs
minikube kubectl -- logs redis-deploy-75d5csssd9-gwbfx
-
describe pod
minikube kubectl -- describe pods