🕷️ Crawler Inspector

URL Lookup

Direct Parameter Lookup

Raw Queries and Responses

1. Shard Calculation

Query:
Response:
Calculated Shard: 146 (from laksa000)

2. Crawled Status Check

Query:
Response:

3. Robots.txt Check

Query:
Response:

4. Spam/Ban Check

Query:
Response:

5. Seen Status Check

ℹ️ Skipped - page is already crawled

📄
INDEXABLE
CRAWLED
1 hour ago
🤖
ROBOTS ALLOWED

Page Info Filters

FilterStatusConditionDetails
HTTP statusPASSdownload_http_code = 200HTTP 200
Age cutoffPASSdownload_stamp > now() - 6 MONTH0 months ago
History dropPASSisNull(history_drop_reason)No drop reason
Spam/banPASSfh_dont_index != 1 AND ml_spam_score = 0ml_spam_score=0
CanonicalPASSmeta_canonical IS NULL OR = '' OR = src_unparsedNot set

Page Details

PropertyValue
URLhttps://kubernetes.io/docs/reference/kubectl/
Last Crawled2026-04-12 11:33:43 (1 hour ago)
First Indexed2018-05-08 15:06:14 (7 years ago)
HTTP Status Code200
Meta TitleCommand line tool (kubectl) | Kubernetes
Meta DescriptionProduction-Grade Container Orchestration
Meta Canonicalnull
Boilerpipe Text
Kubernetes provides a command line tool for communicating with a Kubernetes cluster's control plane , using the Kubernetes API. This tool is named kubectl . For configuration, kubectl looks for a file named config in the $HOME/.kube directory. You can specify other kubeconfig files by setting the KUBECONFIG environment variable or by setting the --kubeconfig flag. This overview covers kubectl syntax, describes the command operations, and provides common examples. For details about each command, including all the supported flags and subcommands, see the kubectl reference documentation. For a overview, see The kubectl command-line tool . For installation instructions, see Installing kubectl ; for a quick guide, see the cheat sheet . If you're used to using the docker command-line tool, kubectl for Docker Users explains some equivalent commands for Kubernetes. Syntax Use the following syntax to run kubectl commands from your terminal window: kubectl [ command ] [ TYPE ] [ NAME ] [ flags ] where command , TYPE , NAME , and flags are: command : Specifies the operation that you want to perform on one or more resources, for example create , get , describe , delete . TYPE : Specifies the resource type . Resource types are case-insensitive and you can specify the singular, plural, or abbreviated forms. For example, the following commands produce the same output: kubectl get pod pod1 kubectl get pods pod1 kubectl get po pod1 NAME : Specifies the name of the resource. Names are case-sensitive. If the name is omitted, details for all resources are displayed, for example kubectl get pods . When performing an operation on multiple resources, you can specify each resource by type and name or specify one or more files: To specify resources by type and name: To group resources if they are all the same type: TYPE1 name1 name2 name<#> . Example: kubectl get pod example-pod1 example-pod2 To specify multiple resource types individually: TYPE1/name1 TYPE1/name2 TYPE2/name3 TYPE<#>/name<#> . Example: kubectl get pod/example-pod1 replicationcontroller/example-rc1 To specify resources with one or more files: -f file1 -f file2 -f file<#> Use YAML rather than JSON since YAML tends to be more user-friendly, especially for configuration files. Example: kubectl get -f ./pod.yaml flags : Specifies optional flags. For example, you can use the -s or --server flags to specify the address and port of the Kubernetes API server. Caution: Flags that you specify from the command line override default values and any corresponding environment variables. If you need help, run kubectl help from the terminal window. In-cluster authentication and namespace overrides By default kubectl will first determine if it is running within a pod, and thus in a cluster. It starts by checking for the KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT environment variables and the existence of a service account token file at /var/run/secrets/kubernetes.io/serviceaccount/token . If all three are found in-cluster authentication is assumed. To maintain backwards compatibility, if the POD_NAMESPACE environment variable is set during in-cluster authentication it will override the default namespace from the service account token. Any manifests or tools relying on namespace defaulting will be affected by this. POD_NAMESPACE environment variable If the POD_NAMESPACE environment variable is set, cli operations on namespaced resources will default to the variable value. For example, if the variable is set to seattle , kubectl get pods would return pods in the seattle namespace. This is because pods are a namespaced resource, and no namespace was provided in the command. Review the output of kubectl api-resources to determine if a resource is namespaced. Explicit use of --namespace <value> overrides this behavior. How kubectl handles ServiceAccount tokens If: there is Kubernetes service account token file mounted at /var/run/secrets/kubernetes.io/serviceaccount/token , and the KUBERNETES_SERVICE_HOST environment variable is set, and the KUBERNETES_SERVICE_PORT environment variable is set, and you don't explicitly specify a namespace on the kubectl command line then kubectl assumes it is running in your cluster. The kubectl tool looks up the namespace of that ServiceAccount (this is the same as the namespace of the Pod) and acts against that namespace. This is different from what happens outside of a cluster; when kubectl runs outside a cluster and you don't specify a namespace, the kubectl command acts against the namespace set for the current context in your client configuration. To change the default namespace for your kubectl you can use the following command: kubectl config set-context --current --namespace = <namespace-name> Operations The following table includes short descriptions and the general syntax for all of the kubectl operations: Operation Syntax Description alpha kubectl alpha SUBCOMMAND [flags] List the available commands that correspond to alpha features, which are not enabled in Kubernetes clusters by default. annotate kubectl annotate (-f FILENAME | TYPE NAME | TYPE/NAME) KEY_1=VAL_1 ... KEY_N=VAL_N [--overwrite] [--all] [--resource-version=version] [flags] Add or update the annotations of one or more resources. api-resources kubectl api-resources [flags] List the API resources that are available. api-versions kubectl api-versions [flags] List the API versions that are available. apply kubectl apply -f FILENAME [flags] Apply a configuration change to a resource from a file or stdin. attach kubectl attach POD -c CONTAINER [-i] [-t] [flags] Attach to a running container either to view the output stream or interact with the container (stdin). auth kubectl auth [flags] [options] Inspect authorization. autoscale kubectl autoscale (-f FILENAME | TYPE NAME | TYPE/NAME) [--min=MINPODS] --max=MAXPODS [--cpu=CPU] [flags] Automatically scale the set of pods that are managed by a replication controller. certificate kubectl certificate SUBCOMMAND [options] Modify certificate resources. cluster-info kubectl cluster-info [flags] Display endpoint information about the master and services in the cluster. completion kubectl completion SHELL [options] Output shell completion code for the specified shell (bash or zsh). config kubectl config SUBCOMMAND [flags] Modifies kubeconfig files. See the individual subcommands for details. convert kubectl convert -f FILENAME [options] Convert config files between different API versions. Both YAML and JSON formats are accepted. Note - requires kubectl-convert plugin to be installed. cordon kubectl cordon NODE [options] Mark node as unschedulable. cp kubectl cp <file-spec-src> <file-spec-dest> [options] Copy files and directories to and from containers. create kubectl create -f FILENAME [flags] Create one or more resources from a file or stdin. delete kubectl delete (-f FILENAME | TYPE [NAME | /NAME | -l label | --all]) [flags] Delete resources either from a file, stdin, or specifying label selectors, names, resource selectors, or resources. describe kubectl describe (-f FILENAME | TYPE [NAME_PREFIX | /NAME | -l label]) [flags] Display the detailed state of one or more resources. diff kubectl diff -f FILENAME [flags] Diff file or stdin against live configuration. drain kubectl drain NODE [options] Drain node in preparation for maintenance. edit kubectl edit (-f FILENAME | TYPE NAME | TYPE/NAME) [flags] Edit and update the definition of one or more resources on the server by using the default editor. events kubectl events List events exec kubectl exec POD [-c CONTAINER] [-i] [-t] [flags] [-- COMMAND [args...]] Execute a command against a container in a pod. explain kubectl explain TYPE [--recursive=false] [flags] Get documentation of various resources. For instance pods, nodes, services, etc. expose kubectl expose (-f FILENAME | TYPE NAME | TYPE/NAME) [--port=port] [--protocol=TCP|UDP] [--target-port=number-or-name] [--name=name] [--external-ip=external-ip-of-service] [--type=type] [flags] Expose a replication controller, service, or pod as a new Kubernetes service. get kubectl get (-f FILENAME | TYPE [NAME | /NAME | -l label]) [--watch] [--sort-by=FIELD] [[-o | --output]=OUTPUT_FORMAT] [flags] List one or more resources. kustomize kubectl kustomize <dir> [flags] [options] List a set of API resources generated from instructions in a kustomization.yaml file. The argument must be the path to the directory containing the file, or a git repository URL with a path suffix specifying same with respect to the repository root. label kubectl label (-f FILENAME | TYPE NAME | TYPE/NAME) KEY_1=VAL_1 ... KEY_N=VAL_N [--overwrite] [--all] [--resource-version=version] [flags] Add or update the labels of one or more resources. logs kubectl logs POD [-c CONTAINER] [--follow] [flags] Print the logs for a container in a pod. options kubectl options List of global command-line options, which apply to all commands. patch kubectl patch (-f FILENAME | TYPE NAME | TYPE/NAME) --patch PATCH [flags] Update one or more fields of a resource by using the strategic merge patch process. plugin kubectl plugin [flags] [options] Provides utilities for interacting with plugins. port-forward kubectl port-forward POD [LOCAL_PORT:]REMOTE_PORT [...[LOCAL_PORT_N:]REMOTE_PORT_N] [flags] Forward one or more local ports to a pod. proxy kubectl proxy [--port=PORT] [--www=static-dir] [--www-prefix=prefix] [--api-prefix=prefix] [flags] Run a proxy to the Kubernetes API server. replace kubectl replace -f FILENAME Replace a resource from a file or stdin. rollout kubectl rollout SUBCOMMAND [options] Manage the rollout of a resource. Valid resource types include: deployments, daemonsets and statefulsets. run kubectl run NAME --image=image [--env="key=value"] [--port=port] [--dry-run=server|client|none] [--overrides=inline-json] [flags] Run a specified image on the cluster. scale kubectl scale (-f FILENAME | TYPE NAME | TYPE/NAME) --replicas=COUNT [--resource-version=version] [--current-replicas=count] [flags] Update the size of the specified replication controller. set kubectl set SUBCOMMAND [options] Configure application resources. taint kubectl taint NODE NAME KEY_1=VAL_1:TAINT_EFFECT_1 ... KEY_N=VAL_N:TAINT_EFFECT_N [options] Update the taints on one or more nodes. top kubectl top (POD | NODE) [flags] [options] Display Resource (CPU/Memory/Storage) usage of pod or node. uncordon kubectl uncordon NODE [options] Mark node as schedulable. version kubectl version [--client] [flags] Display the Kubernetes version running on the client and server. wait kubectl wait ([-f FILENAME] | resource.group/resource.name | resource.group [(-l label | --all)]) [--for=delete|--for condition=available] [options] Experimental: Wait for a specific condition on one or many resources. To learn more about command operations, see the kubectl reference documentation. Resource types The following table includes a list of all the supported resource types and their abbreviated aliases. (This output can be retrieved from kubectl api-resources , and was accurate as of Kubernetes 1.25.0) NAME SHORTNAMES APIVERSION NAMESPACED KIND bindings v1 true Binding componentstatuses cs v1 false ComponentStatus configmaps cm v1 true ConfigMap endpoints ep v1 true Endpoints events ev v1 true Event limitranges limits v1 true LimitRange namespaces ns v1 false Namespace nodes no v1 false Node persistentvolumeclaims pvc v1 true PersistentVolumeClaim persistentvolumes pv v1 false PersistentVolume pods po v1 true Pod podtemplates v1 true PodTemplate replicationcontrollers rc v1 true ReplicationController resourcequotas quota v1 true ResourceQuota secrets v1 true Secret serviceaccounts sa v1 true ServiceAccount services svc v1 true Service mutatingwebhookconfigurations admissionregistration.k8s.io/v1 false MutatingWebhookConfiguration validatingwebhookconfigurations admissionregistration.k8s.io/v1 false ValidatingWebhookConfiguration customresourcedefinitions crd,crds apiextensions.k8s.io/v1 false CustomResourceDefinition apiservices apiregistration.k8s.io/v1 false APIService controllerrevisions apps/v1 true ControllerRevision daemonsets ds apps/v1 true DaemonSet deployments deploy apps/v1 true Deployment replicasets rs apps/v1 true ReplicaSet statefulsets sts apps/v1 true StatefulSet tokenreviews authentication.k8s.io/v1 false TokenReview localsubjectaccessreviews authorization.k8s.io/v1 true LocalSubjectAccessReview selfsubjectaccessreviews authorization.k8s.io/v1 false SelfSubjectAccessReview selfsubjectrulesreviews authorization.k8s.io/v1 false SelfSubjectRulesReview subjectaccessreviews authorization.k8s.io/v1 false SubjectAccessReview horizontalpodautoscalers hpa autoscaling/v2 true HorizontalPodAutoscaler cronjobs cj batch/v1 true CronJob jobs batch/v1 true Job certificatesigningrequests csr certificates.k8s.io/v1 false CertificateSigningRequest leases coordination.k8s.io/v1 true Lease endpointslices discovery.k8s.io/v1 true EndpointSlice events ev events.k8s.io/v1 true Event flowschemas flowcontrol.apiserver.k8s.io/v1beta2 false FlowSchema prioritylevelconfigurations flowcontrol.apiserver.k8s.io/v1beta2 false PriorityLevelConfiguration ingressclasses networking.k8s.io/v1 false IngressClass ingresses ing networking.k8s.io/v1 true Ingress networkpolicies netpol networking.k8s.io/v1 true NetworkPolicy runtimeclasses node.k8s.io/v1 false RuntimeClass poddisruptionbudgets pdb policy/v1 true PodDisruptionBudget podsecuritypolicies psp policy/v1beta1 false PodSecurityPolicy clusterrolebindings rbac.authorization.k8s.io/v1 false ClusterRoleBinding clusterroles rbac.authorization.k8s.io/v1 false ClusterRole rolebindings rbac.authorization.k8s.io/v1 true RoleBinding roles rbac.authorization.k8s.io/v1 true Role priorityclasses pc scheduling.k8s.io/v1 false PriorityClass csidrivers storage.k8s.io/v1 false CSIDriver csinodes storage.k8s.io/v1 false CSINode csistoragecapacities storage.k8s.io/v1 true CSIStorageCapacity storageclasses sc storage.k8s.io/v1 false StorageClass volumeattachments storage.k8s.io/v1 false VolumeAttachment Output options Use the following sections for information about how you can format or sort the output of certain commands. For details about which commands support the various output options, see the kubectl reference documentation. Formatting output The default output format for all kubectl commands is the human readable plain-text format. To output details to your terminal window in a specific format, you can add either the -o or --output flags to a supported kubectl command. Syntax kubectl [ command ] [ TYPE ] [ NAME ] -o <output_format> Depending on the kubectl operation, the following output formats are supported: Output format Description -o custom-columns=<spec> Print a table using a comma separated list of custom columns . -o custom-columns-file=<filename> Print a table using the custom columns template in the <filename> file. -o json Output a JSON formatted API object. -o jsonpath=<template> Print the fields defined in a jsonpath expression. -o jsonpath-file=<filename> Print the fields defined by the jsonpath expression in the <filename> file. -o kyaml Output a KYAML formatted API object (beta). -o name Print only the resource name and nothing else. -o wide Output in the plain-text format with any additional information. For pods, the node name is included. -o yaml Output a YAML formatted API object. KYAML is an experimental Kubernetes-specific dialect of YAML, and can be parsed as YAML. Example In this example, the following command outputs the details for a single pod as a YAML formatted object: kubectl get pod web-pod-13je7 -o yaml Remember: See the kubectl reference documentation for details about which output format is supported by each command. Custom columns To define custom columns and output only the details that you want into a table, you can use the custom-columns option. You can choose to define the custom columns inline or use a template file: -o custom-columns=<spec> or -o custom-columns-file=<filename> . Examples Inline: kubectl get pods <pod-name> -o custom-columns = NAME:.metadata.name,RSRC:.metadata.resourceVersion Template file: kubectl get pods <pod-name> -o custom-columns-file = template.txt where the template.txt file contains: NAME RSRC metadata.name metadata.resourceVersion The result of running either command is similar to: NAME RSRC submit-queue 610995 Server-side columns kubectl supports receiving specific column information from the server about objects. This means that for any given resource, the server will return columns and rows relevant to that resource, for the client to print. This allows for consistent human-readable output across clients used against the same cluster, by having the server encapsulate the details of printing. This feature is enabled by default. To disable it, add the --server-print=false flag to the kubectl get command. Examples To print information about the status of a pod, use a command like the following: kubectl get pods <pod-name> --server-print = false The output is similar to: NAME AGE pod-name 1m Sorting list objects To output objects to a sorted list in your terminal window, you can add the --sort-by flag to a supported kubectl command. Sort your objects by specifying any numeric or string field with the --sort-by flag. To specify a field, use a jsonpath expression. Syntax kubectl [ command ] [ TYPE ] [ NAME ] --sort-by = <jsonpath_exp> Example To print a list of pods sorted by name, you run: kubectl get pods --sort-by = .metadata.name Examples: Common operations Use the following set of examples to help you familiarize yourself with running the commonly used kubectl operations: kubectl apply - Apply or Update a resource from a file or stdin. # Create a service using the definition in example-service.yaml. kubectl apply -f example-service.yaml # Create a replication controller using the definition in example-controller.yaml. kubectl apply -f example-controller.yaml # Create the objects that are defined in any .yaml, .yml, or .json file within the <directory> directory. kubectl apply -f <directory> kubectl get - List one or more resources. # List all pods in plain-text output format. kubectl get pods # List all pods in plain-text output format and include additional information (such as node name). kubectl get pods -o wide # List the replication controller with the specified name in plain-text output format. Tip: You can shorten and replace the 'replicationcontroller' resource type with the alias 'rc'. kubectl get replicationcontroller <rc-name> # List all replication controllers and services together in plain-text output format. kubectl get rc,services # List all daemon sets in plain-text output format. kubectl get ds # List all pods running on node server01 kubectl get pods --field-selector = spec.nodeName = server01 kubectl describe - Display detailed state of one or more resources, including the uninitialized ones by default. # Display the details of the node with name <node-name>. kubectl describe nodes <node-name> # Display the details of the pod with name <pod-name>. kubectl describe pods/<pod-name> # Display the details of all the pods that are managed by the replication controller named <rc-name>. # Remember: Any pods that are created by the replication controller get prefixed with the name of the replication controller. kubectl describe pods <rc-name> # Describe all pods kubectl describe pods Note: The kubectl get command is usually used for retrieving one or more resources of the same resource type. It features a rich set of flags that allows you to customize the output format using the -o or --output flag, for example. You can specify the -w or --watch flag to start watching updates to a particular object. The kubectl describe command is more focused on describing the many related aspects of a specified resource. It may invoke several API calls to the API server to build a view for the user. For example, the kubectl describe node command retrieves not only the information about the node, but also a summary of the pods running on it, the events generated for the node etc. kubectl delete - Delete resources either from a file, stdin, or specifying label selectors, names, resource selectors, or resources. # Delete a pod using the type and name specified in the pod.yaml file. kubectl delete -f pod.yaml # Delete all the pods and services that have the label '<label-key>=<label-value>'. kubectl delete pods,services -l <label-key> = <label-value> # Delete all pods, including uninitialized ones. kubectl delete pods --all kubectl exec - Execute a command against a container in a pod. # Get output from running 'date' from pod <pod-name>. By default, output is from the first container. kubectl exec <pod-name> -- date # Get output from running 'date' in container <container-name> of pod <pod-name>. kubectl exec <pod-name> -c <container-name> -- date # Get an interactive TTY and run /bin/bash from pod <pod-name>. By default, output is from the first container. kubectl exec -ti <pod-name> -- /bin/bash kubectl logs - Print the logs for a container in a pod. # Return a snapshot of the logs from pod <pod-name>. kubectl logs <pod-name> # Start streaming the logs from pod <pod-name>. This is similar to the 'tail -f' Linux command. kubectl logs -f <pod-name> kubectl diff - View a diff of the proposed updates to a cluster. # Diff resources included in "pod.json". kubectl diff -f pod.json # Diff file read from stdin. cat service.yaml | kubectl diff -f - Examples: Creating and using plugins Use the following set of examples to help you familiarize yourself with writing and using kubectl plugins: # create a simple plugin in any language and name the resulting executable file # so that it begins with the prefix "kubectl-" cat ./kubectl-hello #!/bin/sh # this plugin prints the words "hello world" echo "hello world" With a plugin written, let's make it executable: chmod a+x ./kubectl-hello # and move it to a location in our PATH sudo mv ./kubectl-hello /usr/local/bin sudo chown root:root /usr/local/bin # You have now created and "installed" a kubectl plugin. # You can begin using this plugin by invoking it from kubectl as if it were a regular command kubectl hello hello world # You can "uninstall" a plugin, by removing it from the folder in your # $PATH where you placed it sudo rm /usr/local/bin/kubectl-hello In order to view all of the plugins that are available to kubectl , use the kubectl plugin list subcommand: kubectl plugin list The output is similar to: The following kubectl-compatible plugins are available: /usr/local/bin/kubectl-hello /usr/local/bin/kubectl-foo /usr/local/bin/kubectl-bar kubectl plugin list also warns you about plugins that are not executable, or that are shadowed by other plugins; for example: sudo chmod -x /usr/local/bin/kubectl-foo # remove execute permission kubectl plugin list The following kubectl-compatible plugins are available: /usr/local/bin/kubectl-hello /usr/local/bin/kubectl-foo - warning: /usr/local/bin/kubectl-foo identified as a plugin, but it is not executable /usr/local/bin/kubectl-bar error: one plugin warning was found You can think of plugins as a means to build more complex functionality on top of the existing kubectl commands: cat ./kubectl-whoami The next few examples assume that you already made kubectl-whoami have the following contents: #!/bin/bash # this plugin makes use of the `kubectl config` command in order to output # information about the current user, based on the currently selected context kubectl config view --template = '{{ range .contexts }}{{ if eq .name "' $( kubectl config current-context ) '" }}Current user: {{ printf "%s\n" .context.user }}{{ end }}{{ end }}' Running the above command gives you an output containing the user for the current context in your KUBECONFIG file: # make the file executable sudo chmod +x ./kubectl-whoami # and move it into your PATH sudo mv ./kubectl-whoami /usr/local/bin kubectl whoami Current user: plugins-user What's next Read the kubectl reference documentation: the kubectl command reference the command line arguments reference Learn about kubectl usage conventions Read about JSONPath support in kubectl Read about how to extend kubectl with plugins To find out more about plugins, take a look at the example CLI plugin .
Markdown
[Kubernetes](https://kubernetes.io/) - [Documentation](https://kubernetes.io/docs/home/) - [Kubernetes Blog](https://kubernetes.io/blog/) - [Training](https://kubernetes.io/training/) - [Careers](https://kubernetes.io/careers/) - [Partners](https://kubernetes.io/partners/) - [Community](https://kubernetes.io/community/) - [Versions](https://kubernetes.io/docs/reference/kubectl/) [Release Information](https://kubernetes.io/releases) [v1.35](https://kubernetes.io/docs/reference/kubectl/) [v1.34](https://v1-34.docs.kubernetes.io/docs/reference/kubectl/) [v1.33](https://v1-33.docs.kubernetes.io/docs/reference/kubectl/) [v1.32](https://v1-32.docs.kubernetes.io/docs/reference/kubectl/) [v1.31](https://v1-31.docs.kubernetes.io/docs/reference/kubectl/) - [English](https://kubernetes.io/docs/reference/kubectl/) [中文 (Chinese)](https://kubernetes.io/zh-cn/docs/reference/kubectl/) [Français (French)](https://kubernetes.io/fr/docs/reference/kubectl/) [Deutsch (German)](https://kubernetes.io/de/docs/reference/kubectl/) [Bahasa Indonesia (Indonesian)](https://kubernetes.io/id/docs/reference/kubectl/) [日本語 (Japanese)](https://kubernetes.io/ja/docs/reference/kubectl/) [한국어 (Korean)](https://kubernetes.io/ko/docs/reference/kubectl/) [Português (Portuguese)](https://kubernetes.io/pt-br/docs/reference/kubectl/) [Русский (Russian)](https://kubernetes.io/ru/docs/reference/kubectl/) [Español (Spanish)](https://kubernetes.io/es/docs/reference/kubectl/) বাংলা (Bengali) [বাংলা (Bengali)](https://kubernetes.io/bn/) हिन्दी (Hindi) [हिन्दी (Hindi)](https://kubernetes.io/hi/) Italiano (Italian) [Italiano (Italian)](https://kubernetes.io/it/) Polski (Polish) [Polski (Polish)](https://kubernetes.io/pl/) Українська (Ukrainian) [Українська (Ukrainian)](https://kubernetes.io/uk/) Tiếng Việt (Vietnamese) [Tiếng Việt (Vietnamese)](https://kubernetes.io/vi/) # Command line tool (kubectl) [English](https://kubernetes.io/docs/reference/kubectl/) [বাংলা (Bengali)](https://kubernetes.io/bn/docs/concepts/) [中文 (Chinese)](https://kubernetes.io/zh-cn/docs/concepts/) [Français (French)](https://kubernetes.io/fr/docs/concepts/) [Deutsch (German)](https://kubernetes.io/de/docs/concepts/) [हिन्दी (Hindi)](https://kubernetes.io/hi/docs/concepts/) [Bahasa Indonesia (Indonesian)](https://kubernetes.io/id/docs/concepts/) [Italiano (Italian)](https://kubernetes.io/it/docs/concepts/) [日本語 (Japanese)](https://kubernetes.io/ja/docs/concepts/) [한국어 (Korean)](https://kubernetes.io/ko/docs/concepts/) [Polski (Polish)](https://kubernetes.io/pl/docs/concepts/) [Português (Portuguese)](https://kubernetes.io/pt-br/docs/concepts/) [Русский (Russian)](https://kubernetes.io/ru/docs/concepts/) [Español (Spanish)](https://kubernetes.io/es/docs/concepts/) [Українська (Ukrainian)](https://kubernetes.io/uk/docs/concepts/) [Tiếng Việt (Vietnamese)](https://kubernetes.io/vi/docs/concepts/) - [Kubernetes Documentation](https://kubernetes.io/docs/ "Documentation") - [Documentation](https://kubernetes.io/docs/home/ "Kubernetes Documentation") - [Available Documentation Versions](https://kubernetes.io/docs/home/supported-doc-versions/) - [Getting started](https://kubernetes.io/docs/setup/) - [Learning environment](https://kubernetes.io/docs/setup/learning-environment/) - [Production environment](https://kubernetes.io/docs/setup/production-environment/) - [Container Runtimes](https://kubernetes.io/docs/setup/production-environment/container-runtimes/) - [Installing Kubernetes with deployment tools](https://kubernetes.io/docs/setup/production-environment/tools/) - [Bootstrapping clusters with kubeadm](https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/) - [Installing kubeadm](https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/) - [Troubleshooting kubeadm](https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/troubleshooting-kubeadm/) - [Creating a cluster with kubeadm](https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/) - [Customizing components with the kubeadm API](https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/control-plane-flags/) - [Options for Highly Available Topology](https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/ha-topology/) - [Creating Highly Available Clusters with kubeadm](https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/high-availability/) - [Set up a High Availability etcd Cluster with kubeadm](https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/setup-ha-etcd-with-kubeadm/) - [Configuring each kubelet in your cluster using kubeadm](https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/kubelet-integration/) - [Dual-stack support with kubeadm](https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/dual-stack-support/) - [Turnkey Cloud Solutions](https://kubernetes.io/docs/setup/production-environment/turnkey-solutions/) - [Best practices](https://kubernetes.io/docs/setup/best-practices/) - [Considerations for large clusters](https://kubernetes.io/docs/setup/best-practices/cluster-large/) - [Running in multiple zones](https://kubernetes.io/docs/setup/best-practices/multiple-zones/) - [Validate node setup](https://kubernetes.io/docs/setup/best-practices/node-conformance/) - [Enforcing Pod Security Standards](https://kubernetes.io/docs/setup/best-practices/enforcing-pod-security-standards/) - [PKI certificates and requirements](https://kubernetes.io/docs/setup/best-practices/certificates/) - [Concepts](https://kubernetes.io/docs/concepts/) - [Overview](https://kubernetes.io/docs/concepts/overview/) - [Kubernetes Components](https://kubernetes.io/docs/concepts/overview/components/) - [Objects In Kubernetes](https://kubernetes.io/docs/concepts/overview/working-with-objects/) - [Kubernetes Object Management](https://kubernetes.io/docs/concepts/overview/working-with-objects/object-management/) - [Object Names and IDs](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/) - [Labels and Selectors](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - [Namespaces](https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/) - [Annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) - [Field Selectors](https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors/) - [Finalizers](https://kubernetes.io/docs/concepts/overview/working-with-objects/finalizers/) - [Owners and Dependents](https://kubernetes.io/docs/concepts/overview/working-with-objects/owners-dependents/) - [Recommended Labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/) - [Storage Versions](https://kubernetes.io/docs/concepts/overview/working-with-objects/storage-version/) - [The Kubernetes API](https://kubernetes.io/docs/concepts/overview/kubernetes-api/) - [The kubectl command-line tool](https://kubernetes.io/docs/concepts/overview/kubectl/) - [Cluster Architecture](https://kubernetes.io/docs/concepts/architecture/) - [Nodes](https://kubernetes.io/docs/concepts/architecture/nodes/) - [Communication between Nodes and the Control Plane](https://kubernetes.io/docs/concepts/architecture/control-plane-node-communication/) - [Controllers](https://kubernetes.io/docs/concepts/architecture/controller/) - [Leases](https://kubernetes.io/docs/concepts/architecture/leases/) - [Cloud Controller Manager](https://kubernetes.io/docs/concepts/architecture/cloud-controller/) - [About cgroup v2](https://kubernetes.io/docs/concepts/architecture/cgroups/) - [Kubernetes Self-Healing](https://kubernetes.io/docs/concepts/architecture/self-healing/) - [Garbage Collection](https://kubernetes.io/docs/concepts/architecture/garbage-collection/) - [Mixed Version Proxy](https://kubernetes.io/docs/concepts/architecture/mixed-version-proxy/) - [Containers](https://kubernetes.io/docs/concepts/containers/) - [Images](https://kubernetes.io/docs/concepts/containers/images/) - [Container Environment](https://kubernetes.io/docs/concepts/containers/container-environment/) - [Runtime Class](https://kubernetes.io/docs/concepts/containers/runtime-class/) - [Container Lifecycle Hooks](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/) - [Container Runtime Interface (CRI)](https://kubernetes.io/docs/concepts/containers/cri/) - [Workloads](https://kubernetes.io/docs/concepts/workloads/) - [Pods](https://kubernetes.io/docs/concepts/workloads/pods/) - [Pod Lifecycle](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/) - [Init Containers](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/) - [Sidecar Containers](https://kubernetes.io/docs/concepts/workloads/pods/sidecar-containers/) - [Ephemeral Containers](https://kubernetes.io/docs/concepts/workloads/pods/ephemeral-containers/) - [Disruptions](https://kubernetes.io/docs/concepts/workloads/pods/disruptions/) - [Pod Hostname](https://kubernetes.io/docs/concepts/workloads/pods/pod-hostname/) - [Pod Quality of Service Classes](https://kubernetes.io/docs/concepts/workloads/pods/pod-qos/) - [Workload Reference](https://kubernetes.io/docs/concepts/workloads/pods/workload-reference/) - [User Namespaces](https://kubernetes.io/docs/concepts/workloads/pods/user-namespaces/) - [Downward API](https://kubernetes.io/docs/concepts/workloads/pods/downward-api/) - [Advanced Pod Configuration](https://kubernetes.io/docs/concepts/workloads/pods/advanced-pod-config/) - [Workload API](https://kubernetes.io/docs/concepts/workloads/workload-api/) - [Pod Group Policies](https://kubernetes.io/docs/concepts/workloads/workload-api/policies/) - [Workload Management](https://kubernetes.io/docs/concepts/workloads/controllers/) - [Deployments](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/) - [ReplicaSet](https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/) - [StatefulSets](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/) - [DaemonSet](https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/) - [Jobs](https://kubernetes.io/docs/concepts/workloads/controllers/job/) - [Automatic Cleanup for Finished Jobs](https://kubernetes.io/docs/concepts/workloads/controllers/ttlafterfinished/) - [CronJob](https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/) - [ReplicationController](https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/) - [Managing Workloads](https://kubernetes.io/docs/concepts/workloads/management/) - [Autoscaling Workloads](https://kubernetes.io/docs/concepts/workloads/autoscaling/) - [Horizontal Pod Autoscaling](https://kubernetes.io/docs/concepts/workloads/autoscaling/horizontal-pod-autoscale/) - [Vertical Pod Autoscaling](https://kubernetes.io/docs/concepts/workloads/autoscaling/vertical-pod-autoscale/) - [Services, Load Balancing, and Networking](https://kubernetes.io/docs/concepts/services-networking/) - [Service](https://kubernetes.io/docs/concepts/services-networking/service/) - [Ingress](https://kubernetes.io/docs/concepts/services-networking/ingress/) - [Ingress Controllers](https://kubernetes.io/docs/concepts/services-networking/ingress-controllers/) - [Gateway API](https://kubernetes.io/docs/concepts/services-networking/gateway/) - [EndpointSlices](https://kubernetes.io/docs/concepts/services-networking/endpoint-slices/) - [Network Policies](https://kubernetes.io/docs/concepts/services-networking/network-policies/) - [DNS for Services and Pods](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/) - [IPv4/IPv6 dual-stack](https://kubernetes.io/docs/concepts/services-networking/dual-stack/) - [Topology Aware Routing](https://kubernetes.io/docs/concepts/services-networking/topology-aware-routing/) - [Networking on Windows](https://kubernetes.io/docs/concepts/services-networking/windows-networking/) - [Service ClusterIP allocation](https://kubernetes.io/docs/concepts/services-networking/cluster-ip-allocation/) - [Service Internal Traffic Policy](https://kubernetes.io/docs/concepts/services-networking/service-traffic-policy/) - [Storage](https://kubernetes.io/docs/concepts/storage/) - [Volumes](https://kubernetes.io/docs/concepts/storage/volumes/) - [Persistent Volumes](https://kubernetes.io/docs/concepts/storage/persistent-volumes/) - [Projected Volumes](https://kubernetes.io/docs/concepts/storage/projected-volumes/) - [Ephemeral Volumes](https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/) - [Storage Classes](https://kubernetes.io/docs/concepts/storage/storage-classes/) - [Volume Attributes Classes](https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/) - [Dynamic Volume Provisioning](https://kubernetes.io/docs/concepts/storage/dynamic-provisioning/) - [Volume Snapshots](https://kubernetes.io/docs/concepts/storage/volume-snapshots/) - [Volume Snapshot Classes](https://kubernetes.io/docs/concepts/storage/volume-snapshot-classes/) - [CSI Volume Cloning](https://kubernetes.io/docs/concepts/storage/volume-pvc-datasource/) - [Storage Capacity](https://kubernetes.io/docs/concepts/storage/storage-capacity/) - [Node-specific Volume Limits](https://kubernetes.io/docs/concepts/storage/storage-limits/) - [Local ephemeral storage](https://kubernetes.io/docs/concepts/storage/ephemeral-storage/) - [Volume Health Monitoring](https://kubernetes.io/docs/concepts/storage/volume-health-monitoring/) - [Windows Storage](https://kubernetes.io/docs/concepts/storage/windows-storage/) - [Configuration](https://kubernetes.io/docs/concepts/configuration/) - [ConfigMaps](https://kubernetes.io/docs/concepts/configuration/configmap/) - [Secrets](https://kubernetes.io/docs/concepts/configuration/secret/) - [Liveness, Readiness, and Startup Probes](https://kubernetes.io/docs/concepts/configuration/liveness-readiness-startup-probes/) - [Resource Management for Pods and Containers](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) - [Organizing Cluster Access Using kubeconfig Files](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/) - [Resource Management for Windows nodes](https://kubernetes.io/docs/concepts/configuration/windows-resource-management/) - [Security](https://kubernetes.io/docs/concepts/security/) - [Cloud Native Security](https://kubernetes.io/docs/concepts/security/cloud-native-security/ "Cloud Native Security and Kubernetes") - [Pod Security Standards](https://kubernetes.io/docs/concepts/security/pod-security-standards/) - [Pod Security Admission](https://kubernetes.io/docs/concepts/security/pod-security-admission/) - [Service Accounts](https://kubernetes.io/docs/concepts/security/service-accounts/) - [Pod Security Policies](https://kubernetes.io/docs/concepts/security/pod-security-policy/) - [Security For Linux Nodes](https://kubernetes.io/docs/concepts/security/linux-security/) - [Security For Windows Nodes](https://kubernetes.io/docs/concepts/security/windows-security/) - [Controlling Access to the Kubernetes API](https://kubernetes.io/docs/concepts/security/controlling-access/) - [Role Based Access Control Good Practices](https://kubernetes.io/docs/concepts/security/rbac-good-practices/) - [Good practices for Kubernetes Secrets](https://kubernetes.io/docs/concepts/security/secrets-good-practices/) - [Multi-tenancy](https://kubernetes.io/docs/concepts/security/multi-tenancy/) - [Hardening Guide - Authentication Mechanisms](https://kubernetes.io/docs/concepts/security/hardening-guide/authentication-mechanisms/) - [Hardening Guide - Scheduler Configuration](https://kubernetes.io/docs/concepts/security/hardening-guide/scheduler/) - [Kubernetes API Server Bypass Risks](https://kubernetes.io/docs/concepts/security/api-server-bypass-risks/) - [Linux kernel security constraints for Pods and containers](https://kubernetes.io/docs/concepts/security/linux-kernel-security-constraints/) - [Security Checklist](https://kubernetes.io/docs/concepts/security/security-checklist/) - [Application Security Checklist](https://kubernetes.io/docs/concepts/security/application-security-checklist/) - [Policies](https://kubernetes.io/docs/concepts/policy/) - [Limit Ranges](https://kubernetes.io/docs/concepts/policy/limit-range/) - [Resource Quotas](https://kubernetes.io/docs/concepts/policy/resource-quotas/) - [Process ID Limits And Reservations](https://kubernetes.io/docs/concepts/policy/pid-limiting/) - [Node Resource Managers](https://kubernetes.io/docs/concepts/policy/node-resource-managers/) - [Scheduling, Preemption and Eviction](https://kubernetes.io/docs/concepts/scheduling-eviction/) - [Kubernetes Scheduler](https://kubernetes.io/docs/concepts/scheduling-eviction/kube-scheduler/) - [Assigning Pods to Nodes](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/) - [Pod Overhead](https://kubernetes.io/docs/concepts/scheduling-eviction/pod-overhead/) - [Pod Scheduling Readiness](https://kubernetes.io/docs/concepts/scheduling-eviction/pod-scheduling-readiness/) - [Pod Topology Spread Constraints](https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/) - [Taints and Tolerations](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) - [Scheduling Framework](https://kubernetes.io/docs/concepts/scheduling-eviction/scheduling-framework/) - [Dynamic Resource Allocation](https://kubernetes.io/docs/concepts/scheduling-eviction/dynamic-resource-allocation/) - [Gang Scheduling](https://kubernetes.io/docs/concepts/scheduling-eviction/gang-scheduling/) - [Scheduler Performance Tuning](https://kubernetes.io/docs/concepts/scheduling-eviction/scheduler-perf-tuning/) - [Resource Bin Packing](https://kubernetes.io/docs/concepts/scheduling-eviction/resource-bin-packing/) - [Pod Priority and Preemption](https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/) - [Node-pressure Eviction](https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/) - [API-initiated Eviction](https://kubernetes.io/docs/concepts/scheduling-eviction/api-eviction/) - [Node Declared Features](https://kubernetes.io/docs/concepts/scheduling-eviction/node-declared-features/) - [Cluster Administration](https://kubernetes.io/docs/concepts/cluster-administration/) - [Node Shutdowns](https://kubernetes.io/docs/concepts/cluster-administration/node-shutdown/) - [Swap memory management](https://kubernetes.io/docs/concepts/cluster-administration/swap-memory-management/) - [Node Autoscaling](https://kubernetes.io/docs/concepts/cluster-administration/node-autoscaling/) - [Certificates](https://kubernetes.io/docs/concepts/cluster-administration/certificates/) - [Cluster Networking](https://kubernetes.io/docs/concepts/cluster-administration/networking/) - [Observability](https://kubernetes.io/docs/concepts/cluster-administration/observability/) - [Admission Webhook Good Practices](https://kubernetes.io/docs/concepts/cluster-administration/admission-webhooks-good-practices/) - [Good practices for Dynamic Resource Allocation as a Cluster Admin](https://kubernetes.io/docs/concepts/cluster-administration/dra/) - [Logging Architecture](https://kubernetes.io/docs/concepts/cluster-administration/logging/) - [Compatibility Version For Kubernetes Control Plane Components](https://kubernetes.io/docs/concepts/cluster-administration/compatibility-version/) - [Metrics For Kubernetes System Components](https://kubernetes.io/docs/concepts/cluster-administration/system-metrics/) - [Metrics for Kubernetes Object States](https://kubernetes.io/docs/concepts/cluster-administration/kube-state-metrics/) - [System Logs](https://kubernetes.io/docs/concepts/cluster-administration/system-logs/) - [Traces For Kubernetes System Components](https://kubernetes.io/docs/concepts/cluster-administration/system-traces/) - [Proxies in Kubernetes](https://kubernetes.io/docs/concepts/cluster-administration/proxies/) - [API Priority and Fairness](https://kubernetes.io/docs/concepts/cluster-administration/flow-control/) - [Installing Addons](https://kubernetes.io/docs/concepts/cluster-administration/addons/) - [Coordinated Leader Election](https://kubernetes.io/docs/concepts/cluster-administration/coordinated-leader-election/) - [Windows in Kubernetes](https://kubernetes.io/docs/concepts/windows/) - [Windows containers in Kubernetes](https://kubernetes.io/docs/concepts/windows/intro/) - [Guide for Running Windows Containers in Kubernetes](https://kubernetes.io/docs/concepts/windows/user-guide/) - [Extending Kubernetes](https://kubernetes.io/docs/concepts/extend-kubernetes/) - [Compute, Storage, and Networking Extensions](https://kubernetes.io/docs/concepts/extend-kubernetes/compute-storage-net/) - [Network Plugins](https://kubernetes.io/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins/) - [Device Plugins](https://kubernetes.io/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins/) - [Extending the Kubernetes API](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/) - [Custom Resources](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/) - [Kubernetes API Aggregation Layer](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/apiserver-aggregation/) - [Operator pattern](https://kubernetes.io/docs/concepts/extend-kubernetes/operator/) - [Tasks](https://kubernetes.io/docs/tasks/) - [Install Tools](https://kubernetes.io/docs/tasks/tools/) - [Install and Set Up kubectl on Linux](https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/) - [Install and Set Up kubectl on macOS](https://kubernetes.io/docs/tasks/tools/install-kubectl-macos/) - [Install and Set Up kubectl on Windows](https://kubernetes.io/docs/tasks/tools/install-kubectl-windows/) - [Administer a Cluster](https://kubernetes.io/docs/tasks/administer-cluster/) - [Administration with kubeadm](https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/) - [Adding Linux worker nodes](https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/adding-linux-nodes/) - [Adding Windows worker nodes](https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/adding-windows-nodes/) - [Upgrading kubeadm clusters](https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade/) - [Upgrading Linux nodes](https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/upgrading-linux-nodes/) - [Upgrading Windows nodes](https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/upgrading-windows-nodes/) - [Configuring a cgroup driver](https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/configure-cgroup-driver/) - [Certificate Management with kubeadm](https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-certs/) - [Reconfiguring a kubeadm cluster](https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-reconfigure/) - [Changing The Kubernetes Package Repository](https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/change-package-repository/) - [Overprovision Node Capacity For A Cluster](https://kubernetes.io/docs/tasks/administer-cluster/node-overprovisioning/) - [Migrating from dockershim](https://kubernetes.io/docs/tasks/administer-cluster/migrating-from-dockershim/) - [Changing the Container Runtime on a Node from Docker Engine to containerd](https://kubernetes.io/docs/tasks/administer-cluster/migrating-from-dockershim/change-runtime-containerd/) - [Find Out What Container Runtime is Used on a Node](https://kubernetes.io/docs/tasks/administer-cluster/migrating-from-dockershim/find-out-runtime-you-use/) - [Troubleshooting CNI plugin-related errors](https://kubernetes.io/docs/tasks/administer-cluster/migrating-from-dockershim/troubleshooting-cni-plugin-related-errors/) - [Check whether dockershim removal affects you](https://kubernetes.io/docs/tasks/administer-cluster/migrating-from-dockershim/check-if-dockershim-removal-affects-you/) - [Migrating telemetry and security agents from dockershim](https://kubernetes.io/docs/tasks/administer-cluster/migrating-from-dockershim/migrating-telemetry-and-security-agents/) - [Generate Certificates Manually](https://kubernetes.io/docs/tasks/administer-cluster/certificates/) - [Manage Memory, CPU, and API Resources](https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/) - [Configure Default Memory Requests and Limits for a Namespace](https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/memory-default-namespace/) - [Configure Default CPU Requests and Limits for a Namespace](https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/cpu-default-namespace/) - [Configure Minimum and Maximum Memory Constraints for a Namespace](https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/memory-constraint-namespace/) - [Configure Minimum and Maximum CPU Constraints for a Namespace](https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/cpu-constraint-namespace/) - [Configure Memory and CPU Quotas for a Namespace](https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/quota-memory-cpu-namespace/) - [Configure a Pod Quota for a Namespace](https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/quota-pod-namespace/) - [Install a Network Policy Provider](https://kubernetes.io/docs/tasks/administer-cluster/network-policy-provider/) - [Use Antrea for NetworkPolicy](https://kubernetes.io/docs/tasks/administer-cluster/network-policy-provider/antrea-network-policy/) - [Use Calico for NetworkPolicy](https://kubernetes.io/docs/tasks/administer-cluster/network-policy-provider/calico-network-policy/) - [Use Cilium for NetworkPolicy](https://kubernetes.io/docs/tasks/administer-cluster/network-policy-provider/cilium-network-policy/) - [Use Kube-router for NetworkPolicy](https://kubernetes.io/docs/tasks/administer-cluster/network-policy-provider/kube-router-network-policy/) - [Romana for NetworkPolicy](https://kubernetes.io/docs/tasks/administer-cluster/network-policy-provider/romana-network-policy/) - [Weave Net for NetworkPolicy](https://kubernetes.io/docs/tasks/administer-cluster/network-policy-provider/weave-network-policy/) - [Access Clusters Using the Kubernetes API](https://kubernetes.io/docs/tasks/administer-cluster/access-cluster-api/) - [Enable Or Disable Feature Gates](https://kubernetes.io/docs/tasks/administer-cluster/configure-feature-gates/) - [Advertise Extended Resources for a Node](https://kubernetes.io/docs/tasks/administer-cluster/extended-resource-node/) - [Autoscale the DNS Service in a Cluster](https://kubernetes.io/docs/tasks/administer-cluster/dns-horizontal-autoscaling/) - [Change the Access Mode of a PersistentVolume to ReadWriteOncePod](https://kubernetes.io/docs/tasks/administer-cluster/change-pv-access-mode-readwriteoncepod/) - [Change the default StorageClass](https://kubernetes.io/docs/tasks/administer-cluster/change-default-storage-class/) - [Switching from Polling to CRI Event-based Updates to Container Status](https://kubernetes.io/docs/tasks/administer-cluster/switch-to-evented-pleg/) - [Change the Reclaim Policy of a PersistentVolume](https://kubernetes.io/docs/tasks/administer-cluster/change-pv-reclaim-policy/) - [Cloud Controller Manager Administration](https://kubernetes.io/docs/tasks/administer-cluster/running-cloud-controller/) - [Configure a kubelet image credential provider](https://kubernetes.io/docs/tasks/administer-cluster/kubelet-credential-provider/) - [Configure Quotas for API Objects](https://kubernetes.io/docs/tasks/administer-cluster/quota-api-object/) - [Control CPU Management Policies on the Node](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/) - [Control Memory Management Policies on a Node](https://kubernetes.io/docs/tasks/administer-cluster/memory-manager/) - [Control Topology Management Policies on a node](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager/) - [Customizing DNS Service](https://kubernetes.io/docs/tasks/administer-cluster/dns-custom-nameservers/) - [Debugging DNS Resolution](https://kubernetes.io/docs/tasks/administer-cluster/dns-debugging-resolution/) - [Declare Network Policy](https://kubernetes.io/docs/tasks/administer-cluster/declare-network-policy/) - [Developing Cloud Controller Manager](https://kubernetes.io/docs/tasks/administer-cluster/developing-cloud-controller-manager/) - [Enable Or Disable A Kubernetes API](https://kubernetes.io/docs/tasks/administer-cluster/enable-disable-api/) - [Encrypting Confidential Data at Rest](https://kubernetes.io/docs/tasks/administer-cluster/encrypt-data/) - [Decrypt Confidential Data that is Already Encrypted at Rest](https://kubernetes.io/docs/tasks/administer-cluster/decrypt-data/) - [Guaranteed Scheduling For Critical Add-On Pods](https://kubernetes.io/docs/tasks/administer-cluster/guaranteed-scheduling-critical-addon-pods/) - [IP Masquerade Agent User Guide](https://kubernetes.io/docs/tasks/administer-cluster/ip-masq-agent/) - [Limit Storage Consumption](https://kubernetes.io/docs/tasks/administer-cluster/limit-storage-consumption/) - [Migrate Replicated Control Plane To Use Cloud Controller Manager](https://kubernetes.io/docs/tasks/administer-cluster/controller-manager-leader-migration/) - [Operating etcd clusters for Kubernetes](https://kubernetes.io/docs/tasks/administer-cluster/configure-upgrade-etcd/) - [Reserve Compute Resources for System Daemons](https://kubernetes.io/docs/tasks/administer-cluster/reserve-compute-resources/) - [Running Kubernetes Node Components as a Non-root User](https://kubernetes.io/docs/tasks/administer-cluster/kubelet-in-userns/) - [Safely Drain a Node](https://kubernetes.io/docs/tasks/administer-cluster/safely-drain-node/) - [Securing a Cluster](https://kubernetes.io/docs/tasks/administer-cluster/securing-a-cluster/) - [Set Kubelet Parameters Via A Configuration File](https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/) - [Share a Cluster with Namespaces](https://kubernetes.io/docs/tasks/administer-cluster/namespaces/) - [Upgrade A Cluster](https://kubernetes.io/docs/tasks/administer-cluster/cluster-upgrade/) - [Use Cascading Deletion in a Cluster](https://kubernetes.io/docs/tasks/administer-cluster/use-cascading-deletion/) - [Using a KMS provider for data encryption](https://kubernetes.io/docs/tasks/administer-cluster/kms-provider/) - [Using CoreDNS for Service Discovery](https://kubernetes.io/docs/tasks/administer-cluster/coredns/) - [Using NodeLocal DNSCache in Kubernetes Clusters](https://kubernetes.io/docs/tasks/administer-cluster/nodelocaldns/) - [Using sysctls in a Kubernetes Cluster](https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/) - [Verify Signed Kubernetes Artifacts](https://kubernetes.io/docs/tasks/administer-cluster/verify-signed-artifacts/) - [Configure Pods and Containers](https://kubernetes.io/docs/tasks/configure-pod-container/) - [Assign Memory Resources to Containers and Pods](https://kubernetes.io/docs/tasks/configure-pod-container/assign-memory-resource/) - [Assign CPU Resources to Containers and Pods](https://kubernetes.io/docs/tasks/configure-pod-container/assign-cpu-resource/) - [Assign Devices to Pods and Containers](https://kubernetes.io/docs/tasks/configure-pod-container/assign-resources/) - [Set Up DRA in a Cluster](https://kubernetes.io/docs/tasks/configure-pod-container/assign-resources/set-up-dra-cluster/) - [Allocate Devices to Workloads with DRA](https://kubernetes.io/docs/tasks/configure-pod-container/assign-resources/allocate-devices-dra/) - [Assign Pod-level CPU and memory resources](https://kubernetes.io/docs/tasks/configure-pod-container/assign-pod-level-resources/) - [Configure GMSA for Windows Pods and containers](https://kubernetes.io/docs/tasks/configure-pod-container/configure-gmsa/) - [Resize CPU and Memory Resources assigned to Containers](https://kubernetes.io/docs/tasks/configure-pod-container/resize-container-resources/) - [Resize CPU and Memory Resources assigned to Pods](https://kubernetes.io/docs/tasks/configure-pod-container/resize-pod-resources/) - [Configure RunAsUserName for Windows pods and containers](https://kubernetes.io/docs/tasks/configure-pod-container/configure-runasusername/) - [Create a Windows HostProcess Pod](https://kubernetes.io/docs/tasks/configure-pod-container/create-hostprocess-pod/) - [Configure Quality of Service for Pods](https://kubernetes.io/docs/tasks/configure-pod-container/quality-service-pod/) - [Assign Extended Resources to a Container](https://kubernetes.io/docs/tasks/configure-pod-container/extended-resource/) - [Configure a Pod to Use a Volume for Storage](https://kubernetes.io/docs/tasks/configure-pod-container/configure-volume-storage/) - [Configure a Pod to Use a PersistentVolume for Storage](https://kubernetes.io/docs/tasks/configure-pod-container/configure-persistent-volume-storage/) - [Configure a Pod to Use a Projected Volume for Storage](https://kubernetes.io/docs/tasks/configure-pod-container/configure-projected-volume-storage/) - [Configure a Security Context for a Pod or Container](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) - [Configure Service Accounts for Pods](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/) - [Pull an Image from a Private Registry](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/) - [Configure Liveness, Readiness and Startup Probes](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/) - [Assign Pods to Nodes](https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes/) - [Assign Pods to Nodes using Node Affinity](https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes-using-node-affinity/) - [Configure Pod Initialization](https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-initialization/) - [Attach Handlers to Container Lifecycle Events](https://kubernetes.io/docs/tasks/configure-pod-container/attach-handler-lifecycle-event/) - [Configure a Pod to Use a ConfigMap](https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/) - [Share Process Namespace between Containers in a Pod](https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/) - [Use a User Namespace With a Pod](https://kubernetes.io/docs/tasks/configure-pod-container/user-namespaces/) - [Use an Image Volume With a Pod](https://kubernetes.io/docs/tasks/configure-pod-container/image-volumes/) - [Create static Pods](https://kubernetes.io/docs/tasks/configure-pod-container/static-pod/) - [Translate a Docker Compose File to Kubernetes Resources](https://kubernetes.io/docs/tasks/configure-pod-container/translate-compose-kubernetes/) - [Enforce Pod Security Standards by Configuring the Built-in Admission Controller](https://kubernetes.io/docs/tasks/configure-pod-container/enforce-standards-admission-controller/) - [Enforce Pod Security Standards with Namespace Labels](https://kubernetes.io/docs/tasks/configure-pod-container/enforce-standards-namespace-labels/) - [Migrate from PodSecurityPolicy to the Built-In PodSecurity Admission Controller](https://kubernetes.io/docs/tasks/configure-pod-container/migrate-from-psp/) - [Monitoring, Logging, and Debugging](https://kubernetes.io/docs/tasks/debug/) - [Logging in Kubernetes](https://kubernetes.io/docs/tasks/debug/logging/) - [Monitoring in Kubernetes](https://kubernetes.io/docs/tasks/debug/monitoring/) - [Troubleshooting Applications](https://kubernetes.io/docs/tasks/debug/debug-application/) - [Debug Pods](https://kubernetes.io/docs/tasks/debug/debug-application/debug-pods/) - [Debug Services](https://kubernetes.io/docs/tasks/debug/debug-application/debug-service/) - [Debug a StatefulSet](https://kubernetes.io/docs/tasks/debug/debug-application/debug-statefulset/) - [Determine the Reason for Pod Failure](https://kubernetes.io/docs/tasks/debug/debug-application/determine-reason-pod-failure/) - [Debug Init Containers](https://kubernetes.io/docs/tasks/debug/debug-application/debug-init-containers/) - [Debug Running Pods](https://kubernetes.io/docs/tasks/debug/debug-application/debug-running-pod/) - [Get a Shell to a Running Container](https://kubernetes.io/docs/tasks/debug/debug-application/get-shell-running-container/) - [Troubleshooting Clusters](https://kubernetes.io/docs/tasks/debug/debug-cluster/) - [Troubleshooting kubectl](https://kubernetes.io/docs/tasks/debug/debug-cluster/troubleshoot-kubectl/) - [Resource metrics pipeline](https://kubernetes.io/docs/tasks/debug/debug-cluster/resource-metrics-pipeline/) - [Tools for Monitoring Resources](https://kubernetes.io/docs/tasks/debug/debug-cluster/resource-usage-monitoring/) - [Monitor Node Health](https://kubernetes.io/docs/tasks/debug/debug-cluster/monitor-node-health/) - [Debugging Kubernetes nodes with crictl](https://kubernetes.io/docs/tasks/debug/debug-cluster/crictl/) - [Troubleshooting Topology Management](https://kubernetes.io/docs/tasks/debug/debug-cluster/topology/) - [Auditing](https://kubernetes.io/docs/tasks/debug/debug-cluster/audit/) - [Debugging Kubernetes Nodes With Kubectl](https://kubernetes.io/docs/tasks/debug/debug-cluster/kubectl-node-debug/) - [Developing and debugging services locally using telepresence](https://kubernetes.io/docs/tasks/debug/debug-cluster/local-debugging/) - [Windows debugging tips](https://kubernetes.io/docs/tasks/debug/debug-cluster/windows/) - [Manage Kubernetes Objects](https://kubernetes.io/docs/tasks/manage-kubernetes-objects/) - [Declarative Management of Kubernetes Objects Using Configuration Files](https://kubernetes.io/docs/tasks/manage-kubernetes-objects/declarative-config/) - [Declarative Management of Kubernetes Objects Using Kustomize](https://kubernetes.io/docs/tasks/manage-kubernetes-objects/kustomization/) - [Managing Kubernetes Objects Using Imperative Commands](https://kubernetes.io/docs/tasks/manage-kubernetes-objects/imperative-command/) - [Imperative Management of Kubernetes Objects Using Configuration Files](https://kubernetes.io/docs/tasks/manage-kubernetes-objects/imperative-config/) - [Update API Objects in Place Using kubectl patch](https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/) - [Migrate Kubernetes Objects Using Storage Version Migration](https://kubernetes.io/docs/tasks/manage-kubernetes-objects/storage-version-migration/) - [Managing Secrets](https://kubernetes.io/docs/tasks/configmap-secret/) - [Managing Secrets using kubectl](https://kubernetes.io/docs/tasks/configmap-secret/managing-secret-using-kubectl/) - [Managing Secrets using Configuration File](https://kubernetes.io/docs/tasks/configmap-secret/managing-secret-using-config-file/) - [Managing Secrets using Kustomize](https://kubernetes.io/docs/tasks/configmap-secret/managing-secret-using-kustomize/) - [Inject Data Into Applications](https://kubernetes.io/docs/tasks/inject-data-application/) - [Define a Command and Arguments for a Container](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/) - [Define Dependent Environment Variables](https://kubernetes.io/docs/tasks/inject-data-application/define-interdependent-environment-variables/) - [Define Environment Variables for a Container](https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/) - [Define Environment Variable Values Using An Init Container](https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-via-file/) - [Expose Pod Information to Containers Through Environment Variables](https://kubernetes.io/docs/tasks/inject-data-application/environment-variable-expose-pod-information/) - [Expose Pod Information to Containers Through Files](https://kubernetes.io/docs/tasks/inject-data-application/downward-api-volume-expose-pod-information/) - [Distribute Credentials Securely Using Secrets](https://kubernetes.io/docs/tasks/inject-data-application/distribute-credentials-secure/) - [Run Applications](https://kubernetes.io/docs/tasks/run-application/) - [Run a Stateless Application Using a Deployment](https://kubernetes.io/docs/tasks/run-application/run-stateless-application-deployment/) - [Run a Single-Instance Stateful Application](https://kubernetes.io/docs/tasks/run-application/run-single-instance-stateful-application/) - [Run a Replicated Stateful Application](https://kubernetes.io/docs/tasks/run-application/run-replicated-stateful-application/) - [Scale a StatefulSet](https://kubernetes.io/docs/tasks/run-application/scale-stateful-set/) - [Delete a StatefulSet](https://kubernetes.io/docs/tasks/run-application/delete-stateful-set/) - [Force Delete StatefulSet Pods](https://kubernetes.io/docs/tasks/run-application/force-delete-stateful-set-pod/) - [HorizontalPodAutoscaler Walkthrough](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/) - [Specifying a Disruption Budget for your Application](https://kubernetes.io/docs/tasks/run-application/configure-pdb/) - [Accessing the Kubernetes API from a Pod](https://kubernetes.io/docs/tasks/run-application/access-api-from-pod/) - [Run Jobs](https://kubernetes.io/docs/tasks/job/) - [Running Automated Tasks with a CronJob](https://kubernetes.io/docs/tasks/job/automated-tasks-with-cron-jobs/) - [Coarse Parallel Processing Using a Work Queue](https://kubernetes.io/docs/tasks/job/coarse-parallel-processing-work-queue/) - [Fine Parallel Processing Using a Work Queue](https://kubernetes.io/docs/tasks/job/fine-parallel-processing-work-queue/) - [Indexed Job for Parallel Processing with Static Work Assignment](https://kubernetes.io/docs/tasks/job/indexed-parallel-processing-static/) - [Job with Pod-to-Pod Communication](https://kubernetes.io/docs/tasks/job/job-with-pod-to-pod-communication/) - [Parallel Processing using Expansions](https://kubernetes.io/docs/tasks/job/parallel-processing-expansion/) - [Handling retriable and non-retriable pod failures with Pod failure policy](https://kubernetes.io/docs/tasks/job/pod-failure-policy/) - [Access Applications in a Cluster](https://kubernetes.io/docs/tasks/access-application-cluster/) - [Deploy and Access the Kubernetes Dashboard](https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/) - [Accessing Clusters](https://kubernetes.io/docs/tasks/access-application-cluster/access-cluster/) - [Configure Access to Multiple Clusters](https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/) - [Use Port Forwarding to Access Applications in a Cluster](https://kubernetes.io/docs/tasks/access-application-cluster/port-forward-access-application-cluster/) - [Use a Service to Access an Application in a Cluster](https://kubernetes.io/docs/tasks/access-application-cluster/service-access-application-cluster/) - [Connect a Frontend to a Backend Using Services](https://kubernetes.io/docs/tasks/access-application-cluster/connecting-frontend-backend/) - [Create an External Load Balancer](https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/) - [List All Container Images Running in a Cluster](https://kubernetes.io/docs/tasks/access-application-cluster/list-all-running-container-images/) - [Communicate Between Containers in the Same Pod Using a Shared Volume](https://kubernetes.io/docs/tasks/access-application-cluster/communicate-containers-same-pod-shared-volume/) - [Configure DNS for a Cluster](https://kubernetes.io/docs/tasks/access-application-cluster/configure-dns-cluster/) - [Access Services Running on Clusters](https://kubernetes.io/docs/tasks/access-application-cluster/access-cluster-services/) - [Extend Kubernetes](https://kubernetes.io/docs/tasks/extend-kubernetes/) - [Configure the Aggregation Layer](https://kubernetes.io/docs/tasks/extend-kubernetes/configure-aggregation-layer/) - [Use Custom Resources](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/) - [Extend the Kubernetes API with CustomResourceDefinitions](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/) - [Versions in CustomResourceDefinitions](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning/) - [Set up an Extension API Server](https://kubernetes.io/docs/tasks/extend-kubernetes/setup-extension-api-server/) - [Configure Multiple Schedulers](https://kubernetes.io/docs/tasks/extend-kubernetes/configure-multiple-schedulers/) - [Use an HTTP Proxy to Access the Kubernetes API](https://kubernetes.io/docs/tasks/extend-kubernetes/http-proxy-access-api/) - [Use a SOCKS5 Proxy to Access the Kubernetes API](https://kubernetes.io/docs/tasks/extend-kubernetes/socks5-proxy-access-api/) - [Set up Konnectivity service](https://kubernetes.io/docs/tasks/extend-kubernetes/setup-konnectivity/) - [TLS](https://kubernetes.io/docs/tasks/tls/) - [Issue a Certificate for a Kubernetes API Client Using A CertificateSigningRequest](https://kubernetes.io/docs/tasks/tls/certificate-issue-client-csr/) - [Configure Certificate Rotation for the Kubelet](https://kubernetes.io/docs/tasks/tls/certificate-rotation/) - [Manage TLS Certificates in a Cluster](https://kubernetes.io/docs/tasks/tls/managing-tls-in-a-cluster/) - [Manual Rotation of CA Certificates](https://kubernetes.io/docs/tasks/tls/manual-rotation-of-ca-certificates/) - [Manage Cluster Daemons](https://kubernetes.io/docs/tasks/manage-daemon/) - [Building a Basic DaemonSet](https://kubernetes.io/docs/tasks/manage-daemon/create-daemon-set/) - [Perform a Rolling Update on a DaemonSet](https://kubernetes.io/docs/tasks/manage-daemon/update-daemon-set/) - [Perform a Rollback on a DaemonSet](https://kubernetes.io/docs/tasks/manage-daemon/rollback-daemon-set/) - [Running Pods on Only Some Nodes](https://kubernetes.io/docs/tasks/manage-daemon/pods-some-nodes/) - [Networking](https://kubernetes.io/docs/tasks/network/) - [Adding entries to Pod /etc/hosts with HostAliases](https://kubernetes.io/docs/tasks/network/customize-hosts-file-for-pods/) - [Extend Service IP Ranges](https://kubernetes.io/docs/tasks/network/extend-service-ip-ranges/) - [Kubernetes Default ServiceCIDR Reconfiguration](https://kubernetes.io/docs/tasks/network/reconfigure-default-service-ip-ranges/) - [Validate IPv4/IPv6 dual-stack](https://kubernetes.io/docs/tasks/network/validate-dual-stack/) - [Extend kubectl with plugins](https://kubernetes.io/docs/tasks/extend-kubectl/kubectl-plugins/) - [Manage HugePages](https://kubernetes.io/docs/tasks/manage-hugepages/scheduling-hugepages/) - [Schedule GPUs](https://kubernetes.io/docs/tasks/manage-gpus/scheduling-gpus/) - [Tutorials](https://kubernetes.io/docs/tutorials/) - [Hello Minikube](https://kubernetes.io/docs/tutorials/hello-minikube/) - [Learn Kubernetes Basics](https://kubernetes.io/docs/tutorials/kubernetes-basics/) - [Create a Cluster](https://kubernetes.io/docs/tutorials/kubernetes-basics/create-cluster/) - [Using Minikube to Create a Cluster](https://kubernetes.io/docs/tutorials/kubernetes-basics/create-cluster/cluster-intro/) - [Deploy an App](https://kubernetes.io/docs/tutorials/kubernetes-basics/deploy-app/) - [Using kubectl to Create a Deployment](https://kubernetes.io/docs/tutorials/kubernetes-basics/deploy-app/deploy-intro/) - [Explore Your App](https://kubernetes.io/docs/tutorials/kubernetes-basics/explore/) - [Viewing Pods and Nodes](https://kubernetes.io/docs/tutorials/kubernetes-basics/explore/explore-intro/) - [Expose Your App Publicly](https://kubernetes.io/docs/tutorials/kubernetes-basics/expose/) - [Using a Service to Expose Your App](https://kubernetes.io/docs/tutorials/kubernetes-basics/expose/expose-intro/) - [Scale Your App](https://kubernetes.io/docs/tutorials/kubernetes-basics/scale/) - [Running Multiple Instances of Your App](https://kubernetes.io/docs/tutorials/kubernetes-basics/scale/scale-intro/) - [Update Your App](https://kubernetes.io/docs/tutorials/kubernetes-basics/update/) - [Performing a Rolling Update](https://kubernetes.io/docs/tutorials/kubernetes-basics/update/update-intro/) - [Configuration](https://kubernetes.io/docs/tutorials/configuration/) - [Updating Configuration via a ConfigMap](https://kubernetes.io/docs/tutorials/configuration/updating-configuration-via-a-configmap/) - [Configuring Redis using a ConfigMap](https://kubernetes.io/docs/tutorials/configuration/configure-redis-using-configmap/) - [Adopting Sidecar Containers](https://kubernetes.io/docs/tutorials/configuration/pod-sidecar-containers/) - [Security](https://kubernetes.io/docs/tutorials/security/) - [Apply Pod Security Standards at the Cluster Level](https://kubernetes.io/docs/tutorials/security/cluster-level-pss/) - [Apply Pod Security Standards at the Namespace Level](https://kubernetes.io/docs/tutorials/security/ns-level-pss/) - [Restrict a Container's Access to Resources with AppArmor](https://kubernetes.io/docs/tutorials/security/apparmor/) - [Restrict a Container's Syscalls with seccomp](https://kubernetes.io/docs/tutorials/security/seccomp/) - [Stateless Applications](https://kubernetes.io/docs/tutorials/stateless-application/) - [Exposing an External IP Address to Access an Application in a Cluster](https://kubernetes.io/docs/tutorials/stateless-application/expose-external-ip-address/) - [Example: Deploying PHP Guestbook application with Redis](https://kubernetes.io/docs/tutorials/stateless-application/guestbook/) - [Stateful Applications](https://kubernetes.io/docs/tutorials/stateful-application/) - [StatefulSet Basics](https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/) - [Example: Deploying WordPress and MySQL with Persistent Volumes](https://kubernetes.io/docs/tutorials/stateful-application/mysql-wordpress-persistent-volume/) - [Example: Deploying Cassandra with a StatefulSet](https://kubernetes.io/docs/tutorials/stateful-application/cassandra/) - [Running ZooKeeper, A Distributed System Coordinator](https://kubernetes.io/docs/tutorials/stateful-application/zookeeper/) - [Cluster Management](https://kubernetes.io/docs/tutorials/cluster-management/) - [Running Kubelet in Standalone Mode](https://kubernetes.io/docs/tutorials/cluster-management/kubelet-standalone/) - [Configuring swap memory on Kubernetes nodes](https://kubernetes.io/docs/tutorials/cluster-management/provision-swap-memory/) - [Install Drivers and Allocate Devices with DRA](https://kubernetes.io/docs/tutorials/cluster-management/install-use-dra/) - [Namespaces Walkthrough](https://kubernetes.io/docs/tutorials/cluster-management/namespaces-walkthrough/) - [Services](https://kubernetes.io/docs/tutorials/services/) - [Connecting Applications with Services](https://kubernetes.io/docs/tutorials/services/connect-applications-service/) - [Using Source IP](https://kubernetes.io/docs/tutorials/services/source-ip/) - [Explore Termination Behavior for Pods And Their Endpoints](https://kubernetes.io/docs/tutorials/services/pods-and-endpoint-termination-flow/) - [Reference](https://kubernetes.io/docs/reference/) - [Glossary](https://kubernetes.io/docs/reference/glossary/) - [API Overview](https://kubernetes.io/docs/reference/using-api/) - [Declarative API Validation](https://kubernetes.io/docs/reference/using-api/declarative-validation/) - [Kubernetes API Concepts](https://kubernetes.io/docs/reference/using-api/api-concepts/) - [Server-Side Apply](https://kubernetes.io/docs/reference/using-api/server-side-apply/) - [Client Libraries](https://kubernetes.io/docs/reference/using-api/client-libraries/) - [Common Expression Language in Kubernetes](https://kubernetes.io/docs/reference/using-api/cel/) - [Kubernetes Deprecation Policy](https://kubernetes.io/docs/reference/using-api/deprecation-policy/) - [Deprecated API Migration Guide](https://kubernetes.io/docs/reference/using-api/deprecation-guide/) - [Kubernetes API health endpoints](https://kubernetes.io/docs/reference/using-api/health-checks/) - [API Access Control](https://kubernetes.io/docs/reference/access-authn-authz/) - [Authenticating](https://kubernetes.io/docs/reference/access-authn-authz/authentication/) - [Authenticating with Bootstrap Tokens](https://kubernetes.io/docs/reference/access-authn-authz/bootstrap-tokens/) - [Authorization](https://kubernetes.io/docs/reference/access-authn-authz/authorization/) - [Using RBAC Authorization](https://kubernetes.io/docs/reference/access-authn-authz/rbac/) - [Using Node Authorization](https://kubernetes.io/docs/reference/access-authn-authz/node/) - [Webhook Mode](https://kubernetes.io/docs/reference/access-authn-authz/webhook/) - [Using ABAC Authorization](https://kubernetes.io/docs/reference/access-authn-authz/abac/) - [Admission Control](https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/ "Admission Control in Kubernetes") - [Dynamic Admission Control](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/) - [Managing Service Accounts](https://kubernetes.io/docs/reference/access-authn-authz/service-accounts-admin/) - [User Impersonation](https://kubernetes.io/docs/reference/access-authn-authz/user-impersonation/) - [Certificates and Certificate Signing Requests](https://kubernetes.io/docs/reference/access-authn-authz/certificate-signing-requests/) - [Mapping PodSecurityPolicies to Pod Security Standards](https://kubernetes.io/docs/reference/access-authn-authz/psp-to-pod-security-standards/) - [Kubelet authentication/authorization](https://kubernetes.io/docs/reference/access-authn-authz/kubelet-authn-authz/) - [TLS bootstrapping](https://kubernetes.io/docs/reference/access-authn-authz/kubelet-tls-bootstrapping/) - [Mutating Admission Policy](https://kubernetes.io/docs/reference/access-authn-authz/mutating-admission-policy/) - [Validating Admission Policy](https://kubernetes.io/docs/reference/access-authn-authz/validating-admission-policy/) - [Well-Known Labels, Annotations and Taints](https://kubernetes.io/docs/reference/labels-annotations-taints/) - [Audit Annotations](https://kubernetes.io/docs/reference/labels-annotations-taints/audit-annotations/) - [Kubernetes API](https://kubernetes.io/docs/reference/kubernetes-api/) - [Workload Resources](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/) - [Pod](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/) - [Binding](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/binding-v1/) - [PodTemplate](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-template-v1/) - [ReplicationController](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/replication-controller-v1/) - [ReplicaSet](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/replica-set-v1/) - [Deployment](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/deployment-v1/) - [StatefulSet](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/stateful-set-v1/) - [ControllerRevision](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/controller-revision-v1/) - [DaemonSet](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/daemon-set-v1/) - [Job](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/job-v1/) - [CronJob](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/cron-job-v1/) - [HorizontalPodAutoscaler](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/horizontal-pod-autoscaler-v1/) - [HorizontalPodAutoscaler](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/horizontal-pod-autoscaler-v2/) - [PriorityClass](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/priority-class-v1/) - [DeviceTaintRule v1alpha3](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/device-taint-rule-v1alpha3/) - [ResourceClaim](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/resource-claim-v1/) - [ResourceClaimTemplate](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/resource-claim-template-v1/) - [ResourceSlice](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/resource-slice-v1/) - [Workload v1alpha1](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/workload-v1alpha1/) - [Service Resources](https://kubernetes.io/docs/reference/kubernetes-api/service-resources/) - [Service](https://kubernetes.io/docs/reference/kubernetes-api/service-resources/service-v1/) - [Endpoints](https://kubernetes.io/docs/reference/kubernetes-api/service-resources/endpoints-v1/) - [EndpointSlice](https://kubernetes.io/docs/reference/kubernetes-api/service-resources/endpoint-slice-v1/) - [Ingress](https://kubernetes.io/docs/reference/kubernetes-api/service-resources/ingress-v1/) - [IngressClass](https://kubernetes.io/docs/reference/kubernetes-api/service-resources/ingress-class-v1/) - [Config and Storage Resources](https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/) - [ConfigMap](https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/config-map-v1/) - [Secret](https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/secret-v1/) - [CSIDriver](https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/csi-driver-v1/) - [CSINode](https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/csi-node-v1/) - [CSIStorageCapacity](https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/csi-storage-capacity-v1/) - [PersistentVolumeClaim](https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1/) - [PersistentVolume](https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-v1/) - [StorageClass](https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/storage-class-v1/) - [StorageVersionMigration v1beta1](https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/storage-version-migration-v1beta1/) - [Volume](https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/volume/) - [VolumeAttachment](https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/volume-attachment-v1/) - [VolumeAttributesClass](https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/volume-attributes-class-v1/) - [Authentication Resources](https://kubernetes.io/docs/reference/kubernetes-api/authentication-resources/) - [ServiceAccount](https://kubernetes.io/docs/reference/kubernetes-api/authentication-resources/service-account-v1/) - [TokenRequest](https://kubernetes.io/docs/reference/kubernetes-api/authentication-resources/token-request-v1/) - [TokenReview](https://kubernetes.io/docs/reference/kubernetes-api/authentication-resources/token-review-v1/) - [CertificateSigningRequest](https://kubernetes.io/docs/reference/kubernetes-api/authentication-resources/certificate-signing-request-v1/) - [ClusterTrustBundle v1beta1](https://kubernetes.io/docs/reference/kubernetes-api/authentication-resources/cluster-trust-bundle-v1beta1/) - [SelfSubjectReview](https://kubernetes.io/docs/reference/kubernetes-api/authentication-resources/self-subject-review-v1/) - [PodCertificateRequest v1beta1](https://kubernetes.io/docs/reference/kubernetes-api/authentication-resources/pod-certificate-request-v1beta1/) - [Authorization Resources](https://kubernetes.io/docs/reference/kubernetes-api/authorization-resources/) - [LocalSubjectAccessReview](https://kubernetes.io/docs/reference/kubernetes-api/authorization-resources/local-subject-access-review-v1/) - [SelfSubjectAccessReview](https://kubernetes.io/docs/reference/kubernetes-api/authorization-resources/self-subject-access-review-v1/) - [SelfSubjectRulesReview](https://kubernetes.io/docs/reference/kubernetes-api/authorization-resources/self-subject-rules-review-v1/) - [SubjectAccessReview](https://kubernetes.io/docs/reference/kubernetes-api/authorization-resources/subject-access-review-v1/) - [ClusterRole](https://kubernetes.io/docs/reference/kubernetes-api/authorization-resources/cluster-role-v1/) - [ClusterRoleBinding](https://kubernetes.io/docs/reference/kubernetes-api/authorization-resources/cluster-role-binding-v1/) - [Role](https://kubernetes.io/docs/reference/kubernetes-api/authorization-resources/role-v1/) - [RoleBinding](https://kubernetes.io/docs/reference/kubernetes-api/authorization-resources/role-binding-v1/) - [Policy Resources](https://kubernetes.io/docs/reference/kubernetes-api/policy-resources/) - [FlowSchema](https://kubernetes.io/docs/reference/kubernetes-api/policy-resources/flow-schema-v1/) - [LimitRange](https://kubernetes.io/docs/reference/kubernetes-api/policy-resources/limit-range-v1/) - [ResourceQuota](https://kubernetes.io/docs/reference/kubernetes-api/policy-resources/resource-quota-v1/) - [NetworkPolicy](https://kubernetes.io/docs/reference/kubernetes-api/policy-resources/network-policy-v1/) - [PodDisruptionBudget](https://kubernetes.io/docs/reference/kubernetes-api/policy-resources/pod-disruption-budget-v1/) - [PriorityLevelConfiguration](https://kubernetes.io/docs/reference/kubernetes-api/policy-resources/priority-level-configuration-v1/) - [ValidatingAdmissionPolicy](https://kubernetes.io/docs/reference/kubernetes-api/policy-resources/validating-admission-policy-v1/) - [ValidatingAdmissionPolicyBinding](https://kubernetes.io/docs/reference/kubernetes-api/policy-resources/validating-admission-policy-binding-v1/) - [MutatingAdmissionPolicy v1beta1](https://kubernetes.io/docs/reference/kubernetes-api/policy-resources/mutating-admission-policy-v1beta1/) - [MutatingAdmissionPolicyBinding v1alpha1](https://kubernetes.io/docs/reference/kubernetes-api/policy-resources/mutating-admission-policy-binding-v1alpha1/) - [Extend Resources](https://kubernetes.io/docs/reference/kubernetes-api/extend-resources/) - [CustomResourceDefinition](https://kubernetes.io/docs/reference/kubernetes-api/extend-resources/custom-resource-definition-v1/) - [DeviceClass](https://kubernetes.io/docs/reference/kubernetes-api/extend-resources/device-class-v1/) - [MutatingWebhookConfiguration](https://kubernetes.io/docs/reference/kubernetes-api/extend-resources/mutating-webhook-configuration-v1/) - [ValidatingWebhookConfiguration](https://kubernetes.io/docs/reference/kubernetes-api/extend-resources/validating-webhook-configuration-v1/) - [Cluster Resources](https://kubernetes.io/docs/reference/kubernetes-api/cluster-resources/) - [APIService](https://kubernetes.io/docs/reference/kubernetes-api/cluster-resources/api-service-v1/) - [ComponentStatus](https://kubernetes.io/docs/reference/kubernetes-api/cluster-resources/component-status-v1/) - [Event](https://kubernetes.io/docs/reference/kubernetes-api/cluster-resources/event-v1/) - [IPAddress](https://kubernetes.io/docs/reference/kubernetes-api/cluster-resources/ip-address-v1/) - [Lease](https://kubernetes.io/docs/reference/kubernetes-api/cluster-resources/lease-v1/) - [LeaseCandidate v1beta1](https://kubernetes.io/docs/reference/kubernetes-api/cluster-resources/lease-candidate-v1beta1/) - [Namespace](https://kubernetes.io/docs/reference/kubernetes-api/cluster-resources/namespace-v1/) - [Node](https://kubernetes.io/docs/reference/kubernetes-api/cluster-resources/node-v1/) - [RuntimeClass](https://kubernetes.io/docs/reference/kubernetes-api/cluster-resources/runtime-class-v1/) - [ServiceCIDR](https://kubernetes.io/docs/reference/kubernetes-api/cluster-resources/service-cidr-v1/) - [Common Definitions](https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/) - [DeleteOptions](https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/delete-options/) - [LabelSelector](https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/label-selector/) - [ListMeta](https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/list-meta/) - [LocalObjectReference](https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/local-object-reference/) - [NodeSelectorRequirement](https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/node-selector-requirement/) - [ObjectFieldSelector](https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/object-field-selector/) - [ObjectMeta](https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/object-meta/) - [ObjectReference](https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/object-reference/) - [Patch](https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/patch/) - [Quantity](https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/quantity/) - [ResourceFieldSelector](https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/resource-field-selector/) - [Status](https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/status/) - [TypedLocalObjectReference](https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/typed-local-object-reference/) - [Other Resources](https://kubernetes.io/docs/reference/kubernetes-api/other-resources/) - [MutatingAdmissionPolicyBindingList v1beta1](https://kubernetes.io/docs/reference/kubernetes-api/other-resources/mutating-admission-policy-binding-list-v1beta1/) - [Common Parameters](https://kubernetes.io/docs/reference/kubernetes-api/common-parameters/common-parameters/) - [Instrumentation](https://kubernetes.io/docs/reference/instrumentation/) - [Service Level Indicator Metrics](https://kubernetes.io/docs/reference/instrumentation/slis/ "Kubernetes Component SLI Metrics") - [CRI Pod & Container Metrics](https://kubernetes.io/docs/reference/instrumentation/cri-pod-container-metrics/) - [Node metrics data](https://kubernetes.io/docs/reference/instrumentation/node-metrics/) - [Understand Pressure Stall Information (PSI) Metrics](https://kubernetes.io/docs/reference/instrumentation/understand-psi-metrics/) - [Kubernetes z-pages](https://kubernetes.io/docs/reference/instrumentation/zpages/) - [Kubernetes Metrics Reference](https://kubernetes.io/docs/reference/instrumentation/metrics/) - [Kubernetes Issues and Security](https://kubernetes.io/docs/reference/issues-security/) - [Kubernetes Issue Tracker](https://kubernetes.io/docs/reference/issues-security/issues/) - [Kubernetes Security and Disclosure Information](https://kubernetes.io/docs/reference/issues-security/security/) - [CVE feed](https://kubernetes.io/docs/reference/issues-security/official-cve-feed/ "Official CVE Feed") - [Node Reference Information](https://kubernetes.io/docs/reference/node/) - [Kubelet Checkpoint API](https://kubernetes.io/docs/reference/node/kubelet-checkpoint-api/) - [Linux Kernel Version Requirements](https://kubernetes.io/docs/reference/node/kernel-version-requirements/) - [Articles on dockershim Removal and on Using CRI-compatible Runtimes](https://kubernetes.io/docs/reference/node/topics-on-dockershim-and-cri-compatible-runtimes/) - [Node Labels Populated By The Kubelet](https://kubernetes.io/docs/reference/node/node-labels/) - [Local Files And Paths Used By The Kubelet](https://kubernetes.io/docs/reference/node/kubelet-files/) - [Kubelet Configuration Directory Merging](https://kubernetes.io/docs/reference/node/kubelet-config-directory-merging/) - [Kubelet Device Manager API Versions](https://kubernetes.io/docs/reference/node/device-plugin-api-versions/) - [Kubelet Systemd Watchdog](https://kubernetes.io/docs/reference/node/systemd-watchdog/) - [Node Status](https://kubernetes.io/docs/reference/node/node-status/) - [Seccomp and Kubernetes](https://kubernetes.io/docs/reference/node/seccomp/) - [Linux Node Swap Behaviors](https://kubernetes.io/docs/reference/node/swap-behavior/) - [Networking Reference](https://kubernetes.io/docs/reference/networking/) - [Protocols for Services](https://kubernetes.io/docs/reference/networking/service-protocols/) - [Ports and Protocols](https://kubernetes.io/docs/reference/networking/ports-and-protocols/) - [Virtual IPs and Service Proxies](https://kubernetes.io/docs/reference/networking/virtual-ips/) - [Setup tools](https://kubernetes.io/docs/reference/setup-tools/) - [Kubeadm](https://kubernetes.io/docs/reference/setup-tools/kubeadm/) - [kubeadm init](https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-init/) - [kubeadm join](https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-join/) - [kubeadm upgrade](https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-upgrade/) - [kubeadm upgrade phases](https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-upgrade-phase/) - [kubeadm config](https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-config/) - [kubeadm reset](https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-reset/) - [kubeadm token](https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-token/) - [kubeadm version](https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-version/) - [kubeadm alpha](https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-alpha/) - [kubeadm certs](https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-certs/) - [kubeadm init phase](https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-init-phase/) - [kubeadm join phase](https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-join-phase/) - [kubeadm kubeconfig](https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-kubeconfig/) - [kubeadm reset phase](https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-reset-phase/) - [Implementation details](https://kubernetes.io/docs/reference/setup-tools/kubeadm/implementation-details/) - [Command line tool (kubectl)](https://kubernetes.io/docs/reference/kubectl/) - [Introduction to kubectl](https://kubernetes.io/docs/reference/kubectl/introduction/) - [kubectl Quick Reference](https://kubernetes.io/docs/reference/kubectl/quick-reference/) - [kubectl reference](https://kubernetes.io/docs/reference/kubectl/generated/) - [kubectl](https://kubernetes.io/docs/reference/kubectl/generated/kubectl/) - [kubectl alpha](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_alpha/) - [kubectl alpha kuberc](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_alpha/kubectl_alpha_kuberc/) - [kubectl alpha kuberc set](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_alpha/kubectl_alpha_kuberc_set/) - [kubectl alpha kuberc view](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_alpha/kubectl_alpha_kuberc_view/) - [kubectl annotate](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_annotate/) - [kubectl api-resources](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_api-resources/) - [kubectl api-versions](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_api-versions/) - [kubectl apply](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_apply/) - [kubectl apply edit-last-applied](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_apply/kubectl_apply_edit-last-applied/) - [kubectl apply set-last-applied](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_apply/kubectl_apply_set-last-applied/) - [kubectl apply view-last-applied](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_apply/kubectl_apply_view-last-applied/) - [kubectl attach](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_attach/) - [kubectl auth](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_auth/) - [kubectl auth can-i](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_auth/kubectl_auth_can-i/) - [kubectl auth reconcile](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_auth/kubectl_auth_reconcile/) - [kubectl auth whoami](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_auth/kubectl_auth_whoami/) - [kubectl autoscale](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_autoscale/) - [kubectl certificate](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_certificate/) - [kubectl certificate approve](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_certificate/kubectl_certificate_approve/) - [kubectl certificate deny](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_certificate/kubectl_certificate_deny/) - [kubectl cluster-info](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_cluster-info/) - [kubectl cluster-info dump](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_cluster-info/kubectl_cluster-info_dump/) - [kubectl completion](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_completion/) - [kubectl config](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_config/) - [kubectl config current-context](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_config/kubectl_config_current-context/) - [kubectl config delete-cluster](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_config/kubectl_config_delete-cluster/) - [kubectl config delete-context](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_config/kubectl_config_delete-context/) - [kubectl config delete-user](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_config/kubectl_config_delete-user/) - [kubectl config get-clusters](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_config/kubectl_config_get-clusters/) - [kubectl config get-contexts](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_config/kubectl_config_get-contexts/) - [kubectl config get-users](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_config/kubectl_config_get-users/) - [kubectl config rename-context](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_config/kubectl_config_rename-context/) - [kubectl config set](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_config/kubectl_config_set/) - [kubectl config set-cluster](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_config/kubectl_config_set-cluster/) - [kubectl config set-context](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_config/kubectl_config_set-context/) - [kubectl config set-credentials](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_config/kubectl_config_set-credentials/) - [kubectl config unset](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_config/kubectl_config_unset/) - [kubectl config use-context](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_config/kubectl_config_use-context/) - [kubectl config view](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_config/kubectl_config_view/) - [kubectl cordon](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_cordon/) - [kubectl cp](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_cp/) - [kubectl create](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_create/) - [kubectl create clusterrole](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_create/kubectl_create_clusterrole/) - [kubectl create clusterrolebinding](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_create/kubectl_create_clusterrolebinding/) - [kubectl create configmap](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_create/kubectl_create_configmap/) - [kubectl create cronjob](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_create/kubectl_create_cronjob/) - [kubectl create deployment](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_create/kubectl_create_deployment/) - [kubectl create ingress](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_create/kubectl_create_ingress/) - [kubectl create job](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_create/kubectl_create_job/) - [kubectl create namespace](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_create/kubectl_create_namespace/) - [kubectl create poddisruptionbudget](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_create/kubectl_create_poddisruptionbudget/) - [kubectl create priorityclass](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_create/kubectl_create_priorityclass/) - [kubectl create quota](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_create/kubectl_create_quota/) - [kubectl create role](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_create/kubectl_create_role/) - [kubectl create rolebinding](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_create/kubectl_create_rolebinding/) - [kubectl create secret](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_create/kubectl_create_secret/) - [kubectl create secret docker-registry](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_create/kubectl_create_secret_docker-registry/) - [kubectl create secret generic](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_create/kubectl_create_secret_generic/) - [kubectl create secret tls](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_create/kubectl_create_secret_tls/) - [kubectl create service](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_create/kubectl_create_service/) - [kubectl create service clusterip](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_create/kubectl_create_service_clusterip/) - [kubectl create service externalname](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_create/kubectl_create_service_externalname/) - [kubectl create service loadbalancer](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_create/kubectl_create_service_loadbalancer/) - [kubectl create service nodeport](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_create/kubectl_create_service_nodeport/) - [kubectl create serviceaccount](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_create/kubectl_create_serviceaccount/) - [kubectl create token](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_create/kubectl_create_token/) - [kubectl debug](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_debug/) - [kubectl delete](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_delete/) - [kubectl describe](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_describe/) - [kubectl diff](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_diff/) - [kubectl drain](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_drain/) - [kubectl edit](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_edit/) - [kubectl events](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_events/) - [kubectl exec](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_exec/) - [kubectl explain](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_explain/) - [kubectl expose](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_expose/) - [kubectl get](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_get/) - [kubectl kustomize](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_kustomize/) - [kubectl label](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_label/) - [kubectl logs](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_logs/) - [kubectl options](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_options/) - [kubectl patch](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_patch/) - [kubectl plugin](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_plugin/) - [kubectl plugin list](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_plugin/kubectl_plugin_list/) - [kubectl port-forward](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_port-forward/) - [kubectl proxy](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_proxy/) - [kubectl replace](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_replace/) - [kubectl rollout](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_rollout/) - [kubectl rollout history](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_rollout/kubectl_rollout_history/) - [kubectl rollout pause](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_rollout/kubectl_rollout_pause/) - [kubectl rollout restart](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_rollout/kubectl_rollout_restart/) - [kubectl rollout resume](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_rollout/kubectl_rollout_resume/) - [kubectl rollout status](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_rollout/kubectl_rollout_status/) - [kubectl rollout undo](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_rollout/kubectl_rollout_undo/) - [kubectl run](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_run/) - [kubectl scale](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_scale/) - [kubectl set](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_set/) - [kubectl set env](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_set/kubectl_set_env/) - [kubectl set image](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_set/kubectl_set_image/) - [kubectl set resources](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_set/kubectl_set_resources/) - [kubectl set selector](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_set/kubectl_set_selector/) - [kubectl set serviceaccount](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_set/kubectl_set_serviceaccount/) - [kubectl set subject](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_set/kubectl_set_subject/) - [kubectl taint](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_taint/) - [kubectl top](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_top/) - [kubectl top node](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_top/kubectl_top_node/) - [kubectl top pod](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_top/kubectl_top_pod/) - [kubectl uncordon](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_uncordon/) - [kubectl version](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_version/) - [kubectl wait](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_wait/) - [kubectl Commands](https://kubernetes.io/docs/reference/kubectl/kubectl-cmds/) - [kubectl](https://kubernetes.io/docs/reference/kubectl/kubectl/) - [JSONPath Support](https://kubernetes.io/docs/reference/kubectl/jsonpath/) - [kubectl for Docker Users](https://kubernetes.io/docs/reference/kubectl/docker-cli-to-kubectl/) - [kubectl Usage Conventions](https://kubernetes.io/docs/reference/kubectl/conventions/) - [Kubectl user preferences (kuberc)](https://kubernetes.io/docs/reference/kubectl/kuberc/) - [Encodings](https://kubernetes.io/docs/reference/encodings/) - [KYAML Reference](https://kubernetes.io/docs/reference/encodings/kyaml/) - [Component tools](https://kubernetes.io/docs/reference/command-line-tools-reference/) - [Feature Gates](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/) - [Feature Gates (removed)](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates-removed/) - [kube-apiserver](https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/) - [kube-controller-manager](https://kubernetes.io/docs/reference/command-line-tools-reference/kube-controller-manager/) - [kube-proxy](https://kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/) - [kube-scheduler](https://kubernetes.io/docs/reference/command-line-tools-reference/kube-scheduler/) - [kubelet](https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/) - [Debug cluster](https://kubernetes.io/docs/reference/debug-cluster/) - [Flow control](https://kubernetes.io/docs/reference/debug-cluster/flow-control/) - [Configuration APIs](https://kubernetes.io/docs/reference/config-api/) - [Client Authentication (v1)](https://kubernetes.io/docs/reference/config-api/client-authentication.v1/) - [Client Authentication (v1beta1)](https://kubernetes.io/docs/reference/config-api/client-authentication.v1beta1/) - [Event Rate Limit Configuration (v1alpha1)](https://kubernetes.io/docs/reference/config-api/apiserver-eventratelimit.v1alpha1/) - [Image Policy API (v1alpha1)](https://kubernetes.io/docs/reference/config-api/imagepolicy.v1alpha1/) - [kube-apiserver Admission (v1)](https://kubernetes.io/docs/reference/config-api/apiserver-admission.v1/) - [kube-apiserver Audit Configuration (v1)](https://kubernetes.io/docs/reference/config-api/apiserver-audit.v1/) - [kube-apiserver Configuration (v1)](https://kubernetes.io/docs/reference/config-api/apiserver-config.v1/) - [kube-apiserver Configuration (v1alpha1)](https://kubernetes.io/docs/reference/config-api/apiserver-config.v1alpha1/) - [kube-apiserver Configuration (v1beta1)](https://kubernetes.io/docs/reference/config-api/apiserver-config.v1beta1/) - [kube-controller-manager Configuration (v1alpha1)](https://kubernetes.io/docs/reference/config-api/kube-controller-manager-config.v1alpha1/) - [kube-proxy Configuration (v1alpha1)](https://kubernetes.io/docs/reference/config-api/kube-proxy-config.v1alpha1/) - [kube-scheduler Configuration (v1)](https://kubernetes.io/docs/reference/config-api/kube-scheduler-config.v1/) - [kubeadm Configuration (v1beta3)](https://kubernetes.io/docs/reference/config-api/kubeadm-config.v1beta3/) - [kubeadm Configuration (v1beta4)](https://kubernetes.io/docs/reference/config-api/kubeadm-config.v1beta4/) - [kubeconfig (v1)](https://kubernetes.io/docs/reference/config-api/kubeconfig.v1/) - [Kubelet Configuration (v1)](https://kubernetes.io/docs/reference/config-api/kubelet-config.v1/) - [Kubelet Configuration (v1alpha1)](https://kubernetes.io/docs/reference/config-api/kubelet-config.v1alpha1/) - [Kubelet Configuration (v1beta1)](https://kubernetes.io/docs/reference/config-api/kubelet-config.v1beta1/) - [Kubelet CredentialProvider (v1)](https://kubernetes.io/docs/reference/config-api/kubelet-credentialprovider.v1/) - [kuberc (v1alpha1)](https://kubernetes.io/docs/reference/config-api/kuberc.v1alpha1/) - [kuberc (v1beta1)](https://kubernetes.io/docs/reference/config-api/kuberc.v1beta1/) - [WebhookAdmission Configuration (v1)](https://kubernetes.io/docs/reference/config-api/apiserver-webhookadmission.v1/) - [External APIs](https://kubernetes.io/docs/reference/external-api/) - [Kubernetes Custom Metrics (v1beta2)](https://kubernetes.io/docs/reference/external-api/custom-metrics.v1beta2/) - [Kubernetes External Metrics (v1beta1)](https://kubernetes.io/docs/reference/external-api/external-metrics.v1beta1/) - [Kubernetes Metrics (v1beta1)](https://kubernetes.io/docs/reference/external-api/metrics.v1beta1/) - [Scheduling](https://kubernetes.io/docs/reference/scheduling/) - [Scheduler Configuration](https://kubernetes.io/docs/reference/scheduling/config/) - [Scheduling Policies](https://kubernetes.io/docs/reference/scheduling/policies/) - [Other Tools](https://kubernetes.io/docs/reference/tools/) - [Contribute](https://kubernetes.io/docs/contribute/ "Contribute to Kubernetes") - [Contribute to Kubernetes Documentation](https://kubernetes.io/docs/contribute/docs/) - [Contributing to Kubernetes blogs](https://kubernetes.io/docs/contribute/blog/) - [Submitting articles to Kubernetes blogs](https://kubernetes.io/docs/contribute/blog/article-submission/) - [Blog guidelines](https://kubernetes.io/docs/contribute/blog/guidelines/) - [Blog article mirroring](https://kubernetes.io/docs/contribute/blog/article-mirroring/) - [Post-release communications](https://kubernetes.io/docs/contribute/blog/release-comms/) - [Helping as a blog writing buddy](https://kubernetes.io/docs/contribute/blog/writing-buddy/) - [Suggesting content improvements](https://kubernetes.io/docs/contribute/suggesting-improvements/) - [Contributing new content](https://kubernetes.io/docs/contribute/new-content/) - [Opening a pull request](https://kubernetes.io/docs/contribute/new-content/open-a-pr/) - [Previewing locally](https://kubernetes.io/docs/contribute/new-content/preview-locally/) - [Documenting for a release](https://kubernetes.io/docs/contribute/new-content/new-features/ "Documenting a feature for a release") - [Case studies](https://kubernetes.io/docs/contribute/new-content/case-studies/ "Submitting case studies") - [Reviewing changes](https://kubernetes.io/docs/contribute/review/) - [Reviewing pull requests](https://kubernetes.io/docs/contribute/review/reviewing-prs/) - [For approvers and reviewers](https://kubernetes.io/docs/contribute/review/for-approvers/ "Reviewing for approvers and reviewers") - [Localizing Kubernetes documentation](https://kubernetes.io/docs/contribute/localization/) - [Participating in SIG Docs](https://kubernetes.io/docs/contribute/participate/) - [Roles and responsibilities](https://kubernetes.io/docs/contribute/participate/roles-and-responsibilities/) - [Issue Wranglers](https://kubernetes.io/docs/contribute/participate/issue-wrangler/) - [PR wranglers](https://kubernetes.io/docs/contribute/participate/pr-wranglers/) - [Documentation style overview](https://kubernetes.io/docs/contribute/style/) - [Content guide](https://kubernetes.io/docs/contribute/style/content-guide/ "Documentation Content Guide") - [Style guide](https://kubernetes.io/docs/contribute/style/style-guide/ "Documentation Style Guide") - [Diagram guide](https://kubernetes.io/docs/contribute/style/diagram-guide/ "Diagram Guide") - [Writing a new topic](https://kubernetes.io/docs/contribute/style/write-new-topic/) - [Page content types](https://kubernetes.io/docs/contribute/style/page-content-types/) - [Content organization](https://kubernetes.io/docs/contribute/style/content-organization/) - [Custom Hugo Shortcodes](https://kubernetes.io/docs/contribute/style/hugo-shortcodes/) - [Updating Reference Documentation](https://kubernetes.io/docs/contribute/generate-ref-docs/) - [Quickstart](https://kubernetes.io/docs/contribute/generate-ref-docs/quickstart/ "Reference Documentation Quickstart") - [Contributing to the Upstream Kubernetes Code](https://kubernetes.io/docs/contribute/generate-ref-docs/contribute-upstream/) - [Generating Reference Documentation for the Kubernetes API](https://kubernetes.io/docs/contribute/generate-ref-docs/kubernetes-api/) - [Generating Reference Documentation for kubectl Commands](https://kubernetes.io/docs/contribute/generate-ref-docs/kubectl/) - [Generating Reference Documentation for Metrics](https://kubernetes.io/docs/contribute/generate-ref-docs/metrics-reference/) - [Generating Reference Pages for Kubernetes Components and Tools](https://kubernetes.io/docs/contribute/generate-ref-docs/kubernetes-components/) - [Advanced contributing](https://kubernetes.io/docs/contribute/advanced/) - [Viewing Site Analytics](https://kubernetes.io/docs/contribute/analytics/) - [Docs smoke test page](https://kubernetes.io/docs/test/) [Edit this page](https://github.com/kubernetes/website/edit/main/content/en/docs/reference/kubectl/_index.md) [Create child page](https://github.com/kubernetes/website/new/main/content/en/docs/reference/kubectl/_index.md?filename=change-me.md&value=---%0Atitle%3A+%22Long+Page+Title%22%0AlinkTitle%3A+%22Short+Nav+Title%22%0Aweight%3A+100%0Adescription%3A+%3E-%0A+++++Page+description+for+heading+and+indexes.%0A---%0A%0A%23%23+Heading%0A%0AEdit+this+template+to+create+your+new+page.%0A%0A%2A+Give+it+a+good+name%2C+ending+in+%60.md%60+-+e.g.+%60getting-started.md%60%0A%2A+Edit+the+%22front+matter%22+section+at+the+top+of+the+page+%28weight+controls+how+its+ordered+amongst+other+pages+in+the+same+directory%3B+lowest+number+first%29.%0A%2A+Add+a+good+commit+message+at+the+bottom+of+the+page+%28%3C80+characters%3B+use+the+extended+description+field+for+more+detail%29.%0A%2A+Create+a+new+branch+so+you+can+preview+your+new+file+and+request+a+review+via+Pull+Request.%0A) [Create an issue](https://github.com/kubernetes/website/issues/new?title=Command%20line%20tool%20%28kubectl%29) [Print entire section](https://kubernetes.io/docs/reference/kubectl/_print/) - [Syntax](https://kubernetes.io/docs/reference/kubectl/#syntax) - [In-cluster authentication and namespace overrides](https://kubernetes.io/docs/reference/kubectl/#in-cluster-authentication-and-namespace-overrides) - [Operations](https://kubernetes.io/docs/reference/kubectl/#operations) - [Resource types](https://kubernetes.io/docs/reference/kubectl/#resource-types) - [Output options](https://kubernetes.io/docs/reference/kubectl/#output-options) - [Formatting output](https://kubernetes.io/docs/reference/kubectl/#formatting-output) - [Sorting list objects](https://kubernetes.io/docs/reference/kubectl/#sorting-list-objects) - [Examples: Common operations](https://kubernetes.io/docs/reference/kubectl/#examples-common-operations) - [Examples: Creating and using plugins](https://kubernetes.io/docs/reference/kubectl/#examples-creating-and-using-plugins) - [What's next](https://kubernetes.io/docs/reference/kubectl/#what-s-next) 1. [Kubernetes Documentation](https://kubernetes.io/docs/) 2. [Reference](https://kubernetes.io/docs/reference/) 3. [Command line tool (kubectl)](https://kubernetes.io/docs/reference/kubectl/) # Command line tool (kubectl) Kubernetes provides a command line tool for communicating with a Kubernetes cluster's [control plane](https://kubernetes.io/docs/reference/glossary/?all=true#term-control-plane "The container orchestration layer that exposes the API and interfaces to define, deploy, and manage the lifecycle of containers."), using the Kubernetes API. This tool is named `kubectl`. For configuration, `kubectl` looks for a file named `config` in the `$HOME/.kube` directory. You can specify other [kubeconfig](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/) files by setting the `KUBECONFIG` environment variable or by setting the [`--kubeconfig`](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/) flag. This overview covers `kubectl` syntax, describes the command operations, and provides common examples. For details about each command, including all the supported flags and subcommands, see the [kubectl](https://kubernetes.io/docs/reference/kubectl/generated/kubectl/) reference documentation. For a overview, see [The kubectl command-line tool](https://kubernetes.io/docs/concepts/overview/kubectl/). For installation instructions, see [Installing kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl); for a quick guide, see the [cheat sheet](https://kubernetes.io/docs/reference/kubectl/quick-reference/). If you're used to using the `docker` command-line tool, [`kubectl` for Docker Users](https://kubernetes.io/docs/reference/kubectl/docker-cli-to-kubectl/) explains some equivalent commands for Kubernetes. ## Syntax Use the following syntax to run `kubectl` commands from your terminal window: ``` kubectl [command] [TYPE] [NAME] [flags] ``` where `command`, `TYPE`, `NAME`, and `flags` are: - `command`: Specifies the operation that you want to perform on one or more resources, for example `create`, `get`, `describe`, `delete`. - `TYPE`: Specifies the [resource type](https://kubernetes.io/docs/reference/kubectl/#resource-types). Resource types are case-insensitive and you can specify the singular, plural, or abbreviated forms. For example, the following commands produce the same output: ``` kubectl get pod pod1 kubectl get pods pod1 kubectl get po pod1 ``` - `NAME`: Specifies the name of the resource. Names are case-sensitive. If the name is omitted, details for all resources are displayed, for example `kubectl get pods`. When performing an operation on multiple resources, you can specify each resource by type and name or specify one or more files: - To specify resources by type and name: - To group resources if they are all the same type: `TYPE1 name1 name2 name<#>`. Example: `kubectl get pod example-pod1 example-pod2` - To specify multiple resource types individually: `TYPE1/name1 TYPE1/name2 TYPE2/name3 TYPE<#>/name<#>`. Example: `kubectl get pod/example-pod1 replicationcontroller/example-rc1` - To specify resources with one or more files: `-f file1 -f file2 -f file<#>` - Use YAML rather than JSON since YAML tends to be more user-friendly, especially for configuration files. Example: `kubectl get -f ./pod.yaml` - `flags`: Specifies optional flags. For example, you can use the `-s` or `--server` flags to specify the address and port of the Kubernetes API server. #### Caution: Flags that you specify from the command line override default values and any corresponding environment variables. If you need help, run `kubectl help` from the terminal window. ## In-cluster authentication and namespace overrides By default `kubectl` will first determine if it is running within a pod, and thus in a cluster. It starts by checking for the `KUBERNETES_SERVICE_HOST` and `KUBERNETES_SERVICE_PORT` environment variables and the existence of a service account token file at `/var/run/secrets/kubernetes.io/serviceaccount/token`. If all three are found in-cluster authentication is assumed. To maintain backwards compatibility, if the `POD_NAMESPACE` environment variable is set during in-cluster authentication it will override the default namespace from the service account token. Any manifests or tools relying on namespace defaulting will be affected by this. **`POD_NAMESPACE` environment variable** If the `POD_NAMESPACE` environment variable is set, cli operations on namespaced resources will default to the variable value. For example, if the variable is set to `seattle`, `kubectl get pods` would return pods in the `seattle` namespace. This is because pods are a namespaced resource, and no namespace was provided in the command. Review the output of `kubectl api-resources` to determine if a resource is namespaced. Explicit use of `--namespace <value>` overrides this behavior. **How kubectl handles ServiceAccount tokens** If: - there is Kubernetes service account token file mounted at `/var/run/secrets/kubernetes.io/serviceaccount/token`, and - the `KUBERNETES_SERVICE_HOST` environment variable is set, and - the `KUBERNETES_SERVICE_PORT` environment variable is set, and - you don't explicitly specify a namespace on the kubectl command line then kubectl assumes it is running in your cluster. The kubectl tool looks up the namespace of that ServiceAccount (this is the same as the namespace of the Pod) and acts against that namespace. This is different from what happens outside of a cluster; when kubectl runs outside a cluster and you don't specify a namespace, the kubectl command acts against the namespace set for the current context in your client configuration. To change the default namespace for your kubectl you can use the following command: ``` kubectl config set-context --current --namespace=<namespace-name> ``` ## Operations The following table includes short descriptions and the general syntax for all of the `kubectl` operations: | Operation | Syntax | Description | |---|---|---| | `alpha` | `kubectl alpha SUBCOMMAND [flags]` | List the available commands that correspond to alpha features, which are not enabled in Kubernetes clusters by default. | | `annotate` | `kubectl annotate (-f FILENAME | TYPE NAME | TYPE/NAME) KEY_1=VAL_1 ... KEY_N=VAL_N [--overwrite] [--all] [--resource-version=version] [flags]` | Add or update the annotations of one or more resources. | | `api-resources` | `kubectl api-resources [flags]` | List the API resources that are available. | | `api-versions` | `kubectl api-versions [flags]` | List the API versions that are available. | | `apply` | `kubectl apply -f FILENAME [flags]` | Apply a configuration change to a resource from a file or stdin. | | `attach` | `kubectl attach POD -c CONTAINER [-i] [-t] [flags]` | Attach to a running container either to view the output stream or interact with the container (stdin). | | `auth` | `kubectl auth [flags] [options]` | Inspect authorization. | | `autoscale` | `kubectl autoscale (-f FILENAME | TYPE NAME | TYPE/NAME) [--min=MINPODS] --max=MAXPODS [--cpu=CPU] [flags]` | Automatically scale the set of pods that are managed by a replication controller. | | `certificate` | `kubectl certificate SUBCOMMAND [options]` | Modify certificate resources. | | `cluster-info` | `kubectl cluster-info [flags]` | Display endpoint information about the master and services in the cluster. | | `completion` | `kubectl completion SHELL [options]` | Output shell completion code for the specified shell (bash or zsh). | | `config` | `kubectl config SUBCOMMAND [flags]` | Modifies kubeconfig files. See the individual subcommands for details. | | `convert` | `kubectl convert -f FILENAME [options]` | Convert config files between different API versions. Both YAML and JSON formats are accepted. Note - requires `kubectl-convert` plugin to be installed. | | `cordon` | `kubectl cordon NODE [options]` | Mark node as unschedulable. | | `cp` | `kubectl cp <file-spec-src> <file-spec-dest> [options]` | Copy files and directories to and from containers. | | `create` | `kubectl create -f FILENAME [flags]` | Create one or more resources from a file or stdin. | | `delete` | `kubectl delete (-f FILENAME | TYPE [NAME | /NAME | -l label | --all]) [flags]` | Delete resources either from a file, stdin, or specifying label selectors, names, resource selectors, or resources. | | `describe` | `kubectl describe (-f FILENAME | TYPE [NAME_PREFIX | /NAME | -l label]) [flags]` | Display the detailed state of one or more resources. | | `diff` | `kubectl diff -f FILENAME [flags]` | Diff file or stdin against live configuration. | | `drain` | `kubectl drain NODE [options]` | Drain node in preparation for maintenance. | | `edit` | `kubectl edit (-f FILENAME | TYPE NAME | TYPE/NAME) [flags]` | Edit and update the definition of one or more resources on the server by using the default editor. | | `events` | `kubectl events` | List events | | `exec` | `kubectl exec POD [-c CONTAINER] [-i] [-t] [flags] [-- COMMAND [args...]]` | Execute a command against a container in a pod. | | `explain` | `kubectl explain TYPE [--recursive=false] [flags]` | Get documentation of various resources. For instance pods, nodes, services, etc. | | `expose` | `kubectl expose (-f FILENAME | TYPE NAME | TYPE/NAME) [--port=port] [--protocol=TCP|UDP] [--target-port=number-or-name] [--name=name] [--external-ip=external-ip-of-service] [--type=type] [flags]` | Expose a replication controller, service, or pod as a new Kubernetes service. | | `get` | `kubectl get (-f FILENAME | TYPE [NAME | /NAME | -l label]) [--watch] [--sort-by=FIELD] [[-o | --output]=OUTPUT_FORMAT] [flags]` | List one or more resources. | | `kustomize` | `kubectl kustomize <dir> [flags] [options]` | List a set of API resources generated from instructions in a kustomization.yaml file. The argument must be the path to the directory containing the file, or a git repository URL with a path suffix specifying same with respect to the repository root. | | `label` | `kubectl label (-f FILENAME | TYPE NAME | TYPE/NAME) KEY_1=VAL_1 ... KEY_N=VAL_N [--overwrite] [--all] [--resource-version=version] [flags]` | Add or update the labels of one or more resources. | | `logs` | `kubectl logs POD [-c CONTAINER] [--follow] [flags]` | Print the logs for a container in a pod. | | `options` | `kubectl options` | List of global command-line options, which apply to all commands. | | `patch` | `kubectl patch (-f FILENAME | TYPE NAME | TYPE/NAME) --patch PATCH [flags]` | Update one or more fields of a resource by using the strategic merge patch process. | | `plugin` | `kubectl plugin [flags] [options]` | Provides utilities for interacting with plugins. | | `port-forward` | `kubectl port-forward POD [LOCAL_PORT:]REMOTE_PORT [...[LOCAL_PORT_N:]REMOTE_PORT_N] [flags]` | Forward one or more local ports to a pod. | | `proxy` | `kubectl proxy [--port=PORT] [--www=static-dir] [--www-prefix=prefix] [--api-prefix=prefix] [flags]` | Run a proxy to the Kubernetes API server. | | `replace` | `kubectl replace -f FILENAME` | Replace a resource from a file or stdin. | | `rollout` | `kubectl rollout SUBCOMMAND [options]` | Manage the rollout of a resource. Valid resource types include: deployments, daemonsets and statefulsets. | | `run` | `kubectl run NAME --image=image [--env="key=value"] [--port=port] [--dry-run=server|client|none] [--overrides=inline-json] [flags]` | Run a specified image on the cluster. | | `scale` | `kubectl scale (-f FILENAME | TYPE NAME | TYPE/NAME) --replicas=COUNT [--resource-version=version] [--current-replicas=count] [flags]` | Update the size of the specified replication controller. | | `set` | `kubectl set SUBCOMMAND [options]` | Configure application resources. | | `taint` | `kubectl taint NODE NAME KEY_1=VAL_1:TAINT_EFFECT_1 ... KEY_N=VAL_N:TAINT_EFFECT_N [options]` | Update the taints on one or more nodes. | | `top` | `kubectl top (POD | NODE) [flags] [options]` | Display Resource (CPU/Memory/Storage) usage of pod or node. | | `uncordon` | `kubectl uncordon NODE [options]` | Mark node as schedulable. | | `version` | `kubectl version [--client] [flags]` | Display the Kubernetes version running on the client and server. | | `wait` | `kubectl wait ([-f FILENAME] | resource.group/resource.name | resource.group [(-l label | --all)]) [--for=delete|--for condition=available] [options]` | Experimental: Wait for a specific condition on one or many resources. | To learn more about command operations, see the [kubectl](https://kubernetes.io/docs/reference/kubectl/kubectl/) reference documentation. ## Resource types The following table includes a list of all the supported resource types and their abbreviated aliases. (This output can be retrieved from `kubectl api-resources`, and was accurate as of Kubernetes 1.25.0) | NAME | SHORTNAMES | APIVERSION | NAMESPACED | KIND | |---|---|---|---|---| | `bindings` | | v1 | true | Binding | | `componentstatuses` | `cs` | v1 | false | ComponentStatus | | `configmaps` | `cm` | v1 | true | ConfigMap | | `endpoints` | `ep` | v1 | true | Endpoints | | `events` | `ev` | v1 | true | Event | | `limitranges` | `limits` | v1 | true | LimitRange | | `namespaces` | `ns` | v1 | false | Namespace | | `nodes` | `no` | v1 | false | Node | | `persistentvolumeclaims` | `pvc` | v1 | true | PersistentVolumeClaim | | `persistentvolumes` | `pv` | v1 | false | PersistentVolume | | `pods` | `po` | v1 | true | Pod | | `podtemplates` | | v1 | true | PodTemplate | | `replicationcontrollers` | `rc` | v1 | true | ReplicationController | | `resourcequotas` | `quota` | v1 | true | ResourceQuota | | `secrets` | | v1 | true | Secret | | `serviceaccounts` | `sa` | v1 | true | ServiceAccount | | `services` | `svc` | v1 | true | Service | | `mutatingwebhookconfigurations` | | admissionregistration.k8s.io/v1 | false | MutatingWebhookConfiguration | | `validatingwebhookconfigurations` | | admissionregistration.k8s.io/v1 | false | ValidatingWebhookConfiguration | | `customresourcedefinitions` | `crd,crds` | apiextensions.k8s.io/v1 | false | CustomResourceDefinition | | `apiservices` | | apiregistration.k8s.io/v1 | false | APIService | | `controllerrevisions` | | apps/v1 | true | ControllerRevision | | `daemonsets` | `ds` | apps/v1 | true | DaemonSet | | `deployments` | `deploy` | apps/v1 | true | Deployment | | `replicasets` | `rs` | apps/v1 | true | ReplicaSet | | `statefulsets` | `sts` | apps/v1 | true | StatefulSet | | `tokenreviews` | | authentication.k8s.io/v1 | false | TokenReview | | `localsubjectaccessreviews` | | authorization.k8s.io/v1 | true | LocalSubjectAccessReview | | `selfsubjectaccessreviews` | | authorization.k8s.io/v1 | false | SelfSubjectAccessReview | | `selfsubjectrulesreviews` | | authorization.k8s.io/v1 | false | SelfSubjectRulesReview | | `subjectaccessreviews` | | authorization.k8s.io/v1 | false | SubjectAccessReview | | `horizontalpodautoscalers` | `hpa` | autoscaling/v2 | true | HorizontalPodAutoscaler | | `cronjobs` | `cj` | batch/v1 | true | CronJob | | `jobs` | | batch/v1 | true | Job | | `certificatesigningrequests` | `csr` | certificates.k8s.io/v1 | false | CertificateSigningRequest | | `leases` | | coordination.k8s.io/v1 | true | Lease | | `endpointslices` | | discovery.k8s.io/v1 | true | EndpointSlice | | `events` | `ev` | events.k8s.io/v1 | true | Event | | `flowschemas` | | flowcontrol.apiserver.k8s.io/v1beta2 | false | FlowSchema | | `prioritylevelconfigurations` | | flowcontrol.apiserver.k8s.io/v1beta2 | false | PriorityLevelConfiguration | | `ingressclasses` | | networking.k8s.io/v1 | false | IngressClass | | `ingresses` | `ing` | networking.k8s.io/v1 | true | Ingress | | `networkpolicies` | `netpol` | networking.k8s.io/v1 | true | NetworkPolicy | | `runtimeclasses` | | node.k8s.io/v1 | false | RuntimeClass | | `poddisruptionbudgets` | `pdb` | policy/v1 | true | PodDisruptionBudget | | `podsecuritypolicies` | `psp` | policy/v1beta1 | false | PodSecurityPolicy | | `clusterrolebindings` | | rbac.authorization.k8s.io/v1 | false | ClusterRoleBinding | | `clusterroles` | | rbac.authorization.k8s.io/v1 | false | ClusterRole | | `rolebindings` | | rbac.authorization.k8s.io/v1 | true | RoleBinding | | `roles` | | rbac.authorization.k8s.io/v1 | true | Role | | `priorityclasses` | `pc` | scheduling.k8s.io/v1 | false | PriorityClass | | `csidrivers` | | storage.k8s.io/v1 | false | CSIDriver | | `csinodes` | | storage.k8s.io/v1 | false | CSINode | | `csistoragecapacities` | | storage.k8s.io/v1 | true | CSIStorageCapacity | | `storageclasses` | `sc` | storage.k8s.io/v1 | false | StorageClass | | `volumeattachments` | | storage.k8s.io/v1 | false | VolumeAttachment | ## Output options Use the following sections for information about how you can format or sort the output of certain commands. For details about which commands support the various output options, see the [kubectl](https://kubernetes.io/docs/reference/kubectl/kubectl/) reference documentation. ### Formatting output The default output format for all `kubectl` commands is the human readable plain-text format. To output details to your terminal window in a specific format, you can add either the `-o` or `--output` flags to a supported `kubectl` command. #### Syntax ``` kubectl [command] [TYPE] [NAME] -o <output_format> ``` Depending on the `kubectl` operation, the following output formats are supported: | Output format | Description | |---|---| | `-o custom-columns=<spec>` | Print a table using a comma separated list of [custom columns](https://kubernetes.io/docs/reference/kubectl/#custom-columns). | | `-o custom-columns-file=<filename>` | Print a table using the [custom columns](https://kubernetes.io/docs/reference/kubectl/#custom-columns) template in the `<filename>` file. | | `-o json` | Output a JSON formatted API object. | | `-o jsonpath=<template>` | Print the fields defined in a [jsonpath](https://kubernetes.io/docs/reference/kubectl/jsonpath/) expression. | | `-o jsonpath-file=<filename>` | Print the fields defined by the [jsonpath](https://kubernetes.io/docs/reference/kubectl/jsonpath/) expression in the `<filename>` file. | | `-o kyaml` | Output a [KYAML](https://kubernetes.io/docs/reference/encodings/kyaml/) formatted API object (beta). | | `-o name` | Print only the resource name and nothing else. | | `-o wide` | Output in the plain-text format with any additional information. For pods, the node name is included. | | `-o yaml` | Output a YAML formatted API object. KYAML is an experimental Kubernetes-specific dialect of YAML, and can be parsed as YAML. | ##### Example In this example, the following command outputs the details for a single pod as a YAML formatted object: ``` kubectl get pod web-pod-13je7 -o yaml ``` Remember: See the [kubectl](https://kubernetes.io/docs/reference/kubectl/kubectl/) reference documentation for details about which output format is supported by each command. #### Custom columns To define custom columns and output only the details that you want into a table, you can use the `custom-columns` option. You can choose to define the custom columns inline or use a template file: `-o custom-columns=<spec>` or `-o custom-columns-file=<filename>`. ##### Examples Inline: ``` kubectl get pods <pod-name> -o custom-columns=NAME:.metadata.name,RSRC:.metadata.resourceVersion ``` Template file: ``` kubectl get pods <pod-name> -o custom-columns-file=template.txt ``` where the `template.txt` file contains: ``` NAME RSRC metadata.name metadata.resourceVersion ``` The result of running either command is similar to: ``` NAME RSRC submit-queue 610995 ``` #### Server-side columns `kubectl` supports receiving specific column information from the server about objects. This means that for any given resource, the server will return columns and rows relevant to that resource, for the client to print. This allows for consistent human-readable output across clients used against the same cluster, by having the server encapsulate the details of printing. This feature is enabled by default. To disable it, add the `--server-print=false` flag to the `kubectl get` command. ##### Examples To print information about the status of a pod, use a command like the following: ``` kubectl get pods <pod-name> --server-print=false ``` The output is similar to: ``` NAME AGE pod-name 1m ``` ### Sorting list objects To output objects to a sorted list in your terminal window, you can add the `--sort-by` flag to a supported `kubectl` command. Sort your objects by specifying any numeric or string field with the `--sort-by` flag. To specify a field, use a [jsonpath](https://kubernetes.io/docs/reference/kubectl/jsonpath/) expression. #### Syntax ``` kubectl [command] [TYPE] [NAME] --sort-by=<jsonpath_exp> ``` ##### Example To print a list of pods sorted by name, you run: ``` kubectl get pods --sort-by=.metadata.name ``` ## Examples: Common operations Use the following set of examples to help you familiarize yourself with running the commonly used `kubectl` operations: `kubectl apply` - Apply or Update a resource from a file or stdin. ``` # Create a service using the definition in example-service.yaml. kubectl apply -f example-service.yaml # Create a replication controller using the definition in example-controller.yaml. kubectl apply -f example-controller.yaml # Create the objects that are defined in any .yaml, .yml, or .json file within the <directory> directory. kubectl apply -f <directory> ``` `kubectl get` - List one or more resources. ``` # List all pods in plain-text output format. kubectl get pods # List all pods in plain-text output format and include additional information (such as node name). kubectl get pods -o wide # List the replication controller with the specified name in plain-text output format. Tip: You can shorten and replace the 'replicationcontroller' resource type with the alias 'rc'. kubectl get replicationcontroller <rc-name> # List all replication controllers and services together in plain-text output format. kubectl get rc,services # List all daemon sets in plain-text output format. kubectl get ds # List all pods running on node server01 kubectl get pods --field-selector=spec.nodeName=server01 ``` `kubectl describe` - Display detailed state of one or more resources, including the uninitialized ones by default. ``` # Display the details of the node with name <node-name>. kubectl describe nodes <node-name> # Display the details of the pod with name <pod-name>. kubectl describe pods/<pod-name> # Display the details of all the pods that are managed by the replication controller named <rc-name>. # Remember: Any pods that are created by the replication controller get prefixed with the name of the replication controller. kubectl describe pods <rc-name> # Describe all pods kubectl describe pods ``` #### Note: The `kubectl get` command is usually used for retrieving one or more resources of the same resource type. It features a rich set of flags that allows you to customize the output format using the `-o` or `--output` flag, for example. You can specify the `-w` or `--watch` flag to start watching updates to a particular object. The `kubectl describe` command is more focused on describing the many related aspects of a specified resource. It may invoke several API calls to the API server to build a view for the user. For example, the `kubectl describe node` command retrieves not only the information about the node, but also a summary of the pods running on it, the events generated for the node etc. `kubectl delete` - Delete resources either from a file, stdin, or specifying label selectors, names, resource selectors, or resources. ``` # Delete a pod using the type and name specified in the pod.yaml file. kubectl delete -f pod.yaml # Delete all the pods and services that have the label '<label-key>=<label-value>'. kubectl delete pods,services -l <label-key>=<label-value> # Delete all pods, including uninitialized ones. kubectl delete pods --all ``` `kubectl exec` - Execute a command against a container in a pod. ``` # Get output from running 'date' from pod <pod-name>. By default, output is from the first container. kubectl exec <pod-name> -- date # Get output from running 'date' in container <container-name> of pod <pod-name>. kubectl exec <pod-name> -c <container-name> -- date # Get an interactive TTY and run /bin/bash from pod <pod-name>. By default, output is from the first container. kubectl exec -ti <pod-name> -- /bin/bash ``` `kubectl logs` - Print the logs for a container in a pod. ``` # Return a snapshot of the logs from pod <pod-name>. kubectl logs <pod-name> # Start streaming the logs from pod <pod-name>. This is similar to the 'tail -f' Linux command. kubectl logs -f <pod-name> ``` `kubectl diff` - View a diff of the proposed updates to a cluster. ``` # Diff resources included in "pod.json". kubectl diff -f pod.json # Diff file read from stdin. cat service.yaml | kubectl diff -f - ``` ## Examples: Creating and using plugins Use the following set of examples to help you familiarize yourself with writing and using `kubectl` plugins: ``` # create a simple plugin in any language and name the resulting executable file # so that it begins with the prefix "kubectl-" cat ./kubectl-hello ``` ``` #!/bin/sh # this plugin prints the words "hello world" echo "hello world" ``` With a plugin written, let's make it executable: ``` chmod a+x ./kubectl-hello # and move it to a location in our PATH sudo mv ./kubectl-hello /usr/local/bin sudo chown root:root /usr/local/bin # You have now created and "installed" a kubectl plugin. # You can begin using this plugin by invoking it from kubectl as if it were a regular command kubectl hello ``` ``` hello world ``` ``` # You can "uninstall" a plugin, by removing it from the folder in your # $PATH where you placed it sudo rm /usr/local/bin/kubectl-hello ``` In order to view all of the plugins that are available to `kubectl`, use the `kubectl plugin list` subcommand: ``` kubectl plugin list ``` The output is similar to: ``` The following kubectl-compatible plugins are available: /usr/local/bin/kubectl-hello /usr/local/bin/kubectl-foo /usr/local/bin/kubectl-bar ``` `kubectl plugin list` also warns you about plugins that are not executable, or that are shadowed by other plugins; for example: ``` sudo chmod -x /usr/local/bin/kubectl-foo # remove execute permission kubectl plugin list ``` ``` The following kubectl-compatible plugins are available: /usr/local/bin/kubectl-hello /usr/local/bin/kubectl-foo - warning: /usr/local/bin/kubectl-foo identified as a plugin, but it is not executable /usr/local/bin/kubectl-bar error: one plugin warning was found ``` You can think of plugins as a means to build more complex functionality on top of the existing kubectl commands: ``` cat ./kubectl-whoami ``` The next few examples assume that you already made `kubectl-whoami` have the following contents: ``` #!/bin/bash # this plugin makes use of the `kubectl config` command in order to output # information about the current user, based on the currently selected context kubectl config view --template='{{ range .contexts }}{{ if eq .name "'$(kubectl config current-context)'" }}Current user: {{ printf "%s\n" .context.user }}{{ end }}{{ end }}' ``` Running the above command gives you an output containing the user for the current context in your KUBECONFIG file: ``` # make the file executable sudo chmod +x ./kubectl-whoami # and move it into your PATH sudo mv ./kubectl-whoami /usr/local/bin kubectl whoami Current user: plugins-user ``` ## What's next - Read the `kubectl` reference documentation: - the kubectl [command reference](https://kubernetes.io/docs/reference/kubectl/kubectl/) - the [command line arguments](https://kubernetes.io/docs/reference/kubectl/generated/kubectl/) reference - Learn about [`kubectl` usage conventions](https://kubernetes.io/docs/reference/kubectl/conventions/) - Read about [JSONPath support](https://kubernetes.io/docs/reference/kubectl/jsonpath/) in kubectl - Read about how to [extend kubectl with plugins](https://kubernetes.io/docs/tasks/extend-kubectl/kubectl-plugins/) - To find out more about plugins, take a look at the [example CLI plugin](https://github.com/kubernetes/sample-cli-plugin). ## Feedback Was this page helpful? Yes No Thanks for the feedback. If you have a specific, answerable question about how to use Kubernetes, ask it on [Stack Overflow](https://stackoverflow.com/questions/tagged/kubernetes). Open an issue in the [GitHub Repository](https://www.github.com/kubernetes/website/) if you want to [report a problem](https://github.com/kubernetes/website/issues/new?title=Issue%20with%20k8s.io) or [suggest an improvement](https://github.com/kubernetes/website/issues/new?title=Improvement%20for%20k8s.io). Last modified March 15, 2026 at 3:21 PM PST: [fix: replace deprecated argument \`--cpu-percent\` with \`--cpu\` (af93a0a732)](https://github.com/kubernetes/website/commit/af93a0a732cf3057895c62e615a212a44aa6cec7) © 2026 The Kubernetes Authors \| Documentation Distributed under [CC BY 4.0](https://git.k8s.io/website/LICENSE) © 2026 The Linux Foundation ®. All rights reserved. The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see our [Trademark Usage page](https://www.linuxfoundation.org/trademark-usage) ICP license: 京ICP备17074266号-3
Readable Markdown
Kubernetes provides a command line tool for communicating with a Kubernetes cluster's [control plane](https://kubernetes.io/docs/reference/glossary/?all=true#term-control-plane "The container orchestration layer that exposes the API and interfaces to define, deploy, and manage the lifecycle of containers."), using the Kubernetes API. This tool is named `kubectl`. For configuration, `kubectl` looks for a file named `config` in the `$HOME/.kube` directory. You can specify other [kubeconfig](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/) files by setting the `KUBECONFIG` environment variable or by setting the [`--kubeconfig`](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/) flag. This overview covers `kubectl` syntax, describes the command operations, and provides common examples. For details about each command, including all the supported flags and subcommands, see the [kubectl](https://kubernetes.io/docs/reference/kubectl/generated/kubectl/) reference documentation. For a overview, see [The kubectl command-line tool](https://kubernetes.io/docs/concepts/overview/kubectl/). For installation instructions, see [Installing kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl); for a quick guide, see the [cheat sheet](https://kubernetes.io/docs/reference/kubectl/quick-reference/). If you're used to using the `docker` command-line tool, [`kubectl` for Docker Users](https://kubernetes.io/docs/reference/kubectl/docker-cli-to-kubectl/) explains some equivalent commands for Kubernetes. ## Syntax Use the following syntax to run `kubectl` commands from your terminal window: ``` kubectl [command] [TYPE] [NAME] [flags] ``` where `command`, `TYPE`, `NAME`, and `flags` are: - `command`: Specifies the operation that you want to perform on one or more resources, for example `create`, `get`, `describe`, `delete`. - `TYPE`: Specifies the [resource type](https://kubernetes.io/docs/reference/kubectl/#resource-types). Resource types are case-insensitive and you can specify the singular, plural, or abbreviated forms. For example, the following commands produce the same output: ``` kubectl get pod pod1 kubectl get pods pod1 kubectl get po pod1 ``` - `NAME`: Specifies the name of the resource. Names are case-sensitive. If the name is omitted, details for all resources are displayed, for example `kubectl get pods`. When performing an operation on multiple resources, you can specify each resource by type and name or specify one or more files: - To specify resources by type and name: - To group resources if they are all the same type: `TYPE1 name1 name2 name<#>`. Example: `kubectl get pod example-pod1 example-pod2` - To specify multiple resource types individually: `TYPE1/name1 TYPE1/name2 TYPE2/name3 TYPE<#>/name<#>`. Example: `kubectl get pod/example-pod1 replicationcontroller/example-rc1` - To specify resources with one or more files: `-f file1 -f file2 -f file<#>` - Use YAML rather than JSON since YAML tends to be more user-friendly, especially for configuration files. Example: `kubectl get -f ./pod.yaml` - `flags`: Specifies optional flags. For example, you can use the `-s` or `--server` flags to specify the address and port of the Kubernetes API server. #### Caution: Flags that you specify from the command line override default values and any corresponding environment variables. If you need help, run `kubectl help` from the terminal window. ## In-cluster authentication and namespace overrides By default `kubectl` will first determine if it is running within a pod, and thus in a cluster. It starts by checking for the `KUBERNETES_SERVICE_HOST` and `KUBERNETES_SERVICE_PORT` environment variables and the existence of a service account token file at `/var/run/secrets/kubernetes.io/serviceaccount/token`. If all three are found in-cluster authentication is assumed. To maintain backwards compatibility, if the `POD_NAMESPACE` environment variable is set during in-cluster authentication it will override the default namespace from the service account token. Any manifests or tools relying on namespace defaulting will be affected by this. **`POD_NAMESPACE` environment variable** If the `POD_NAMESPACE` environment variable is set, cli operations on namespaced resources will default to the variable value. For example, if the variable is set to `seattle`, `kubectl get pods` would return pods in the `seattle` namespace. This is because pods are a namespaced resource, and no namespace was provided in the command. Review the output of `kubectl api-resources` to determine if a resource is namespaced. Explicit use of `--namespace <value>` overrides this behavior. **How kubectl handles ServiceAccount tokens** If: - there is Kubernetes service account token file mounted at `/var/run/secrets/kubernetes.io/serviceaccount/token`, and - the `KUBERNETES_SERVICE_HOST` environment variable is set, and - the `KUBERNETES_SERVICE_PORT` environment variable is set, and - you don't explicitly specify a namespace on the kubectl command line then kubectl assumes it is running in your cluster. The kubectl tool looks up the namespace of that ServiceAccount (this is the same as the namespace of the Pod) and acts against that namespace. This is different from what happens outside of a cluster; when kubectl runs outside a cluster and you don't specify a namespace, the kubectl command acts against the namespace set for the current context in your client configuration. To change the default namespace for your kubectl you can use the following command: ``` kubectl config set-context --current --namespace=<namespace-name> ``` ## Operations The following table includes short descriptions and the general syntax for all of the `kubectl` operations: | Operation | Syntax | Description | |---|---|---| | `alpha` | `kubectl alpha SUBCOMMAND [flags]` | List the available commands that correspond to alpha features, which are not enabled in Kubernetes clusters by default. | | `annotate` | `kubectl annotate (-f FILENAME | TYPE NAME | TYPE/NAME) KEY_1=VAL_1 ... KEY_N=VAL_N [--overwrite] [--all] [--resource-version=version] [flags]` | Add or update the annotations of one or more resources. | | `api-resources` | `kubectl api-resources [flags]` | List the API resources that are available. | | `api-versions` | `kubectl api-versions [flags]` | List the API versions that are available. | | `apply` | `kubectl apply -f FILENAME [flags]` | Apply a configuration change to a resource from a file or stdin. | | `attach` | `kubectl attach POD -c CONTAINER [-i] [-t] [flags]` | Attach to a running container either to view the output stream or interact with the container (stdin). | | `auth` | `kubectl auth [flags] [options]` | Inspect authorization. | | `autoscale` | `kubectl autoscale (-f FILENAME | TYPE NAME | TYPE/NAME) [--min=MINPODS] --max=MAXPODS [--cpu=CPU] [flags]` | Automatically scale the set of pods that are managed by a replication controller. | | `certificate` | `kubectl certificate SUBCOMMAND [options]` | Modify certificate resources. | | `cluster-info` | `kubectl cluster-info [flags]` | Display endpoint information about the master and services in the cluster. | | `completion` | `kubectl completion SHELL [options]` | Output shell completion code for the specified shell (bash or zsh). | | `config` | `kubectl config SUBCOMMAND [flags]` | Modifies kubeconfig files. See the individual subcommands for details. | | `convert` | `kubectl convert -f FILENAME [options]` | Convert config files between different API versions. Both YAML and JSON formats are accepted. Note - requires `kubectl-convert` plugin to be installed. | | `cordon` | `kubectl cordon NODE [options]` | Mark node as unschedulable. | | `cp` | `kubectl cp <file-spec-src> <file-spec-dest> [options]` | Copy files and directories to and from containers. | | `create` | `kubectl create -f FILENAME [flags]` | Create one or more resources from a file or stdin. | | `delete` | `kubectl delete (-f FILENAME | TYPE [NAME | /NAME | -l label | --all]) [flags]` | Delete resources either from a file, stdin, or specifying label selectors, names, resource selectors, or resources. | | `describe` | `kubectl describe (-f FILENAME | TYPE [NAME_PREFIX | /NAME | -l label]) [flags]` | Display the detailed state of one or more resources. | | `diff` | `kubectl diff -f FILENAME [flags]` | Diff file or stdin against live configuration. | | `drain` | `kubectl drain NODE [options]` | Drain node in preparation for maintenance. | | `edit` | `kubectl edit (-f FILENAME | TYPE NAME | TYPE/NAME) [flags]` | Edit and update the definition of one or more resources on the server by using the default editor. | | `events` | `kubectl events` | List events | | `exec` | `kubectl exec POD [-c CONTAINER] [-i] [-t] [flags] [-- COMMAND [args...]]` | Execute a command against a container in a pod. | | `explain` | `kubectl explain TYPE [--recursive=false] [flags]` | Get documentation of various resources. For instance pods, nodes, services, etc. | | `expose` | `kubectl expose (-f FILENAME | TYPE NAME | TYPE/NAME) [--port=port] [--protocol=TCP|UDP] [--target-port=number-or-name] [--name=name] [--external-ip=external-ip-of-service] [--type=type] [flags]` | Expose a replication controller, service, or pod as a new Kubernetes service. | | `get` | `kubectl get (-f FILENAME | TYPE [NAME | /NAME | -l label]) [--watch] [--sort-by=FIELD] [[-o | --output]=OUTPUT_FORMAT] [flags]` | List one or more resources. | | `kustomize` | `kubectl kustomize <dir> [flags] [options]` | List a set of API resources generated from instructions in a kustomization.yaml file. The argument must be the path to the directory containing the file, or a git repository URL with a path suffix specifying same with respect to the repository root. | | `label` | `kubectl label (-f FILENAME | TYPE NAME | TYPE/NAME) KEY_1=VAL_1 ... KEY_N=VAL_N [--overwrite] [--all] [--resource-version=version] [flags]` | Add or update the labels of one or more resources. | | `logs` | `kubectl logs POD [-c CONTAINER] [--follow] [flags]` | Print the logs for a container in a pod. | | `options` | `kubectl options` | List of global command-line options, which apply to all commands. | | `patch` | `kubectl patch (-f FILENAME | TYPE NAME | TYPE/NAME) --patch PATCH [flags]` | Update one or more fields of a resource by using the strategic merge patch process. | | `plugin` | `kubectl plugin [flags] [options]` | Provides utilities for interacting with plugins. | | `port-forward` | `kubectl port-forward POD [LOCAL_PORT:]REMOTE_PORT [...[LOCAL_PORT_N:]REMOTE_PORT_N] [flags]` | Forward one or more local ports to a pod. | | `proxy` | `kubectl proxy [--port=PORT] [--www=static-dir] [--www-prefix=prefix] [--api-prefix=prefix] [flags]` | Run a proxy to the Kubernetes API server. | | `replace` | `kubectl replace -f FILENAME` | Replace a resource from a file or stdin. | | `rollout` | `kubectl rollout SUBCOMMAND [options]` | Manage the rollout of a resource. Valid resource types include: deployments, daemonsets and statefulsets. | | `run` | `kubectl run NAME --image=image [--env="key=value"] [--port=port] [--dry-run=server|client|none] [--overrides=inline-json] [flags]` | Run a specified image on the cluster. | | `scale` | `kubectl scale (-f FILENAME | TYPE NAME | TYPE/NAME) --replicas=COUNT [--resource-version=version] [--current-replicas=count] [flags]` | Update the size of the specified replication controller. | | `set` | `kubectl set SUBCOMMAND [options]` | Configure application resources. | | `taint` | `kubectl taint NODE NAME KEY_1=VAL_1:TAINT_EFFECT_1 ... KEY_N=VAL_N:TAINT_EFFECT_N [options]` | Update the taints on one or more nodes. | | `top` | `kubectl top (POD | NODE) [flags] [options]` | Display Resource (CPU/Memory/Storage) usage of pod or node. | | `uncordon` | `kubectl uncordon NODE [options]` | Mark node as schedulable. | | `version` | `kubectl version [--client] [flags]` | Display the Kubernetes version running on the client and server. | | `wait` | `kubectl wait ([-f FILENAME] | resource.group/resource.name | resource.group [(-l label | --all)]) [--for=delete|--for condition=available] [options]` | Experimental: Wait for a specific condition on one or many resources. | To learn more about command operations, see the [kubectl](https://kubernetes.io/docs/reference/kubectl/kubectl/) reference documentation. ## Resource types The following table includes a list of all the supported resource types and their abbreviated aliases. (This output can be retrieved from `kubectl api-resources`, and was accurate as of Kubernetes 1.25.0) | NAME | SHORTNAMES | APIVERSION | NAMESPACED | KIND | |---|---|---|---|---| | `bindings` | | v1 | true | Binding | | `componentstatuses` | `cs` | v1 | false | ComponentStatus | | `configmaps` | `cm` | v1 | true | ConfigMap | | `endpoints` | `ep` | v1 | true | Endpoints | | `events` | `ev` | v1 | true | Event | | `limitranges` | `limits` | v1 | true | LimitRange | | `namespaces` | `ns` | v1 | false | Namespace | | `nodes` | `no` | v1 | false | Node | | `persistentvolumeclaims` | `pvc` | v1 | true | PersistentVolumeClaim | | `persistentvolumes` | `pv` | v1 | false | PersistentVolume | | `pods` | `po` | v1 | true | Pod | | `podtemplates` | | v1 | true | PodTemplate | | `replicationcontrollers` | `rc` | v1 | true | ReplicationController | | `resourcequotas` | `quota` | v1 | true | ResourceQuota | | `secrets` | | v1 | true | Secret | | `serviceaccounts` | `sa` | v1 | true | ServiceAccount | | `services` | `svc` | v1 | true | Service | | `mutatingwebhookconfigurations` | | admissionregistration.k8s.io/v1 | false | MutatingWebhookConfiguration | | `validatingwebhookconfigurations` | | admissionregistration.k8s.io/v1 | false | ValidatingWebhookConfiguration | | `customresourcedefinitions` | `crd,crds` | apiextensions.k8s.io/v1 | false | CustomResourceDefinition | | `apiservices` | | apiregistration.k8s.io/v1 | false | APIService | | `controllerrevisions` | | apps/v1 | true | ControllerRevision | | `daemonsets` | `ds` | apps/v1 | true | DaemonSet | | `deployments` | `deploy` | apps/v1 | true | Deployment | | `replicasets` | `rs` | apps/v1 | true | ReplicaSet | | `statefulsets` | `sts` | apps/v1 | true | StatefulSet | | `tokenreviews` | | authentication.k8s.io/v1 | false | TokenReview | | `localsubjectaccessreviews` | | authorization.k8s.io/v1 | true | LocalSubjectAccessReview | | `selfsubjectaccessreviews` | | authorization.k8s.io/v1 | false | SelfSubjectAccessReview | | `selfsubjectrulesreviews` | | authorization.k8s.io/v1 | false | SelfSubjectRulesReview | | `subjectaccessreviews` | | authorization.k8s.io/v1 | false | SubjectAccessReview | | `horizontalpodautoscalers` | `hpa` | autoscaling/v2 | true | HorizontalPodAutoscaler | | `cronjobs` | `cj` | batch/v1 | true | CronJob | | `jobs` | | batch/v1 | true | Job | | `certificatesigningrequests` | `csr` | certificates.k8s.io/v1 | false | CertificateSigningRequest | | `leases` | | coordination.k8s.io/v1 | true | Lease | | `endpointslices` | | discovery.k8s.io/v1 | true | EndpointSlice | | `events` | `ev` | events.k8s.io/v1 | true | Event | | `flowschemas` | | flowcontrol.apiserver.k8s.io/v1beta2 | false | FlowSchema | | `prioritylevelconfigurations` | | flowcontrol.apiserver.k8s.io/v1beta2 | false | PriorityLevelConfiguration | | `ingressclasses` | | networking.k8s.io/v1 | false | IngressClass | | `ingresses` | `ing` | networking.k8s.io/v1 | true | Ingress | | `networkpolicies` | `netpol` | networking.k8s.io/v1 | true | NetworkPolicy | | `runtimeclasses` | | node.k8s.io/v1 | false | RuntimeClass | | `poddisruptionbudgets` | `pdb` | policy/v1 | true | PodDisruptionBudget | | `podsecuritypolicies` | `psp` | policy/v1beta1 | false | PodSecurityPolicy | | `clusterrolebindings` | | rbac.authorization.k8s.io/v1 | false | ClusterRoleBinding | | `clusterroles` | | rbac.authorization.k8s.io/v1 | false | ClusterRole | | `rolebindings` | | rbac.authorization.k8s.io/v1 | true | RoleBinding | | `roles` | | rbac.authorization.k8s.io/v1 | true | Role | | `priorityclasses` | `pc` | scheduling.k8s.io/v1 | false | PriorityClass | | `csidrivers` | | storage.k8s.io/v1 | false | CSIDriver | | `csinodes` | | storage.k8s.io/v1 | false | CSINode | | `csistoragecapacities` | | storage.k8s.io/v1 | true | CSIStorageCapacity | | `storageclasses` | `sc` | storage.k8s.io/v1 | false | StorageClass | | `volumeattachments` | | storage.k8s.io/v1 | false | VolumeAttachment | ## Output options Use the following sections for information about how you can format or sort the output of certain commands. For details about which commands support the various output options, see the [kubectl](https://kubernetes.io/docs/reference/kubectl/kubectl/) reference documentation. ### Formatting output The default output format for all `kubectl` commands is the human readable plain-text format. To output details to your terminal window in a specific format, you can add either the `-o` or `--output` flags to a supported `kubectl` command. #### Syntax ``` kubectl [command] [TYPE] [NAME] -o <output_format> ``` Depending on the `kubectl` operation, the following output formats are supported: | Output format | Description | |---|---| | `-o custom-columns=<spec>` | Print a table using a comma separated list of [custom columns](https://kubernetes.io/docs/reference/kubectl/#custom-columns). | | `-o custom-columns-file=<filename>` | Print a table using the [custom columns](https://kubernetes.io/docs/reference/kubectl/#custom-columns) template in the `<filename>` file. | | `-o json` | Output a JSON formatted API object. | | `-o jsonpath=<template>` | Print the fields defined in a [jsonpath](https://kubernetes.io/docs/reference/kubectl/jsonpath/) expression. | | `-o jsonpath-file=<filename>` | Print the fields defined by the [jsonpath](https://kubernetes.io/docs/reference/kubectl/jsonpath/) expression in the `<filename>` file. | | `-o kyaml` | Output a [KYAML](https://kubernetes.io/docs/reference/encodings/kyaml/) formatted API object (beta). | | `-o name` | Print only the resource name and nothing else. | | `-o wide` | Output in the plain-text format with any additional information. For pods, the node name is included. | | `-o yaml` | Output a YAML formatted API object. KYAML is an experimental Kubernetes-specific dialect of YAML, and can be parsed as YAML. | ##### Example In this example, the following command outputs the details for a single pod as a YAML formatted object: ``` kubectl get pod web-pod-13je7 -o yaml ``` Remember: See the [kubectl](https://kubernetes.io/docs/reference/kubectl/kubectl/) reference documentation for details about which output format is supported by each command. #### Custom columns To define custom columns and output only the details that you want into a table, you can use the `custom-columns` option. You can choose to define the custom columns inline or use a template file: `-o custom-columns=<spec>` or `-o custom-columns-file=<filename>`. ##### Examples Inline: ``` kubectl get pods <pod-name> -o custom-columns=NAME:.metadata.name,RSRC:.metadata.resourceVersion ``` Template file: ``` kubectl get pods <pod-name> -o custom-columns-file=template.txt ``` where the `template.txt` file contains: ``` NAME RSRC metadata.name metadata.resourceVersion ``` The result of running either command is similar to: ``` NAME RSRC submit-queue 610995 ``` #### Server-side columns `kubectl` supports receiving specific column information from the server about objects. This means that for any given resource, the server will return columns and rows relevant to that resource, for the client to print. This allows for consistent human-readable output across clients used against the same cluster, by having the server encapsulate the details of printing. This feature is enabled by default. To disable it, add the `--server-print=false` flag to the `kubectl get` command. ##### Examples To print information about the status of a pod, use a command like the following: ``` kubectl get pods <pod-name> --server-print=false ``` The output is similar to: ``` NAME AGE pod-name 1m ``` ### Sorting list objects To output objects to a sorted list in your terminal window, you can add the `--sort-by` flag to a supported `kubectl` command. Sort your objects by specifying any numeric or string field with the `--sort-by` flag. To specify a field, use a [jsonpath](https://kubernetes.io/docs/reference/kubectl/jsonpath/) expression. #### Syntax ``` kubectl [command] [TYPE] [NAME] --sort-by=<jsonpath_exp> ``` ##### Example To print a list of pods sorted by name, you run: ``` kubectl get pods --sort-by=.metadata.name ``` ## Examples: Common operations Use the following set of examples to help you familiarize yourself with running the commonly used `kubectl` operations: `kubectl apply` - Apply or Update a resource from a file or stdin. ``` # Create a service using the definition in example-service.yaml. kubectl apply -f example-service.yaml # Create a replication controller using the definition in example-controller.yaml. kubectl apply -f example-controller.yaml # Create the objects that are defined in any .yaml, .yml, or .json file within the <directory> directory. kubectl apply -f <directory> ``` `kubectl get` - List one or more resources. ``` # List all pods in plain-text output format. kubectl get pods # List all pods in plain-text output format and include additional information (such as node name). kubectl get pods -o wide # List the replication controller with the specified name in plain-text output format. Tip: You can shorten and replace the 'replicationcontroller' resource type with the alias 'rc'. kubectl get replicationcontroller <rc-name> # List all replication controllers and services together in plain-text output format. kubectl get rc,services # List all daemon sets in plain-text output format. kubectl get ds # List all pods running on node server01 kubectl get pods --field-selector=spec.nodeName=server01 ``` `kubectl describe` - Display detailed state of one or more resources, including the uninitialized ones by default. ``` # Display the details of the node with name <node-name>. kubectl describe nodes <node-name> # Display the details of the pod with name <pod-name>. kubectl describe pods/<pod-name> # Display the details of all the pods that are managed by the replication controller named <rc-name>. # Remember: Any pods that are created by the replication controller get prefixed with the name of the replication controller. kubectl describe pods <rc-name> # Describe all pods kubectl describe pods ``` #### Note: The `kubectl get` command is usually used for retrieving one or more resources of the same resource type. It features a rich set of flags that allows you to customize the output format using the `-o` or `--output` flag, for example. You can specify the `-w` or `--watch` flag to start watching updates to a particular object. The `kubectl describe` command is more focused on describing the many related aspects of a specified resource. It may invoke several API calls to the API server to build a view for the user. For example, the `kubectl describe node` command retrieves not only the information about the node, but also a summary of the pods running on it, the events generated for the node etc. `kubectl delete` - Delete resources either from a file, stdin, or specifying label selectors, names, resource selectors, or resources. ``` # Delete a pod using the type and name specified in the pod.yaml file. kubectl delete -f pod.yaml # Delete all the pods and services that have the label '<label-key>=<label-value>'. kubectl delete pods,services -l <label-key>=<label-value> # Delete all pods, including uninitialized ones. kubectl delete pods --all ``` `kubectl exec` - Execute a command against a container in a pod. ``` # Get output from running 'date' from pod <pod-name>. By default, output is from the first container. kubectl exec <pod-name> -- date # Get output from running 'date' in container <container-name> of pod <pod-name>. kubectl exec <pod-name> -c <container-name> -- date # Get an interactive TTY and run /bin/bash from pod <pod-name>. By default, output is from the first container. kubectl exec -ti <pod-name> -- /bin/bash ``` `kubectl logs` - Print the logs for a container in a pod. ``` # Return a snapshot of the logs from pod <pod-name>. kubectl logs <pod-name> # Start streaming the logs from pod <pod-name>. This is similar to the 'tail -f' Linux command. kubectl logs -f <pod-name> ``` `kubectl diff` - View a diff of the proposed updates to a cluster. ``` # Diff resources included in "pod.json". kubectl diff -f pod.json # Diff file read from stdin. cat service.yaml | kubectl diff -f - ``` ## Examples: Creating and using plugins Use the following set of examples to help you familiarize yourself with writing and using `kubectl` plugins: ``` # create a simple plugin in any language and name the resulting executable file # so that it begins with the prefix "kubectl-" cat ./kubectl-hello ``` ``` #!/bin/sh # this plugin prints the words "hello world" echo "hello world" ``` With a plugin written, let's make it executable: ``` chmod a+x ./kubectl-hello # and move it to a location in our PATH sudo mv ./kubectl-hello /usr/local/bin sudo chown root:root /usr/local/bin # You have now created and "installed" a kubectl plugin. # You can begin using this plugin by invoking it from kubectl as if it were a regular command kubectl hello ``` ``` hello world ``` ``` # You can "uninstall" a plugin, by removing it from the folder in your # $PATH where you placed it sudo rm /usr/local/bin/kubectl-hello ``` In order to view all of the plugins that are available to `kubectl`, use the `kubectl plugin list` subcommand: ``` kubectl plugin list ``` The output is similar to: ``` The following kubectl-compatible plugins are available: /usr/local/bin/kubectl-hello /usr/local/bin/kubectl-foo /usr/local/bin/kubectl-bar ``` `kubectl plugin list` also warns you about plugins that are not executable, or that are shadowed by other plugins; for example: ``` sudo chmod -x /usr/local/bin/kubectl-foo # remove execute permission kubectl plugin list ``` ``` The following kubectl-compatible plugins are available: /usr/local/bin/kubectl-hello /usr/local/bin/kubectl-foo - warning: /usr/local/bin/kubectl-foo identified as a plugin, but it is not executable /usr/local/bin/kubectl-bar error: one plugin warning was found ``` You can think of plugins as a means to build more complex functionality on top of the existing kubectl commands: ``` cat ./kubectl-whoami ``` The next few examples assume that you already made `kubectl-whoami` have the following contents: ``` #!/bin/bash # this plugin makes use of the `kubectl config` command in order to output # information about the current user, based on the currently selected context kubectl config view --template='{{ range .contexts }}{{ if eq .name "'$(kubectl config current-context)'" }}Current user: {{ printf "%s\n" .context.user }}{{ end }}{{ end }}' ``` Running the above command gives you an output containing the user for the current context in your KUBECONFIG file: ``` # make the file executable sudo chmod +x ./kubectl-whoami # and move it into your PATH sudo mv ./kubectl-whoami /usr/local/bin kubectl whoami Current user: plugins-user ``` ## What's next - Read the `kubectl` reference documentation: - the kubectl [command reference](https://kubernetes.io/docs/reference/kubectl/kubectl/) - the [command line arguments](https://kubernetes.io/docs/reference/kubectl/generated/kubectl/) reference - Learn about [`kubectl` usage conventions](https://kubernetes.io/docs/reference/kubectl/conventions/) - Read about [JSONPath support](https://kubernetes.io/docs/reference/kubectl/jsonpath/) in kubectl - Read about how to [extend kubectl with plugins](https://kubernetes.io/docs/tasks/extend-kubectl/kubectl-plugins/) - To find out more about plugins, take a look at the [example CLI plugin](https://github.com/kubernetes/sample-cli-plugin).
Shard146 (laksa)
Root Hash1992600389629290346
Unparsed URLio,kubernetes!/docs/reference/kubectl/ s443