kubectl get all
Jump to navigation
Jump to search
kubectl get all -A kubectl get all -n your-namespace kubectl get all --all-namespaces kubectl get all kubectl get all | grep replicaset.apps
statefulset.apps, replicaset.apps, deployment.apps, service/, pod, job.batch, cronjob.batch, daemonset.apps, ClusterIP, NodePort
Contents
Examples[edit]
kubectl get all NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE service/kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 6m40s
kubectl get all NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE service/kubernetes ClusterIP 10.100.0.1 <none> 443/TCP 22d
kubectl get all --all-namespaces
kubectl get all NAME READY STATUS RESTARTS AGE pod/metrics-server-6467f65c76-kfkkl 1/1 Running 0 2d4h pod/my-release-kubernetes-dashboard-5bf6f9f78-phkvz 1/1 Running 0 2d3h NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE service/kubernetes ClusterIP 172.20.0.1 <none> 443/TCP 2d22h service/metrics-server ClusterIP 172.20.94.132 <none> 443/TCP 2d4h service/my-release-kubernetes-dashboard ClusterIP 172.20.8.159 <none> 443/TCP 2d3h NAME READY UP-TO-DATE AVAILABLE AGE deployment.apps/metrics-server 1/1 1 1 2d4h deployment.apps/my-release-kubernetes-dashboard 1/1 1 1 2d3h NAME DESIRED CURRENT READY AGE replicaset.apps/metrics-server-6467f65c76 1 1 1 2d4h replicaset.apps/my-release-kubernetes-dashboard-5bf6f9f78 1 1 1 2d3h<
kubectl get all NAME READY STATUS RESTARTS AGE pod/grafana-6d966d974b-7cc5f 0/1 Evicted 0 109m pod/grafana-6d966d974b-8hpw6 0/1 Pending 0 109m pod/grafana-6d966d974b-8s29j 0/1 Evicted 0 109m pod/grafana-6d966d974b-9pn6p 0/1 Evicted 0 3h31m pod/grafana-6d966d974b-k8rz5 0/1 Evicted 0 109m pod/grafana-6d966d974b-q8j9w 0/1 Evicted 0 167m pod/grafana-6d966d974b-scgkn 0/1 Evicted 0 109m pod/grafana-6d966d974b-wmvcg 0/1 Evicted 0 109m pod/grafana-6d966d974b-xjw86 0/1 Evicted 0 109m pod/grafana-6d966d974b-xsvv4 0/1 Evicted 0 109m NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE service/grafana ClusterIP 10.100.234.190 <none> 80/TCP 3h31m service/kubernetes ClusterIP 10.100.0.1 <none> 443/TCP 3h57m NAME READY UP-TO-DATE AVAILABLE AGE deployment.apps/grafana 0/1 1 0 3h31m NAME DESIRED CURRENT READY AGE replicaset.apps/grafana-6d966d974b 1 1 0 3h31m
kubectl get all
The connection to the server localhost:8080 was refused - did you specify the right host or port?
Solution: Have you created your Kubernetes cluster kubeadm init
?
kubectl get all -n tl-tool-dev No resources found in tl-tool-dev namespace
kubectl get all -n karpenter
Activities[edit]
- List all resources:
kubectl api-resources --verbs=list --namespaced -o name | xargs -n 1 kubectl get --ignore-not-found --show-kind -n your-namespace
Related[edit]
kubectl get namespaces
kubectl cluster-info
helm show values
kube-dump ns
- kubectl describe all -A
- Kubernetes info
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
k8s.io, kubectl api-versions, kubernetes.io, networking.k8s.io, scheduling.k8s.io/v1, apiextensions.k8s.io, k8s.io/cluster-autoscaler/, rbac.authorization.k8s.io/v1, authentication.k8s.io, storage.k8s.io, metrics.k8s.io, discovery.k8s.io, csi.k8s.io, registry.k8s.io, pkgs.k8s.io, apiserver.k8s.io, audit.k8s.io, admissionregistration.k8s.io
Advertising: