Skip to content

Instantly share code, notes, and snippets.

@YurgenUA
Created January 20, 2024 20:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save YurgenUA/c860bc271e6c12116245cf46c8c5b8cb to your computer and use it in GitHub Desktop.
Save YurgenUA/c860bc271e6c12116245cf46c8c5b8cb to your computer and use it in GitHub Desktop.
kubectl exec -it -n playground demo-non-privileged-dp-65f45f4fcd-g7r48 -- /bin/bash
>>root@demo-non-privileged-dp-65f45f4fcd-g7r48:/# kubectl get secrets
>>Error from server (Forbidden): secrets is forbidden: User "system:serviceaccount:playground:non-privileged-sa" cannot list resource "secrets" in API group "" in the namespace "playground"
>>root@demo-non-privileged-dp-65f45f4fcd-g7r48:/# kubectl get pods
>>NAME READY STATUS RESTARTS AGE
>>demo-dp-7756f78b4c-4zfpr 1/1 Running 0 4m38s
>>demo-non-privileged-dp-65f45f4fcd-g7r48 1/1 Running 0 3m17s
>>root@demo-non-privileged-dp-65f45f4fcd-g7r48:/# exit
>>exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment