Forum Navigation
You need to log in to create posts and topics.

kubectl Basic Commands

Kuberenetes Version
kubectl versionQuery the server / client version used
kubectl cluster-infoGet cluster info
kubectl config view

Get configuration info – Abstraction Overview
kubectl get pods

Get Pod Description

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