Kubectl is a powerful tool that provides most of the functionalities you will ever need when interacting with Kubernetes clusters. All of the kubectl commands follow the same syntax, as shown in the following code snippet:
kubectl [command] [type] [name] [flags]
# Example:
kubectl get service kube-dns --namespace kube-system
[command], [type], [name], and [flags] are defined as follows:
- [command] specifies the operation—for example get, apply, delete.
- [type] is the resource type (a detailed list can be found in the documentation: https://kubernetes.io/docs/reference/kubectl/overview/#resource-types), specified in singular, plural, or abbreviated form (case-insensitive)—for example, service, services, svc. You can find more information about each resource by using the kubectl explain [type] command.
- [name] determines the name of...