Oracle Cloud Infrastructure Documentation

Accessing a Cluster Using kubectl

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:

  1. If you haven't already done so, install kubectl (see the kubectl documentation).
  2. If you haven't already done so, follow the steps to download the cluster's kubeconfig configuration file and set the KUBECONFIG environment variable to point to the file. See Downloading a kubeconfig File to Enable Cluster Access.
  3. In a terminal window, enter kubectl followed 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.