Тёмный

Adding users to your Kubernetes cluster | Creating client certificate and key to provide users 

Vivek Singh
Подписаться 8 тыс.
Просмотров 7 тыс.
50% 1

Опубликовано:

 

30 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 60   
@harishchava1443
@harishchava1443 2 года назад
Why did you exec into kube-apiserver-kind-control-plane container only for generating the user certificate? Is it the kind of admin container which generates certs? I am using aks cluster, Which pod I need to use for generating certs?
@viveksinghggits
@viveksinghggits 2 года назад
Hi Harish, That's a good question, so we have to basically generate two things private key and CSR. These two things can be generated using openssl command independently. Once we have those files, look at 11:13. You can create CertificateSigningRequest k8s object, using the files that we generated and then admin can approve thst request and we would get .crt. Let me know if you have any other questions.
@deepakkarthikeyan2508
@deepakkarthikeyan2508 3 года назад
IS the procedure same for readonly user
@viveksinghggits
@viveksinghggits 3 года назад
I think yes, the procedure would be same. We would just have to create the role/cluster role accordingly.
@NitinSharma-if1tf
@NitinSharma-if1tf 3 года назад
Hello sir I have created cluster with one master and one worker node ,master node added with public azure load balancer. But when we run curl load balancer ip:6443 from master node to access kube-api server . I get error like curl( 60 )SSL certificate problem: unable to get local issuer certificate. Also when we try from browser it not access. please tell me something about this.
@viveksinghggits
@viveksinghggits 3 года назад
Hi Nitin, If I understood correctly you are trying to access the api server endpoint using curl and browser, why are you doing that? Thats not how we access k8s clusters, right? Since api server is secured you won't be able to access the api server endpoint. You will have to generate the kubeconfig file to a access the k8s cluster. Now, generating kubeconfig file depends on how you have setup the cluster.
@vinodreddy1722
@vinodreddy1722 3 года назад
Hi vijay ,we added user vivek but how kubernetes know that user vivek is executing ,becauser we didnt login as user vivek,and video on securityContext please
@viveksinghggits
@viveksinghggits 3 года назад
When we create a CSR (certificate signing request), we specify the username as common name (CN) for subj flag. And certificate for used is created using the same CSR. Which (cert) eventually is used in kubeconfig. And that is how kubernetes figures out which user is trying to talk to the cluster. Let me know if this didn't make sense.
@vinodreddy1722
@vinodreddy1722 3 года назад
@@viveksinghggitsthanks for your reply,we are creating user vivek and doing everything, do we need to log In as user vivek to server where cluster is running to get these access?
@viveksinghggits
@viveksinghggits 3 года назад
Not really, if you see we didn't create a Linux user anywhere. So, you just have to set credentials in kubeconfig and kuebctl should take care of the rest.
@KrishnaKumar-ks3mj
@KrishnaKumar-ks3mj 2 года назад
Hey Dear, First video I found worth watching and got lot of information which I was looking for since a year. Great to view your videos having lot of contents and clear most of my doubts / :)
@viveksinghggits
@viveksinghggits 2 года назад
Thanks for the kind words.
@user-mb7qe6ro9m
@user-mb7qe6ro9m 3 года назад
Awesome man, m currently learning K8, what u described above i asked many people who are already working into this since years but no one never replied back and the way u explained it 👏👏👏👏👏
@viveksinghggits
@viveksinghggits 3 года назад
Hey 👋, Thank you so much 💓 for the kind words🙏. I appreciate it. I am glad the video was helpful.
@Yesdin007
@Yesdin007 2 года назад
thank you for explaining CSR concept
@viveksinghggits
@viveksinghggits 2 года назад
I am glad you liked it.
@manishsingh-yl4hn
@manishsingh-yl4hn 2 года назад
Good content bro.. And you explained perfectly
@viveksinghggits
@viveksinghggits 2 года назад
Thank you 😊
@harinireddy8423
@harinireddy8423 2 года назад
Very good explanation thank you so much
@viveksinghggits
@viveksinghggits 2 года назад
Thank you, Harini.
@karthikkumar12
@karthikkumar12 Год назад
Hi Vivek thanks for the detailed explanation. Can you clarify what is the ca-certificate that is in the kubeconfig yaml file? Is that the same ca-certificate as the one in control-plane (/etc/kubernetes/pki/ca.crt that you used to create user certificate) or different. Can we use the ca-certificate in the kubeconfig yaml file to generate certificates?
@karthikkumar12
@karthikkumar12 Год назад
I think the answer for "Can we use the ca-certificate in the kubeconfig yaml file to generate certificates?" is not because we need ca.key AND ca.crt to generate certificates
@viveksinghggits
@viveksinghggits Год назад
Hi Karthik, Sorry, I don't have the answer to that question on top of my head.
@ramyasriram5290
@ramyasriram5290 3 года назад
Informative video.Thank you
@viveksinghggits
@viveksinghggits 3 года назад
Thank you 😊 Ramya.
@moinsyed195
@moinsyed195 Год назад
Please make some more videos
@viveksinghggits
@viveksinghggits Год назад
Sure. I have plans to create more videos.
@srinivasrayarao2529
@srinivasrayarao2529 Год назад
As usual, brilliant
@viveksinghggits
@viveksinghggits Год назад
Thank you.
@sachinkumar-os3ce
@sachinkumar-os3ce 3 года назад
Awesome explanation. Thanks Vivek
@viveksinghggits
@viveksinghggits 3 года назад
Thank you Sachin 😊
@dipi411
@dipi411 Год назад
Nice explanation
@viveksinghggits
@viveksinghggits Год назад
Thank you 😊
@manasjain914
@manasjain914 3 года назад
Helpful 👍
@viveksinghggits
@viveksinghggits 3 года назад
Thank you Manas 😊
@vijaygharge2414
@vijaygharge2414 3 года назад
Hi vivek, good content and coverage. Only request if you can make these videos small screen friendly (by increasing font size/zoom in). It would make phone based viewing experience seamless. Keep up the good work ! Kudos
@viveksinghggits
@viveksinghggits 3 года назад
Thanks Vijay, I have been trying to make smaller videos, let's see. I would also increase the font size in the next videos.
@Zeid_Al-Seryani
@Zeid_Al-Seryani 3 года назад
Thank you for your efforts, it was very helpful, Kindly I have a question , after giving the devuser authentication to the cluster, what if i want to remove the authentication and the devuser will not be allwed to communicate with the cluster, how can i do that ? Thanks in advance.
@viveksinghggits
@viveksinghggits 3 года назад
Hi 👋, That's a good question. I am not sure if there is a command kubectl certificate deny That can be used to revoke the access, like we used kubectl certificate approve to approve the access. Yeah, so I am not sure. You will have to figure that out.
@Zeid_Al-Seryani
@Zeid_Al-Seryani 3 года назад
@@viveksinghggits I have searched this in kubernetes documentations, I think the only way to do that is to delete the rolebinding / roleBinding created for this user, but the user will still be able to authenticate to the cluster but without any permissions, (as seen in your video before creating the role and role binding ) I think this is the only way to revoke authorization while you are unable to revoke the authentication Best Wishes Dear.
@viveksinghggits
@viveksinghggits 3 года назад
Yeah, you are right. I will keep this in mind and get back to you if I find something.
@Zeid_Al-Seryani
@Zeid_Al-Seryani 3 года назад
@@viveksinghggits Do you recommend any mock exams to prepare me before CKA Thank you
@viveksinghggits
@viveksinghggits 3 года назад
I think the udemy course by Mumshad is pretty good.
@faruk12ify
@faruk12ify 3 года назад
Nice explanation sir ..... Awesome video
@viveksinghggits
@viveksinghggits 3 года назад
Thank you 😊
@LearnProgramsCJ
@LearnProgramsCJ 3 года назад
Nice Video. useful information for beginers
@viveksinghggits
@viveksinghggits 3 года назад
Thank you Justin. 😊
@sameersardar6699
@sameersardar6699 3 года назад
well explained bro ... I was unable to get it ... Thanks a lot
@viveksinghggits
@viveksinghggits 3 года назад
Thanks 😊 Sameer. I am happy it was helpful.
@macharla_arun
@macharla_arun 3 года назад
Good 👍 well done keep going.. Help...ppl to learn
@viveksinghggits
@viveksinghggits 3 года назад
Thank you Arun 😊
@madhaiyanm4036
@madhaiyanm4036 2 года назад
Really very great video with in depth knowledge..well done.. keep going.. one question, you created role to allow pods only for vivek user. in case we want to provide all permission as like another user, do we need to create cluster role & cluster role binding?
@viveksinghggits
@viveksinghggits 2 года назад
What do you mean by provide all permission as like another user.
@madhaiyanm4036
@madhaiyanm4036 2 года назад
@@viveksinghggits i mean to create,list, delete all namespaces, all pods, all deployments and other k8s objects?
@viveksinghggits
@viveksinghggits 2 года назад
In that case we can add the user into admin group.
Далее
# Rural Funny Life Wang Ge
00:18
Просмотров 717 тыс.
11 ming dollarlik uzum
00:43
Просмотров 1,3 млн
RBAC in Kubernetes
20:27
Просмотров 35 тыс.
Kubernetes Certificates
25:56
Просмотров 11 тыс.
Exploring Authentication & Authorization in Kubernetes
1:01:51