Welcome to the Linux Foundation Forum!

Lab 15.2 - Error with command "kubectl --context=DevDan-context get pods"

After creating the user and following along with the lab exercise, when I run the above command, this is the output I get:

"Error from server (Forbidden): pods is forbidden: User "kubernetes" cannot list resource "pods" in API group "" in the namespace "development""

I've checked for typos in the rolebinding and role-dev yaml and compared them to the provided yaml files. I'm sure it's something I'm overlooking, but if anyone has any suggestions, I would appreciate it. Thanks.


  • I found the issue, feel free to delete. The issue was that I copied/pasted the command that reference the path for home directory of the "student" user, but I used a different user when I created the VM. Silly mistake. Thanks.

  • Same lab, step 15

    kubectl --context=DevDan-context get pods

    Above command produces

    Error in configuration:

    • unable to read client-cert /home/student/DevDan.crt for DevDan due to open /home/student/DevDan.crt: no such file
      or directory

    • unable to read client-key /home/student/DevDan.key for DevDan due to open /home/student/DevDan.key: no such file
      or directory


  • Hi @sergeizak,

    After completing Steps 5 and 6 of Lab exercise 15.2 can you confirm the existence of the 2 files DevDan.crt and DevDan.key in your /home/student/ directory?

    Also, I have seen errors when .crt was replaced, in error, with .csr.


  • when I run ls command, they are in the root directory

  • Hi @sergeizak,

    In your configuration, are you replacing student with the your username when required?
    Since you are not using the student user, yet the errors are related to /home/student directory, it seems that an incorrect path is being referenced by commands and artifacts created.



Upcoming Training