I am running a local Kubernetes cluster (v1.28) and running into an issue when trying to access the API with curl.
curl https://192.168.1.100:6443 --cert /path/to/cert --key /path/to/key --cacert /path/to/ca
I receive the following error:
{ "kind": "Status", "apiVersion": "v1", "metadata": {}, "status": "Failure", "message": "Unauthorized", "reason": "Unauthorized", "code": 401 }
Is there a configuration step I'm missing to allow access?
I'm able to interact with kubectl
and run commands. I was expecting to see something like this:
{ "paths": [ "/api", "/api/v1", ....
Since you have a working kubectl you can use proxy command, proxy command works as a reverse proxy and forwards the requests to the API server.
then you can browse the API with curl