Search code examples
azure-container-service

Is there a way to open a proxy from the agent nodes to the master in Azure AKS?


With kubectl proxy I can open a proxy from my machine to the master node in the kubernetes cluster of my current context.

Is there any way I can do the same from the nodes of a managed cluster in Azure AKS?


For context, the thing I want to do is to use Linkerd backed by k8s service discovery, but that doesn't support TLS at the moment and the recommendation in their docs is to run kubectl proxy on each node.


Solution

  • You can run a kubectl proxy container in the pod alongside Linkerd. For example:

    - name: kubectl image: buoyantio/kubectl:v1.8.5 args: - "proxy" - "-p" - "8001"

    Complete example: https://github.com/linkerd/linkerd-examples/blob/99e33284860a35228dccc23a8810374b02f24c26/k8s-daemonset/k8s/linkerd.yml#L103