I use jenkins k8s plugin to deploy slave node,but in the slave container,can not use kubectl,the error is :
User "system:serviceaccount:default:default" cannot list resource "pods" in API group "" in the namespace "default"
Nearly, I done a thing like docker run a slave
, but it's ok, the docker containers can use kubectl, why?
thanks!
kubectl get roles,rolebindings,sa
. Could you please provide more details (environment parameters, jenkins deployment and steps to reproduce this issue?) Please provide your env details as yaml outputs. You can use alsokubectl get all --all-namespaces
to provide more details. – Mark