kubectl show all namespace code example
Example 1: kubernetes get namespace
# Get Namespaces for current cluster
kubectl get namespaces
Example 2: kubernetes get services
# Get pods in default namespace
kubectl get services
#Get Pods in my-namespace
kubectl get services -n my-namespace
#Get Pods in all namespaces
kubectl get services --all-namespaces