csysdig error while specifying k8s api url

2/2/2018

CSysdig gives the following error while specifying k8s api url:

K8s API error; Status: Failure, Message: nodes is forbidden: User "system:anonymous" cannot list nodes at the cluster scope, Reason: Forbidden, Details: , Code: nodes is forbidden: User "system:anonymous" cannot list nodes at the cluster scope

How can the token for kubernetes credential be specified with csysdig?

-- Arun
kubernetes
rbac

1 Answer

2/3/2018

Found the answer, the kubernetes I was trying to monitor with sysdig is secured by a certificate. Put the certificate in a file and use the sysdig as following:

csysdig --k8s-api=https://: --k8s-api-cert=filename

With this, kubernetes metrics can be monitored using csysdig.

-- Arun
Source: StackOverflow