From the course: Certified Kubernetes Administrator (CKA) Cert Prep

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Configuring cluster access

Configuring cluster access

- So next task is to create a ServiceAccount with the name lab1510access that has permissions to create Pods, Deployments, DaemonSets and StatefulSets in the namespace access using the role role1510. And in the same namespace create a Pod lab1510pod which starts the Busybox container image and the command sleep infinity and uses this SurfaceAccount. All right, so we need to create a role. And how do we do that? Well kubectl create role -h | less. And what I like here is, I think this guy, resource=, and it seems as if we are using a comma-separated list of resources. So let's copy this, let's paste it and let's start from the beginning. kubectl create role needs to be in a namespace, so in the namespace access. And the role needs to be role1510. And then we have the verbs. So create Pods, Deployments, DaemonSets, so that will be create. And the resource is Pods, Deployments, DaemonSets, as well as StatefulSets. And there we can see that the role is created. Is that really so? kubectl…

Contents