You can use the Kubernetes command line tool kubectl to perform operations on a cluster you've created with Container Engine for Kubernetes. Before you can use kubectl you need to specify the cluster on which to perform operations.
To access a cluster using kubectl:
- If you haven't done so already, install kubectl (see the kubectl documentation).
- If you haven't done so already, download the cluster's kubeconfig configuration file. If the file does not have the expected default name and location of
$HOME/.kube/config, set the KUBECONFIG environment variable to point to the file. See Downloading a kubeconfig File to Enable Cluster Access.
In a terminal window, enter
kubectlfollowed by the command for the operation you want to perform on the cluster. For a list of available commands and options, see the kubectl documentation.
Note that you must have the appropriate permissions to run the command you enter. See About Access Control and Container Engine for Kubernetes.