Develop microservices locally while being connected to your Kubernetes environment
by Dcode.tech
Website: https://www.dcode.tech/
Slack: Discuss
With KubeTunnel:
This gives developers:
This creates a two way connection between your local process and the cluster meaning:
Important: This tool is meant to be used only on development environments as all services will connect to you instead of the cluster.
You can read more about it here.
Kubetunnel CLI can be installed through multiple channels.
There are 2 methods to install the CLI on Linux/Mac.
brew tap we-dcode/tap
brew install kubetunnel
Download the latest CLI binary in our releases page
Things to consider before you start:
cluster-admin
permissions for the initial installation of the operator component. For the tunnels themselves, this is not needed.Once you installed the KubeTunnel CLI, you can verify it's working by running:
kubetunnel --help
For each of the following commands, you can run --help for more options.
To install the operator and CRDs using the CLI, run the following command:
kubetunnel install
To install the operator using a helm chart, run the following commands:
helm repo add we-dcode https://we-dcode.github.io/kubetunnel
helm install we-dcode/kubetunnel-operator <release name>
At this point, the KubeTunnel Kubernetes Operator is successfully installed. Once the KubeTunnel Operator pod is running, you are able to start tunneling processes to your cluster.
For each Kubernetes service you want to tunnel, run the following command:
sudo -E kubetunnel create-tunnel -p '8080:80' svc_name
This command waits for the local port to be available with the process you want to tunnel. When the local process is up, it is tunneled to the cluster and the application service is switched to forward traffic to it. If your local process becomes unavailable, the service is switched back to the original pod.
KubeTunnel supports completion for multiple shells.
For autocomplete for your shell run the following command:
kubetunnel completion --help
Q: I'm not able to create a tunnel. What's going on?
A: Check the following things before creating a tunnel:
kubetunnel install
command.kubectl get pods -n <operator namespace>
kubectl logs <operator pod name> -c manager
. Do you see any errors?Q: I'm not able to install the operator. What's going on?
A: Check the following things before creating a tunnel:
To uninstall resources for a specific tunnel, find the specific tunnel you wish to delete and run the following commands:
kubectl get kubetunnel -n <requested namespace>
# Search for the tunnel you wish to delete
kubectl delete kubetunnel <name>
To uninstall the operator itself, run the following command after deleting all kubetunnel resources:
helm ls -n <operator-namespace>
helm uninstall <release-name> -n <operator-namespace>
If you need support using KubeTunnel CLI, please join our Slack channel.
Please leave issues for any error or bug that you encounter.
If you are an external contributor, before working on any contributions, please first contact us to discuss the issue or feature request with us.
Made with 💙 by Dcode.tech