MSK:
What is wrong in the steps followed ? @unnivkn @Tej_Singh_Rana Please help here as everytime it is in showing Incomplete while validating results
root@controlplane:~#
root@controlplane:~# cat /root/CKA/john.csr | base64 | tr -d "\n"
LS0tLS1CRUdJTiBDRVJUSUZJQ0FURSBSRVFVRVNULS0tLS0KTUlJQ1ZEQ0NBVHdDQVFBd0R6RU5NQXNHQTFVRUF3d0VhbTlvYmpDQ0FTSXdEUVlKS29aSWh2Y05BUUVCQlFBRApnZ0VQQURDQ0FRb0NnZ0VCQU5JU05wYnB3OWduZERTejdMeFQ1VGFwZWJGaEtPQjRhYXkwU3E5bmRRQzdEeVRyCmtmbGZNeFdpU0YvbndDNDFBZ0UrTHViWHh1ak50b29oT2lsY1dFdXIvcTg4Uk5sYTdDKzVVRFFmSUlqNW9XVUgKWmQrd3ZmaFJ4UGNrRzY3dEswQVRRNzRkOExOdzhCcXRlMFZGVmZuOTQ4RnBZckhNSlRFbkY5UmhBOUx2MnFKVQpuS0Z0RmpROWhhRWxDTmNyS09pSm1yMjJFU3pUMGo2OEtEWEcrVGZZbDQ1UWpEL3VLQkI3c2MxWU1DempSeSt2CmpmeGRBU3lndlg0M2VRaEtuZDR3M29LS2NEMVN1TzZNVkNWY3VEVWgwQ2h4SXhpVE9CRjdIbUdNRnZYY05YdW0KK0RLY0lhUnJQN1dqbThuN2toV0ZCRlFzOGxHWUhlVTVHRGNiVVZrQ0F3RUFBYUFBTUEwR0NTcUdTSWIzRFFFQgpDd1VBQTRJQkFRQm9XVmlEbm01M3VVZm1yc25GNmhxQ2ZvQUUrcForcmZNbDE3MmMveHVnbW5ZQjM4VzhPdWc2CmFLQVFKdFp3Y1UxU3oxdS9MSFo1VlM5blpJTW0rVmIreFhLS1YzSk5XZ2Z3N05RdUs1UzdRNlBaQmJGWTFzaFMKSHFFYlJkOEVxVkpjRGlLdkZPMUxuUFdpUHhWRHVjRzc1TTVWQ3FjU0RWZVBtRFBqUHlQYWhzVUZCVnFzcm5DUgpYZlExc01vWmd6RnpITU0wdEkwU3EydzRuUURIajgxb2JyUzJmVXJ4ekRBNXBLV0FsMEdRbkYwU3BqUUZEaGQ3ClRVa2srYVhuTzZuVHVjTUkxcXJGbnpQbzRIbmNlYXppSHprcitqWTBTZE9uRWsyVkpFTjJubGltY21OMTRLME8Kb1Z1MWovVmRWM1lBaUxxNUYrZy9kR0hscG5EQW1MSUkKLS0tLS1FTkQgQ0VSVElGSUNBVEUgUkVRVUVTVC0tLS0tCg==root@controlplane:~#
root@controlplane:~#
root@controlplane:~# vi 06-john-csr.yaml
root@controlplane:~#
root@controlplane:~#
root@controlplane:~# vi 06-john-csr.yaml
root@controlplane:~#
root@controlplane:~# k apply -f 06-john-csr.yaml
<http://certificatesigningrequest.certificates.k8s.io/john|certificatesigningrequest.certificates.k8s.io/john> created
root@controlplane:~#
root@controlplane:~#
root@controlplane:~# k get csr
NAME AGE SIGNERNAME REQUESTOR CONDITION
csr-djqwr 33m <http://kubernetes.io/kube-apiserver-client-kubelet|kubernetes.io/kube-apiserver-client-kubelet> system:bootstrap:dlkd6b Approved,Issued
john 6s <http://kubernetes.io/kube-apiserver-client|kubernetes.io/kube-apiserver-client> kubernetes-admin Pending
root@controlplane:~#
root@controlplane:~#
root@controlplane:~#
root@controlplane:~# kubectl certificate approve john
<http://certificatesigningrequest.certificates.k8s.io/john|certificatesigningrequest.certificates.k8s.io/john> approved
root@controlplane:~#
root@controlplane:~#
root@controlplane:~# k get csr
NAME AGE SIGNERNAME REQUESTOR CONDITION
csr-djqwr 34m <http://kubernetes.io/kube-apiserver-client-kubelet|kubernetes.io/kube-apiserver-client-kubelet> system:bootstrap:dlkd6b Approved,Issued
john 50s <http://kubernetes.io/kube-apiserver-client|kubernetes.io/kube-apiserver-client> kubernetes-admin Approved,Issued
root@controlplane:~#
root@controlplane:~#
root@controlplane:~#
root@controlplane:~#
root@controlplane:~# k create role dev-role --resource=pods --verb=create,list,get,update,delete -n development
<http://role.rbac.authorization.k8s.io/dev-role|role.rbac.authorization.k8s.io/dev-role> created
root@controlplane:~#
root@controlplane:~#
root@controlplane:~# k describe role -n development dev-role
Name: dev-role
Labels: <none>
Annotations: <none>
PolicyRule:
Resources Non-Resource URLs Resource Names Verbs
--------- ----------------- -------------- -----
pods [] [] [create list get update delete]
root@controlplane:~#
root@controlplane:~#
root@controlplane:~#
root@controlplane:~# k create rolebinding dev-role-john --user=john --role=dev-role -n development
<http://rolebinding.rbac.authorization.k8s.io/dev-role-john|rolebinding.rbac.authorization.k8s.io/dev-role-john> created
root@controlplane:~#
root@controlplane:~#
root@controlplane:~# k describe rolebinding dev-role-john -n development
Name: dev-role-john
Labels: <none>
Annotations: <none>
Role:
Kind: Role
Name: dev-role
Subjects:
Kind Name Namespace
---- ---- ---------
User john
root@controlplane:~#
root@controlplane:~#
root@controlplane:~#
root@controlplane:~# k auth can-i delete po -n development --as john
yes
root@controlplane:~#
root@controlplane:~#
root@controlplane:~#