Skip to main content

Kubernetes CLI (Kubectl)

  1. Using Homebrew (recommended):
  2. Manual installation:
  3. Make kubectl executable
  4. Move kubectl to a directory in your PATH

Red Hat OpenShift® CLI (oc)

  1. Using web console:
    • Log into your OpenShift web console
    • Click ? icon in the top right
    • Select “Command Line Tools”
    • Download Windows oc client
    • Extract the archive
  2. Create directory for OpenShift CLI
  3. Move oc.exe to the created directory
  4. Add to PATH

Verification and Configuration

Verify the installations:

kubectl Configuration

Red Hat OpenShift Login

Store your OpenShift login token securely. You can get a new token from the OpenShift web console under your profile → Copy login command.

Shell Completion

Common Issues and Troubleshooting

If you’re behind a corporate proxy, you might need to configure proxy settings for both kubectl and oc.
Common troubleshooting steps:
Keep your CLI tools up to date with the cluster version to avoid compatibility issues. You can check the required versions in your cluster’s documentation.