WEEK 6: ENTRY 1
Little did I know that a Kubernetes deployment project could have multiple clusters and namespaces. Perhaps, it was because I was all along working with one cluster, which also has one namespace since the genesis of my internship. Well, since I needed to make sure that my application has access to the Big Query API, I needed to use a different cluster and a namespace because my initial cluster does not have any big query data. Thus, my manager created a new cluster and namespace and gave me the names. Just like how I login the previous cluster, I also used the same command line to login to the new cluster. The only part of the command line I needed to change was the cluster name as well as the namespace name if I needed to use the pods in that namespace. In short, I now have two clusters: one is to access the Big query data and the only is used for my server application.
Unlike how easy it was to navigate and use one cluster, it is much more complex when dealing with two clusters for me. Previously, I just needed one configuration in my git-lab-ci file and k8s yaml files. But now, I need to make sure that my k8s configurations are working for both clusters. And as a newbie in k8s, I did not understand the essence of the overlays directory of the k8s main folder. The overlays house both files for the different configurations of the different clusters. My manager had to explain this concept for me before I fully grasped it. And even after doing the distinctive configurations and pushing my code, my pipeline was failing for the newly added cluster. I checked the logs on my Putty CLI and found out that the MountPath was not recognizing the newly added cluster configuration. This was because the mountpath had only the path of the first cluster I created. Therefore, to resolve this issue, I variabilized the path to both points at the two clusters anytime they are called.
Overall, it was a very different experience compared to working with only one cluster. I am now required to be more alert on what cluster I am login to and when I should login to a particular cluster. So too, because of my manager's reaction to how I was struggling to use and configure the new cluster, I was prompted to do a deep dive on k8s deployment and understanding how to use yaml files. My previous experience with working with the first cluster eased the process; however, I should have done more research on working with multiple clusters prior to our session today. Therefore, I intend to be more alert and proactive by looking at the concept or tools I will be working on prior to working with them.
Comments
Post a Comment