资讯详情

资讯详情

CKA-Task 1. RBAC - role based access control(4/100)

Task weight: 4%Set configuration context:$ kubectl config use-context ck8sContext:You have been asked to create a newClusterRolefor a deployment pipeline and bind it to a specificServiceAccountscoped to a specific namespace.Task:Create a new ClusterRole nameddeployment-clusterrole, which only allows to create the following resource types:DeploymentStatefulSetDaemonSetCreate a newServiceAccountnamedcicd-tokenin the existing namespaceapp-team1bind the new ClusterRoledeployment-clusterroleto the new Service Accountcicd-token, limited to the namespaceapp-team1内容为部署管道创建一个新的ClusterRole并将其绑定到范围为特定 namespace 的特定ServiceAccount任务创建一个名字为deployment-clusterrole且仅允许创建以下资源类型的新ClusterRoleDeploymentStatefulSetDaemonSet在现有的 namespaceapp-team1中创建一个名为cicd-token的新ServiceAccount。限于 namespaceapp-team1将新的 ClusterRoledeployment-clusterrole绑定到新的 ServiceAccountcicd-token。
觉得有用,分享给同行:

为您的企业打造数字门面

稳重轻奢商务风格,端正雅致视觉,长效耐看不易过时。

立即咨询 →