Closed RafaelMoreira1180778 closed 1 year ago
Hi @RafaelMoreira1180778 can you try something like
export SNAP_DATA="/var/snap/microk8s/current/"
curl -L --cert ${SNAP_DATA}/certs/server.crt --key ${SNAP_DATA}/certs/server.key --cacert ${SNAP_DATA}/certs/ca.crt https://127.0.0.1:16443/readyz
The service you should be looking at is snap.microk8s.daemon-kubelite
, this is where all k8s services start from.
export SNAP_DATA="/var/snap/microk8s/current/" curl -L --cert ${SNAP_DATA}/certs/server.crt --key ${SNAP_DATA}/certs/server.key --cacert ${SNAP_DATA}/certs/ca.crt https://127.0.0.1:16443/readyz
Hi @ktsakalozos, am I correct to assume that the default certificates installed on the machine are being used by curl
and therefore we need to specify the certificate, the key and the certificate authority for a curl
to work with microk8s/kubernetes API?
The service you should be looking at is
snap.microk8s.daemon-kubelite
, this is where all k8s services start from.
Thanks very much, will help me debug microk8s further down the road for sure!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I am trying to perform the following operation:
$ curl -H "Authorization Bearer: $TOKEN" -X DELETE "https://10.194.143.237:16443/api/v1/nodes/node-to-be-removed"
where 10.194.143.237 is the IP of the master node on my multipass 4 VM cluster, all with microk8s installed.I get the following error:
Running
curl
with the-k
flag throws the following error:curl: (92) HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)
.By digging a little deeper I found the following (all commands ran on the master node, aka 10.194.143.237):
From what I can see (not sure about it) but the ports regarding the API are not open therefore the curl will not work, this is what I expected (from the microk8s slack):
At first I tought that the problem might be in the request itself, being a DELETE of a Node but the symptoms occur on a simple get of ANY namespace for pods, nodes, anything really.
Is it a problem/configuration on my side? More information below:
microk8s inspect
: inspection-report-20211104_161154.tar.gz