Тёмный

Demystifying kubeconfig file | kubeconfig file explained - Part 1 

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

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

 

30 сен 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 81   
@dhirajdsharma
@dhirajdsharma 8 месяцев назад
this was actually awesome.
@viveksinghggits
@viveksinghggits 7 месяцев назад
Thank you.
@ashfaqurtahashin564
@ashfaqurtahashin564 2 года назад
This is great tutorial. Thanks for sharing your knowledge with us. It helps a lot for newbies like me to understand in detail
@viveksinghggits
@viveksinghggits 2 года назад
Thanks for watching.
@dipi411
@dipi411 2 года назад
Thanks, brother!!
@viveksinghggits
@viveksinghggits 2 года назад
Thank you. I am glad you liked it.
@sujatharacharla8023
@sujatharacharla8023 Год назад
helpful
@viveksinghggits
@viveksinghggits Год назад
Thank you
@OmprakashYadavIIT
@OmprakashYadavIIT 2 года назад
nice
@viveksinghggits
@viveksinghggits 2 года назад
Thank you
@wardaddyfury
@wardaddyfury 3 года назад
Very informative, I didn't know how kubectl searches for config file. Keep it up buddy :)
@viveksinghggits
@viveksinghggits 3 года назад
Thank you so much.
@saba_mt
@saba_mt 2 года назад
Thank you, it is really nicely explained
@viveksinghggits
@viveksinghggits 2 года назад
I am glad you liked it.
@pravinrathod3475
@pravinrathod3475 2 года назад
Hi Vivek I am getting below error even if i have my kube config file in ~/.kube/config error: Missing or incomplete configuration info. Please point to an existing, complete config file: 1. Via the command-line flag --kubeconfig 2. Via the KUBECONFIG environment variable 3. In your home directory as ~/.kube/config To view or setup config directly use the 'config' command. [ERROR] 2022-08-23T12:46:41.799944Z cmd.Run() failed with exit status 1 [ERROR] 2022-08-23T12:46:41.799998Z Command exception: The login-to-ocp command failed (exit status 1). You may find output and logs in the "/home/pravin/install_dir/cpd-cli-workspace/olm-utils-workspace/work" directory. [ERROR] 2022-08-23T12:46:41.800691Z RunPluginCommand:Execution error: exit status 1
@viveksinghggits
@viveksinghggits 2 года назад
When do you get this error?
@i_d_k3544
@i_d_k3544 2 месяца назад
Thanks Sir !!
@bhushandhapodkar7577
@bhushandhapodkar7577 3 месяца назад
file kaha pe milagi ??
@abhishekghosh5550
@abhishekghosh5550 6 месяцев назад
How do i change the current context in a kubeconfig file?
@viveksinghggits
@viveksinghggits 6 месяцев назад
Google the same question and you should be able to find out the kubectl command to do that.
@יוניארליך-ע5פ
@יוניארליך-ע5פ 2 года назад
Hey! great video, and very helpful. Would love it if you invest in a better mic, and add subtitles (even if auto generated) Thank you, subbed!
@viveksinghggits
@viveksinghggits 2 года назад
Hi, Thank you. I actually have a mic but I don't use it. I thought the quality difference isn't that much. Also setting up mic in Ubuntu with OBS is a problem. But let's see if I would be able to figure that out.
@viveksinghggits
@viveksinghggits 2 года назад
The subtitles should be there on most of the videos, but I am not sure why we don't have subtitles in some videos, I will try to figure that out.
@sachinmaurya3259
@sachinmaurya3259 3 года назад
Finally, I am able to understand kubeconfig file Awesome Video , Thank you :)
@viveksinghggits
@viveksinghggits 3 года назад
Hey 👋, Thanks Sachin. I am glad it was helpful.
@athenahealth4246
@athenahealth4246 3 года назад
I was searching for this. kubectl config. And I found this. Thanks
@viveksinghggits
@viveksinghggits 3 года назад
Thanks for watching.
@shreyasmateti2481
@shreyasmateti2481 2 года назад
most of your tutorials are very informative, thanks for your time to post these videos, keep posting any new features if you find going forward, thanks
@viveksinghggits
@viveksinghggits 2 года назад
Thank you Shreyas.
@aaajjjay
@aaajjjay 2 года назад
Hi Vivek, In this video you wrote command "kubectl get ns". My question is how does it get the namspace information because in kubeconfig file there is only information about cluster and users. How does it get information about namespace. In similar way about pods, nodes, etc. Thanks
@viveksinghggits
@viveksinghggits 2 года назад
Hi 👋, The short answer is kubeconfig file doesn't store/have the k8s resources. The k8s resources are stored in another key value store usually ETCD. kubeconfig file just had details about where the api server is and how users/clients can authentic against thst api server. To get to know more about this you can watch some of the videos that I have made on Kubernetes architecture.
@rrryu4757
@rrryu4757 2 года назад
@@viveksinghggits I was searching the same issues.. Thanks :)
@viveksinghggits
@viveksinghggits 2 года назад
👍
@madhaiyanm4036
@madhaiyanm4036 2 года назад
Really detailed explanation about kube config. well done.
@viveksinghggits
@viveksinghggits 2 года назад
Thank you Madhaiyan. I am glad you liked it.
@parimi001
@parimi001 Год назад
@vivek - How will you add cluster info using kubectl?
@viveksinghggits
@viveksinghggits Год назад
Hi Venkat, I am not sure what exactly your question is, but I think this video has the answer. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-XsFbUgZ0Ad8.html If not, let me know the details about your question.
@parimi001
@parimi001 Год назад
@@viveksinghggits So like you said, there are 3 components of the kubeconfig file right. 1. Cluster Info # What command will populate this section??? 2. Context # kubectl config set-context will map cluster info and user. 3. Users # kubectl config set-credentials will set the user
@viveksinghggits
@viveksinghggits Год назад
Did you watch the video that I linked above? That explains all these things.
@anamigator
@anamigator 3 года назад
Because this came in my feed, just a suggestion, it's pronounced as kube-see-tee-el, not kube cutel
@viveksinghggits
@viveksinghggits 3 года назад
Hi Aditya, Thanks for feedback. I don't have a strong opinion but I don't think it's written somewhere officially that this is how it should be pronounced. Kubekuttle is easier that's why I use that.
@anamigator
@anamigator 3 года назад
@@viveksinghggits there’s a standard for calling system tools that control a background daemon. You’re free to call whatever you want, but in the sense of communication it’s convenient to stick to a standard that’s widely understood.
@viveksinghggits
@viveksinghggits 3 года назад
Hi Aditya, So two things here 1. I have seen people using kube cuttle most of the time. I have seen even k8s authors using kube cuttle or kube cuddle. 2. Kubectl is not a daemon. Again I don't have a strong opinion, you might be right but I think you would agree that saying kube cuttle is easier than kube CTL.
@viveksinghggits
@viveksinghggits 3 года назад
Or the better sentence would be 2. Kubectl doesn't control a background daemon.
@anamigator
@anamigator 3 года назад
@@viveksinghggits sure, may be I’ve never come across this way of saying it. I didn’t mean kubectl controls a daemon, what I was referring to is kubectl talks to a daemon, right ?
@tukovbertrandm6453
@tukovbertrandm6453 3 года назад
Hi Vivek, Thanks for this video. can you please tell me how to replace the default config file with another...in your video you showed how to set up two config files to be access together, but what I really want to know is to how to replace one with another. Many thanks
@viveksinghggits
@viveksinghggits 3 года назад
Can we not just set the KUBECONFIG env var with the kubeconfig file that you want to use. I think that should work.
@tukovbertrandm6453
@tukovbertrandm6453 3 года назад
@@viveksinghggits sure it would work, but I was doing some online tutorials and it’s asking to replace the default config file instead. I think they want it to stay at /root/.kube directory , while my new config file is in the root directory.
@viveksinghggits
@viveksinghggits 3 года назад
Maybe I am not understanding the problem correctly but can't you move your file inside .kube dir and then set the KUBECONFIG env var accordingly.
@rrryu4757
@rrryu4757 2 года назад
@@tukovbertrandm6453 Use 'cp new_config_file ~/.kube/config' or you can manually update in /root/.kube/config
@david2358
@david2358 2 года назад
Thank you for the tutorial 👍
@viveksinghggits
@viveksinghggits 2 года назад
Thank you David. 😊
@DurgaPrasad-i9r
@DurgaPrasad-i9r Год назад
The problem statement and goal for this is as follows: A common Kubeconfig file is generated for each k8s cluster This kubeconfig file has full access to to the cluster The same kubeconfig file is used in the project pipelines which can be read by all developers This becomes a potential security issue The goal is to generate a restricted kubeconfig files for each project This kubeconfig file would have access to only the project namespace, not anything else. The same can be used in the project pipelines and shared with developers where necessary, without much security exposure. It would be great if this could be completed asap.
@viveksinghggits
@viveksinghggits Год назад
I am not going to help here, because of obvious reasons.
@Rosepoision
@Rosepoision 3 года назад
Try to make video for kubernetes 1.21 latest release , other than that how to backup cluster ,additionally rbac
@viveksinghggits
@viveksinghggits 3 года назад
Hey 👋, I already have a video on RBAC, I can share the link if you want to. I will try to make video on 1.21 maybe. When you say how to backup cluster, do you mean backup etcd (cluster state) or backing up deployed applications.
@Rosepoision
@Rosepoision 3 года назад
@@viveksinghggits thank you,sure please share the link, backup like complete configuration cluster, nodes like how vlero is doing it
@viveksinghggits
@viveksinghggits 3 года назад
Hey 👋, This is the link to RBAC video ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-gqhbnulGza4.html
@Rosepoision
@Rosepoision 3 года назад
@@viveksinghggits thank you
@viveksinghggits
@viveksinghggits 3 года назад
👍
@omega1962
@omega1962 2 года назад
While using multiple config files, suppose both the config files have default context set and if I execute any command like kubectl get ns, then which context is it going to consider?
@viveksinghggits
@viveksinghggits 2 года назад
How are you using multiple config files.
@omega1962
@omega1962 2 года назад
@@viveksinghggits I mean can we use multiple kubeconfig file? Also I need some help of EKS user access. Can you please guide? I have created EKS cluster and an EC2 machine. In EC2 machine, first I need to install kubectl, I am stuck here, how do I, 1. Connect to the EKS cluster? 2. I create a new linux user (useradd kishore), How can new user kishore get access to kube EKS cluster? Thanks in advance.
@sandeepharidasula3191
@sandeepharidasula3191 3 года назад
Thank you Vivek, for your tutorials.
@viveksinghggits
@viveksinghggits 3 года назад
Hey 👋 Sandeep, Thank you, I am glad you liked it.
@sakshirathore4670
@sakshirathore4670 3 года назад
Hi Thanks for the video. How can i add configmap configured for coreDNS in kube-system namespace in kubernetes default configuration so in future when i redeploy configmap will be alredy present in the cluster.
@viveksinghggits
@viveksinghggits 3 года назад
Hi Sakshi, Can you please explain the question a bit more. "when I re deploy" what exactly are you trying to re deploy. If you are asking about re deploying the k8s cluster and expecting the configmap from previous cluster to be present in new cluster I don't think that's possible. Also, why do you want to do that.
@sakshirathore4670
@sakshirathore4670 3 года назад
@@viveksinghggits we had to make an adjustment to the DNS in the two clusters. This is needed so that the applications in the cluster can talk to the keycloak without having to go over the external network. For this I had to add one line per environment in the ConfigMaps of coreDNS (namespace kube-system): On development: rewrite name exact login.ccp.test.web ingress-nginx-controller.ccp.svc.cluster.local rewrite name exact login.ccp.entw.web ingress-nginx-controller.ccp.svc.cluster.local On prod: rewrite name exact ingress-nginx-controller.ccp.svc.cluster.local Can i include this somewhere in the configuration for the clusters? So that e.g. in case of an upgrade or migration of cluster it is automatically available in the new cluster? 😊
@viveksinghggits
@viveksinghggits 3 года назад
mm, sorry I am not sure if I would be able to help here. I think I am not able to understand the problem/use case.
@viveksinghggits
@viveksinghggits 3 года назад
I can try, if you maybe explain the use case in better way.
@ashok.9761
@ashok.9761 3 года назад
These video's very usey self preparation guys 🙏 Please make more videos sir
@viveksinghggits
@viveksinghggits 3 года назад
Hey 👋, Thanks Ashok. Yes I will make more videos for sure. I have already uploaded a lot of kubernetes related videos here, meanwhile you can check them out.
@ashok.9761
@ashok.9761 3 года назад
@@viveksinghggitsI am learning kubernates your channel bro
@viveksinghggits
@viveksinghggits 3 года назад
😊
@ankursinha286
@ankursinha286 3 года назад
in CKA exam they have a nested cluster kind of architecture. Can you explain how that is being setup. they have around 6 clusters and move between them using use-contexts. But i am not able to image how physically it must have been set. Also in kubeconfig it talks to kube-apiserver on port 6443. but i see in your kubeconfig it was a random port.
@viveksinghggits
@viveksinghggits 3 года назад
Hi Ankur, If we talk about 6 clusters in CKA exam, I don't think they are nested clusters. They are 6 actual clusters with their entry made in the kubeconfig file. And because of those six entries we can very easily switch which cluster we want to work on.
@viveksinghggits
@viveksinghggits 3 года назад
If we talk about the port thing, I agree api server usually runs on 6443 and in this case as well the same is happening. It's not clearly visible because the entire thing (k8s cluster) is setup using kind, and in that case every core component runs inside a container. So the port that we see in kubeconfig file is container port not the api server port. But eventually that's containers port is mapped to the api server pod port, which is 6443. I would also like to highlight that this is happening because we set up the cluster using kind.
@viveksinghggits
@viveksinghggits 3 года назад
Let me know if it doesn't make sense, I will be happy to answer anything else.
@ankursinha286
@ankursinha286 3 года назад
@@viveksinghggits Oh Okay got it thanks....And forgot to mention that your videos are too good and quite nicely explained.
@viveksinghggits
@viveksinghggits 3 года назад
Thanks for kind words Ankur 🙏.
Далее
Understanding KUBECTL - Learning Kubernetes
40:34
Просмотров 10 тыс.
КАК БОМЖУ ЗАРАБОТАТЬ НА ТАЧКУ
1:36:32
FATAL CHASE 😳 😳
00:19
Просмотров 1,6 млн
NGINX Tutorial - What is Nginx
14:32
Просмотров 182 тыс.
10 Must-Have Kubernetes Tools
18:53
Просмотров 39 тыс.
Kubernetes Tutorial For Beginners - Learn Kubernetes
17:47
RBAC in Kubernetes
20:27
Просмотров 35 тыс.