In some situations, we should need to use a proxy to do some calls on a Kubernetes cluster. But how can we define it in our kubeconfig file ?
In the parameter
clusters.cluster, you just have to add the parameter
proxy-url with a value which uses the following template.
apiVersion: v1 kind: Config clusters: - name: "dev" cluster: proxy-url: http://user:password@proxy:port server: "https://10.100.12.12:9006/k8s/clusters/c-jm5ws" ...
Once updated and saved, you should be able to use your proxy and do some successful calls on your cluster!
- Issue Github with the solution : https://github.com/kubernetes/client-go/issues/351#issuecomment-626752837
I hope it will help you! 🍺
Top comments (0)