I have an Azure Kubernetes Service Cluster and need to join my Raspberry Pi (Will be something else in future) into that cluster as a worker node. I also have a VPN established into that cluster and I am able to ping the existing cluster node.
However, I am stuck at the kubeadm join command because of beeing Unauthorized:
sudo kubeadm join [...] --token [...] --discovery-token-ca-cert-hash sha256:[...] --v=11
[...]
I0419 12:58:23.359475 7173 round_trippers.go:425] curl -k -v -XGET -H "Accept: application/json, */*" -H "User-Agent: kubeadm/v1.20.5 (linux/arm) kubernetes/6b1d87a" '[...]/api/v1/namespaces/kube-public/configmaps/cluster-info?timeout=10s'
I0419 12:58:23.489180 7173 round_trippers.go:445] GET [...]/api/v1/namespaces/kube-public/configmaps/cluster-info?timeout=10s 401 Unauthorized in 129 milliseconds
I0419 12:58:23.489385 7173 round_trippers.go:451] Response Headers:
I0419 12:58:23.489479 7173 round_trippers.go:454] Audit-Id: 2a61af8a-4253-4e8d-b5d7-3eade3dbabcd
I0419 12:58:23.489595 7173 round_trippers.go:454] Cache-Control: no-cache, private
I0419 12:58:23.489684 7173 round_trippers.go:454] Content-Type: application/json
I0419 12:58:23.489771 7173 round_trippers.go:454] Content-Length: 129
I0419 12:58:23.489985 7173 round_trippers.go:454] Date: Mon, 19 Apr 2021 12:58:23 GMT
I0419 12:58:23.490679 7173 request.go:1107] Response Body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Unauthorized","reason":"Unauthorized","code":401}
I0419 12:58:23.494752 7173 token.go:215] [discovery] Failed to request cluster-info, will try again: Unauthorized
This article has pointed out that I have to set the "--anonymous-auth"-flag correctly in the Kubernetes Config on the Master Node, but it is not possible to access a Master node of AKS via ssh.
Therefore, I am questioning now if it is even possible to join custom nodes to an AKS cluster or if I have to set up a self-managed Kubernetes Cluster.
Im fairly new to this topic, so if I can supply any more information, please let me know.