kubectl Basic Commands
Quote from moshe on 15/10/2020, 10:00 amKuberenetes Version
kubectl versionQuery the server / client version used
kubectl cluster-infoGet cluster info
kubectl config viewGet configuration info – Abstraction Overview
kubectl get podsGet Pod Descriptionkubectl describe pod <pod name>
List replication controllers
kubectl get rc
Delete All Namespace
kubectl delete –all namespacesDelete All Pods
kubectl delete daemonsets,replicasets,services,deployments,pods,rc –allConfigMaps – Save content of Config Maps to file in json format
kubectl get cm my-configmap -o jsonpath='{.data.my\.file\.json}’ConfigMap – Dump contents of CM
kubectl get cm fluentd-config–n kube-system -o yaml
kubectl versionQuery the server / client version used
kubectl cluster-infoGet cluster info
kubectl config view
Get configuration info – Abstraction Overview
kubectl get pods
kubectl describe pod <pod name>
List replication controllers
kubectl get rc
Delete All Namespace
kubectl delete –all namespaces
Delete All Pods
kubectl delete daemonsets,replicasets,services,deployments,pods,rc –all
ConfigMaps – Save content of Config Maps to file in json format
kubectl get cm my-configmap -o jsonpath='{.data.my\.file\.json}’
ConfigMap – Dump contents of CM
kubectl get cm fluentd-config–n kube-system -o yaml