https://rancher.com/ logo
Title
d

delightful-pharmacist-29626

03/28/2023, 3:54 AM
Hi Team. I’m getting Forbidden when I try to get the logs from pod. Is there something I’m doing wrong ?
r

refined-analyst-8898

03/28/2023, 4:03 AM
Are you running
kubectl logs
? You can check your connection with
kubectl cluster-info
.
c

chilly-soccer-69887

03/28/2023, 4:15 AM
do you have enough permission to access this pod?
d

delightful-pharmacist-29626

03/28/2023, 6:54 AM
@refined-analyst-8898 when I execute cluster info Kubernetes control plane is running at https://127.0.0.1:6443 CoreDNS is running at https://127.0.0.1:6443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy Metrics-server is running at https://127.0.0.1:6443/api/v1/namespaces/kube-system/services/https:metrics-server:https/proxy
@chilly-soccer-69887 how I can check it. I have made a ssh connection as sudo.
😮 1
r

refined-analyst-8898

03/28/2023, 12:46 PM
@delightful-pharmacist-29626 I believe you are running
kubectl logs
. Is that accurate? If so, I believe you may be seeing the correct log output from the container. In other words, the error message could be emitted by the container, not
kubectl logs
, and so you could be reading the error message successfully from the pod log and mistaking it to be a problem with reading the log. I believe this is the case because
kubectl logs
will only communicate with the kube-apiserver, and the error message indicates a problem communicating with the node agent, IIUC.
d

delightful-pharmacist-29626

03/29/2023, 8:12 AM
Got it. Thank you