Managing a Kubernetes context
Within Kubernetes, a context is useful to:
- Manage multiple development, testing, and production environments.
- Simplify your interaction when working with multiple clusters, users, and namespaces.
You can use the UI to edit or duplicate a context, or import a Kubernetes configuration file that contains multiple contexts. These tasks help in defining contexts with different configurations, enabling easy switching between environments during development.
Prerequisites
Procedure: Edit a context
- Go to the Settings > Kubernetes page.
- Click the Edit Context icon. The Edit Context popup window opens.

- Edit any of the following context details:
- Name
- Cluster
- User
- Namespace

- Click Save.
Procedure: Duplicate a context
- Go to the Settings > Kubernetes page.
- Click the Duplicate Context icon.
Procedure: Import contexts
- Go to Settings > Kubernetes, and click the Import button.

- Perform one of the following steps:
- Drag and drop a Kubernetes configuration file.
- Click Choose file:
- select a Kubernetes configuration file from your machine.
- Edit the display name if needed.
- Click Import Config.

- Review the contexts to import, and click Import contexts.

Verification
- Edit a context: View the updated context details on the same page.

- Duplicate a context: View the duplicated context on the same page.
- Import contexts: View the added Kubernetes contexts on the same page.