#Kubernetes Information>>> kubectl cluster-infoKubernetes control plane is running at https://192.168.49.2:8443CoreDNS is running at https://192.168.49.2:8443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy#Minicube Info>>> minikube profile list|----------|-----------|---------|--------------|------|---------|---------|-------|----------------|--------------------||Profile|VM Driver|Runtime|IP|Port|Version|Status|Nodes|Active Profile|Active Kubecontext||----------|-----------|---------|--------------|------|---------|---------|-------|----------------|--------------------||minikube|docker|docker|192.168.49.2|8443|v1.30.0|Running|1|*|*||----------|-----------|---------|--------------|------|---------|---------|-------|----------------|--------------------|#Service Info>>> kubectl get svcNAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S)AGEmyapp LoadBalancer 10.110.151.13 <pending>8080:30306/TCP 3h43m
Pod Information:
#Pod Information>>> kubectl get pods --show-labelsNAME READY STATUS RESTARTS AGE LABELShello-world-pod 1/1 Running 0 169m <none>myapp-865648495b-gsb9z 0/1 CrashLoopBackOff 37 (64s ago)165m app=myapp,pod-template-hash=865648495bmyapp-865648495b-j7hqg 0/1 CrashLoopBackOff 37 (33s ago)165m app=myapp,pod-template-hash=865648495b#Get Single Pod Info>>> kubectl describe pod hello-world-podName: hello-world-podNamespace: myspacePriority: 0Service Account: defaultNode: minikube/192.168.49.2Start Time: Sat, 07 Sep 2024 00:05:05 +0000Labels:<none>Annotations:<none>Status: RunningIP: 10.244.0.8IPs:IP: 10.244.0.8Containers:hello-world-container:Container ID: docker://a5b41e190a297e935a4553ef1f47e7ae7744923eb922588cd5e6576947cc4e03Image: nginx:latestImage ID: docker-pullable://nginx@sha256:04ba374043ccd2fc5c593885c0eacddebabd5ca375f9323666f28dfd5a9710e3Port:<none>Host Port: <none>State: RunningStarted: Sat, 07 Sep 2024 00:05:11 +0000Ready: TrueRestart Count: 0Environment:<none>Mounts:/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-bz7gf (ro)Conditions:Type StatusPodReadyToStartContainers True Initialized True Ready True ContainersReady True PodScheduled True Volumes:kube-api-access-bz7gf:Type: Projected (a volume that contains injected data from multiple sources)TokenExpirationSeconds: 3607ConfigMapName: kube-root-ca.crtConfigMapOptional:<nil>DownwardAPI: trueQoS Class: BestEffortNode-Selectors:<none>Tolerations: node.kubernetes.io/not-ready:NoExecute op=Exists for 300snode.kubernetes.io/unreachable:NoExecute op=Exists for 300sEvents:<none>#Get Single Service>>> kubectl describe service myappName: myappNamespace: myspaceLabels: app=myappAnnotations:<none>Selector: app=myappType: LoadBalancerIP Family Policy: SingleStackIP Families: IPv4IP: 10.110.151.13IPs: 10.110.151.13Port:<unset>8080/TCPTargetPort: 8080/TCPNodePort:<unset>30306/TCPEndpoints:Session Affinity: NoneExternal Traffic Policy: ClusterEvents:<none>#Delete Pod>>> kubectl delete pod myapp-865648495b-jbgg9 myapp-865648495b-ks9kspod"myapp-865648495b-jbgg9" deletedpod"myapp-865648495b-ks9ks" deleted#Delete all bods by label>>> kubectl delete pod -l app=myapp pod"myapp-865648495b-gsb9z" deletedpod"myapp-865648495b-j7hqg" deleted
Namespaces:
#Create New Namespace>>> kubectl create namespace myspacenamespace/myspace created#Enter new namespace>>> kubectl config set-context --current --namespace=myspaceContext"minikube" modified.