Difference between revisions of "Kubectl get namespaces"
Jump to navigation
Jump to search
(19 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | {{lowercase}} | ||
+ | * <code>[[kubectl get]] [[namespaces]]</code> | ||
+ | * <code>[[kubectl get]] [[ns]] -o=name</code> | ||
+ | * <code>[[kubectl get pods -A]] | cut -d" " -f1 | grep -v NAMESPACE | sort | uniq | wc -l</code> | ||
+ | |||
+ | kubectl get ns --no-headers -o custom-columns=":metadata.name" | ||
+ | |||
+ | == EKS == | ||
[[kubectl get]] namespaces | [[kubectl get]] namespaces | ||
+ | NAME STATUS AGE | ||
+ | default Active 44h | ||
+ | [[kube-node-lease]] Active 44h | ||
+ | [[kube-public]] Active 44h | ||
+ | [[kube-system]] Active 44h | ||
+ | |||
+ | == EKS + [[Kots]] == | ||
+ | NAME STATUS AGE | ||
+ | default Active 28d | ||
+ | yourapp-kots Active 28d | ||
+ | kube-node-lease Active 28d | ||
+ | kube-public Active 28d | ||
+ | kube-system Active 28d | ||
== [[Minikube]] == | == [[Minikube]] == | ||
Line 9: | Line 30: | ||
[[kube-system]] Active 3d21h | [[kube-system]] Active 3d21h | ||
[[kubernetes-dashboard]] Active 3d21h | [[kubernetes-dashboard]] Active 3d21h | ||
+ | |||
+ | == [[AKS]] == | ||
+ | [[app-routing-system]] | ||
+ | |||
+ | == [[Rancher]] == | ||
+ | [[kubectl get ns]] | grep [[cattle]] | ||
+ | cattle-dashboards Active 7d7h | ||
+ | cattle-fleet-system Active 7d20h | ||
+ | [[cattle-impersonation-system]] Active 7d20h | ||
+ | cattle-monitoring-system Active 4h33m | ||
+ | [[cattle-system]] Active 7d20h | ||
Line 22: | Line 54: | ||
== Related == | == Related == | ||
− | * [[ | + | * <code>[[kubectl get all --all-namespaces]]</code> |
+ | * <code>[[kubectl create namespace]]</code> | ||
== See also == | == See also == | ||
* {{kubectl get}} | * {{kubectl get}} | ||
− | * {{ | + | * {{Namespace}} |
[[Category:Kubernetes]] | [[Category:Kubernetes]] |
Latest revision as of 06:32, 23 July 2024
kubectl get namespaces
kubectl get ns -o=name
kubectl get pods -A | cut -d" " -f1 | grep -v NAMESPACE | sort | uniq | wc -l
kubectl get ns --no-headers -o custom-columns=":metadata.name"
Contents
EKS[edit]
kubectl get namespaces NAME STATUS AGE default Active 44h kube-node-lease Active 44h kube-public Active 44h kube-system Active 44h
EKS + Kots[edit]
NAME STATUS AGE default Active 28d yourapp-kots Active 28d kube-node-lease Active 28d kube-public Active 28d kube-system Active 28d
Minikube[edit]
kubectl get namespaces NAME STATUS AGE default Active 3d21h kube-node-lease Active 3d21h kube-public Active 3d21h kube-system Active 3d21h kubernetes-dashboard Active 3d21h
AKS[edit]
app-routing-system
Rancher[edit]
kubectl get ns | grep cattle cattle-dashboards Active 7d7h cattle-fleet-system Active 7d20h cattle-impersonation-system Active 7d20h cattle-monitoring-system Active 4h33m cattle-system Active 7d20h
kubectl get namespaces NAME STATUS AGE default Active 24h kube-node-lease Active 24h kube-public Active 24h kube-system Active 24h
kubectl delete namespaces --all
Related[edit]
See also[edit]
kubectl get
: [all
|componentstatus | pods | apiservices | events
|event
|nodes
|replicaset
|services
|svc
|namespaces
|hpa
|secret | deployments | serviceaccounts | endpoints | daemonset | networkpolicy
],kubectl get -h
- Kubernetes namespaces:
kubectl get namespaces
,kube-system namespace
,--namespace
Advertising: