🦈Kubernetes
Pod Management
# List all pods in the default namespace
kubectl get pods
# Display logs for a specific pod and container
kubectl logs <pod-name> -c <container-name>
# Execute an interactive shell in a specific pod and container
kubectl exec -it <pod-name> -c <container-name> -- /bin/shConfiguration Management
# List all ConfigMaps in the default namespace
kubectl get configmapsNamespace Management
# List all namespaces
kubectl get namespaces
# Switch to a different namespace
kubectl config set-context --current --namespace=<namespace-name>Last updated