Transcript for:
Essential CI/CD Interview Questions Overview

hi hello everyone welcome back to my channel and today we will talk about what are the top 5 most uh cacd interview questions and their answers we'll try to answer these questions more on the basis of some scenarios so let's quickly uh jump into the questions and see their answers as well so the first one is explain your current cicd setup I think this question can be asked in multiple ways like people ask you what is your cicd tooling what are the tools that you're using or what TCI CD according to you is established in your organization so whatever it is uh the answer to it has to be very elaborate because this question basically uh gives you gives the interviewer a chance to analyze your knowledge on cicd so tell the answer in a most detailed way so that uh he or she can understand uh your expertise on cicd so basically I have written the answer here you can probably I mean I'll not read everything here you can go through the answer but uh generally you can say cicd is continuous integration and continuous delivery and in the current organization we are using GitHub and we are using Jenkins for the continuous integration where we have set up web hook which Triggers on each and every commit that is made to GitHub and triggers a CI Pipeline on Jenkins and then you can talk about multiple stages that are in your Jenkins pipeline like you can say you have a build stage you have test stage you have deploy stage and you know whenever you're talking about these things uh basically detail them uh like how what is your build stage what what are the different things that are in your build Stay like static code analysis unit testing building and then in your test stage uh whether you're doing smoke testing or you're doing functional testing in your deployment staging in your deployment stage basically explain uh what is your artifactory how you're building your Docker image or application uh archive whatever whatever you are building and then explain how you are deploying it onto your kubernetes cluster or websphere weblogic application servers whatever your end Target cluster is so this is about your CI CD setup and the process and the second question I think this is a very important question how do you handle Secrets because mostly people will be very prepared for the first answer first question uh the cicd process and everything but you need to explain how do you handle Secrets because secrets are integral part of every application these days right so whether your SSH Keys whether your API key whether it can be your you know kubernetes login secret or anything you deal with a lot of Secrets these days in your cicd pipelines so basically answer this question depending upon where your Jenkins or any CI tool is set up let's say you are on GitHub right so GitHub provides an option for securing your secrets in the cacd uh in the action cicd itself if you're on gitlab there is again there is an option for uh securing your secrets in the ca variables itself uh on your on your gitlab UI apart from that let's say you're on uh cloud provider like AWS so probably you can say you store your secrets in AWS systems manager and retrieve whenever it is required or if you're on Azure you are probably using Azure Vault and one of the popular tools uh irrespective of the cloud or anything that you are in a hashic or vault so hashicorp called Vault is one of the most used uh applications for securing storing your secrets so be prepared with this answer because this is one of the most asked interview question for cicd after that people ask about your deployment strategy what I have uh seen most of the times is most of the times is that people are very prepared with respect to the continuous integration CI part but uh not with the CD The Continuous delivery but you know uh CI is very easy to set up as well you have tools like Jenkins GitHub actions it's very easy to do uh CA but coming to CD you have to be uh very uh you know um keen on how you are setting your CD what is your type of application where you are deploying your application onto so continuous delivery is uh a key uh component for uh your entire cacd as well as during your interviews people ask a lot about CD so coming to the deployment strategy you can talk about the popular deployment strategies if you have employed either blue green deployment or Canary deployment on your uh site on your organization so depending upon what you have set up probably answer these things but uh to explain what is blue green and what is Canary in a very short way so blue green deployment is basically where uh if you see the picture onto the left side you know using blue green deployment what to do is that you already have an application let's say the application version is 34 and you are deploying a new version of your application probably call it 35 okay so firstly what you do is that you point your load balancer to the application 34 which is deployed on your cluster then you install uh application 35 on the same cluster the new version using your cicd pipeline and what you do is that you shift your load balancer to the application certified and so that no uh traffic is sent to the application 34 however you provide some grace period Grace time for the users that are already on application 34 and once this grace period is over you simply Point your load balancer I mean you already pointed your application load balancer to 35 you just delete application 34. once you are confident about your application testing and everything okay so this is the process using blue green deployment now the other popular deployment strategy is the canary deployment strategy and using Canary what you do is that basically you shift in the same way you deploy both application 34 and 35 but instead of directly pointer load balancer to application 35 what you do is that you limit your traffic to application 35 initially you send only 10 percent of your traffic so all this modern day load balances like F5 or nginx or any load balancer using Ingress they are able to do it uh by you know they call it ratio based uh ratio based load balancing or weight based load balancing whatever it is so uh initially route only 10 and then probably you can switch the gears 66.33 and then finally you can do 30 so there are very lot of I mean there are a lot of tools which can achieve this uh for the canary deployment model uh if you want to learn about uh Kennedy deployment probably you can Google for Kennedy deployment and tools can be used to achieve the canary deployment but all the popular load balancer can do it these days now what do you do if the deployed application is faulty or let's say your application has security vulnerabilities or your application is faulty it's not working as expected so what do you do one of the most easy ways to answer this is uh talk about the blue green deployment which we talked in the previous slide because if you look here carefully uh if something goes wrong with your blue green deployment what you can immediately do is that point your load balancer from 35 to 34 or people uh basically do it using multiple sites right so blue site and green side and if something goes wrong they immediately appoint the load balancer to the green uh from Green side to the blue side so this is the most easy way blue green deployment but if you are employing any other deployment strategies you have to be very careful on explaining how did you roll how do you actually roll back but blue green is the most easy way to roll back so this question uh the way you answer is when something goes wrong we have a rollback pipeline or we have a strategy for rollback uh because we are doing blue green deployment it is very easy for us to roll back finally uh Jenkins setup backup and scaling up so how do you do this the reason why I put this question only related to Jenkins is that I recently set up a poll on my YouTube channel asking what is the most popular CI tool that you are using 90 of the people choose Jenkins only 10 of them choose GitHub actions gitlab and Travis I think nobody has actually opted for it so the reason for me to talk about Jenkins in this specific question is because of that so this is again important question because uh apart from setting up your cicd pipelines it is always important for you to understand how your CI tool or gen for that for this question Jenkins however Jenkins is set up how do you uh take backups for your Jenkins uh logs or bills or artifacts anything and then how do you scale up because you know at times you might get more number of bills at times you get less builds so scaling up scale down is also one of the interesting aspects so it's very easy to do with Jenkins uh I think Jenkins installation is the most easiest thing uh you just have in uh you can do it through Docker as well you have a simple curl command that you can use to install Jenkins I can show you uh some other time how do you install Jenkins it you can I mean nobody will actually care about the installation because it's just a single command but the most important thing is a backup as well as scaling up so for scaling up I would say one of the I'll take an example let's say your Jenkins is on AWS what you can say is that uh Jenkins is set up on AWS and we have set up Jenkins uh on easy to instance and we have set up an auto scaling group so this Auto scaling group basically takes care of scaling up scaling down we have employed the predictive scaling uh on the AWS Auto scaling so predictive scaling basically uh takes care it basically predicts like at this time you might get more traffic at the time you might get less traffic so it will it will automatically scale up an ec2 instance and once the ec2 instance is spinned up Jenkins basically uses SSH to interact with the newly created node so this is the process and for backup I think Jenkins has a DOT backup folder if you can sorry dot Jenkins folder just backup the dot Jenkins periodically using some prawn jobs and that will basically take your Jenkins backups so uh this is the top five in cacd interview questions that I have for you and uh if you feel that I missed something or there are other popular interview questions uh related to cicd please post them in the comment section and I'll be more than happy to answer as usual don't forget to like comment share and subscribe to my channel thanks I'll see you in the next video bye