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 and namespaces.
You can edit or duplicate a context using the UI. This helps in defining contexts with different configurations within your Kubernetes configuration file. Having contexts with different configurations enables 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.
- Optional: Edit the name of the context.
- Enter a namespace, such as testing or production, for the context.
- Click Save.
Procedure: Duplicate a context
- Go to the Settings > Kubernetes page.
- Click the Duplicate Context icon.
Verification
- Edit a context: View the updated context details on the same page.
- Duplicate a context: View the duplicated context on the same page.