teleport/integrations/kube-agent-updater/DEBUG.md
Hugo Shaka 68bf10d3d1
Fixes for teleport-kube-agent-updater (#24746)
* integrations/updater: disable CGO to ensure static builds

* helm: fix updater selectors in `teleport-kube-agent`

* helm: fix updater flags

* helm: make the updater able to watch secrets, create events and acquire leases

* integrations/updater: add dummy healthz route

* integrations/updater: fix typo in DEBUG instructions

* helm: update test snapshots
2023-04-20 13:17:03 +00:00

946 B

Debugging tips for the kube-agent-updater

Running locally the updater against a remote Kubernetes cluster

Running locally let you attach a debugger while still working against a real cluster. This can be used to reproduce most complex issues and troubleshoot specific cases.

  • Validate your current context works
    kubectl cluster-info
    
  • Open a proxy to the api-server, then let the shell open and running
    kubectl proxy
    
  • open a new terminal, create a new temporary directory and create your new kubeconfig
    export KUBECONFIG="$(mktemp)"
    kubectl config set-credentials myself --username=foo
    kubectl config set-cluster local-server --server=http://localhost:8001
    kubectl config set-context default-context --cluster=local-server --user=myself
    kubectl config use-context default-context
    echo "$KUBECONFIG"
    
  • run the controller with the KUBECONFIG environment variable set