Kubernetes configuration
Note
This feature is available in Lite, Enterprise, Ultimate and Team editions only.
In some scenarios, you may need to interact with databases that are part of a Kubernetes cluster. DBeaver offers a way to configure Kubernetes settings to facilitate this. Before proceeding, ensure that you meet the following prerequisites:
- You must have the kubectl tool installed on your local machine.
- You need a Kubernetes configuration file. Use the local one or consult your administrator for access.
Setting up Kubernetes¶
To set up a tunnel to a Kubernetes cluster in DBeaver, you need to configure the following settings:
- Start creating a new connection.
-
Click on the plus (
) button and select Kubernetes.
-
After selecting, a Kubernetes tab will appear in the menu at the top.
-
In the Kubernetes tab, enter the necessary configuration details:
Field Description Configuration Specify the path to your Kubernetes configuration file. Context Manually select a kube-context if your configuration offers multiple contexts for different clusters. The default setting is default
.Namespace The default value is default
, but this may differ in managed Kubernetes environments. Obtain the correct namespace from yourkubectl
config.Resource By clicking the Find Resource button next to the field, a list of available services to connect to will open. From this list, you can select the service you wish to connect to.
Port Configure Kubernetes port forwarding by using kubectl
.Info
When clicking the dropdown menus in Context and Namespace, you can select settings directly from your
kubectl
config. -
After configuring settings, click on Test port forwarding button to test whether all parameters are valid.
Tip
Use network profiles to save and reuse your settings across multiple connections.
Kubectl settings¶
The Kubernetes Command-Line Tool, kubectl
, is essential for interacting with Kubernetes clusters and is integral to
the functioning of DBeaver's Kubernetes features. Learn more in the official Kubernetes documentation.
To configure kubectl
settings, you have two options:
-
Click on Configuration button on the Kubernetes connection settings page to access the
kubectl
settings. -
Alternatively, navigate to Window -> Preferences -> Connections -> Command Line Tools -> Kubernetes to specify the path to your
kubectl
executable.
Testing port forwarding¶
The Test port forwarding button utilizes the kubectl port-forward
feature to enable secure access to
applications running inside Pods from your local machine. This provides a secure way to interact with the application
without exposing it to the outside world. Learn more in the official Kubernetes documentation.
To test port forwarding:
-
Fill out the necessary Kubernetes settings as described in the previous section.
-
Click on the Test port forwarding button to initiate the port forwarding process.
If the test is successful, this confirms that you can securely access the targeted Kubernetes resource from your local machine using the configured port settings.