Saturday, September 16, 2023

CI/CD Pipeline Workflow with Kubernetes

 𝗖𝗼𝗻𝘁𝗶𝗻𝘂𝗼𝘂𝘀 𝗜𝗻𝘁𝗲𝗴𝗿𝗮𝘁𝗶𝗼𝗻

🔹 It is the 𝙥𝙧𝙖𝙘𝙩𝙞𝙘𝙚 𝙤𝙛 𝙖𝙪𝙩𝙤𝙢𝙖𝙩𝙞𝙣𝙜 𝙩𝙝𝙚 𝙞𝙣𝙩𝙚𝙜𝙧𝙖𝙩𝙞𝙤𝙣 𝙤𝙛 𝙘𝙤𝙙𝙚 𝙘𝙝𝙖𝙣𝙜𝙚𝙨 𝙛𝙧𝙤𝙢 𝙢𝙪𝙡𝙩𝙞𝙥𝙡𝙚 𝙘𝙤𝙣𝙩𝙧𝙞𝙗𝙪𝙩𝙤𝙧𝙨 𝙞𝙣𝙩𝙤 𝙖 𝙨𝙞𝙣𝙜𝙡𝙚 𝙨𝙤𝙛𝙩𝙬𝙖𝙧𝙚 𝙥𝙧𝙤𝙟𝙚𝙘𝙩.

𝗖𝗼𝗻𝘁𝗶𝗻𝘂𝗼𝘂𝘀 𝗗𝗲𝗽𝗹𝗼𝘆𝗺𝗲𝗻𝘁/𝗗𝗲𝗹𝗶𝘃𝗲𝗿𝘆

🔹 CD focuses on 𝙖𝙪𝙩𝙤𝙢𝙖𝙩𝙞𝙣𝙜 𝙩𝙝𝙚 𝙙𝙚𝙥𝙡𝙤𝙮𝙢𝙚𝙣𝙩 𝙤𝙛 𝙨𝙤𝙛𝙩𝙬𝙖𝙧𝙚 𝙘𝙝𝙖𝙣𝙜𝙚𝙨 𝙩𝙤 𝙥𝙧𝙤𝙙𝙪𝙘𝙩𝙞𝙤𝙣 𝙚𝙣𝙫𝙞𝙧𝙤𝙣𝙢𝙚𝙣𝙩𝙨.

🔹 Continuous Delivery refers to the practice of frequently delivering changes to a staging or production-like environment, where they undergo further testing and validation.

🔹 Continuous Deployment takes it a step further by 𝙖𝙪𝙩𝙤𝙢𝙖𝙩𝙞𝙘𝙖𝙡𝙡𝙮 𝙙𝙚𝙥𝙡𝙤𝙮𝙞𝙣𝙜 𝙘𝙝𝙖𝙣𝙜𝙚𝙨 𝙩𝙤 𝙥𝙧𝙤𝙙𝙪𝙘𝙩𝙞𝙤𝙣 once they pass the necessary tests.

💢 The Key Steps in a Kubernetes-based CI/CD Pipeline 💢

𝗔𝘂𝘁𝗼𝗺𝗮𝘁𝗲 𝗕𝘂𝗶𝗹𝗱𝗶𝗻𝗴 & 𝗧𝗲𝘀𝘁𝗶𝗻𝗴

🔹 Automation testing is an essential part of the CI/CD pipeline. It 𝙖𝙡𝙡𝙤𝙬𝙨 𝙮𝙤𝙪 𝙩𝙤 𝙧𝙪𝙣 𝙩𝙚𝙨𝙩𝙨 𝙖𝙪𝙩𝙤𝙢𝙖𝙩𝙞𝙘𝙖𝙡𝙡𝙮, 𝙬𝙞𝙩𝙝𝙤𝙪𝙩 𝙩𝙝𝙚 𝙣𝙚𝙚𝙙 𝙛𝙤𝙧 𝙢𝙖𝙣𝙪𝙖𝙡 intervention.

𝗖𝗼𝗻𝘁𝗮𝗶𝗻𝗲𝗿𝗶𝘀𝗮𝘁𝗶𝗼𝗻


🔹 Containerization is a method of 𝙥𝙖𝙘𝙠𝙖𝙜𝙞𝙣𝙜 𝙖𝙣𝙙 𝙙𝙞𝙨𝙩𝙧𝙞𝙗𝙪𝙩𝙞𝙣𝙜 𝙨𝙤𝙛𝙩𝙬𝙖𝙧𝙚 𝙖𝙥𝙥𝙡𝙞𝙘𝙖𝙩𝙞𝙤𝙣𝙨. So that they can be easily deployed and run on any system, without the need to install dependencies or configure the underlying infrastructure.

𝗗𝗲𝗽𝗹𝗼𝘆𝗺𝗲𝗻𝘁 𝘄𝗶𝘁𝗵 𝗞𝘂𝗯𝗲𝗿𝗻𝗲𝘁𝗲𝘀


🔹 A Kubernetes Deployment is 𝙪𝙨𝙚𝙙 𝙩𝙤 𝙩𝙚𝙡𝙡 𝙆𝙪𝙗𝙚𝙧𝙣𝙚𝙩𝙚𝙨 𝙝𝙤𝙬 𝙩𝙤 𝙘𝙧𝙚𝙖𝙩𝙚 𝙤𝙧 𝙢𝙤𝙙𝙞𝙛𝙮 𝙞𝙣𝙨𝙩𝙖𝙣𝙘𝙚𝙨 𝙤𝙛 𝙩𝙝𝙚 𝙥𝙤𝙙𝙨 𝙩𝙝𝙖𝙩 𝙝𝙤𝙡𝙙 𝙖 𝙘𝙤𝙣𝙩𝙖𝙞𝙣𝙚𝙧𝙞𝙯𝙚𝙙 𝙖𝙥𝙥𝙡𝙞𝙘𝙖𝙩𝙞𝙤𝙣.

🔹 Deployments can scale the number of replica pods, enable rollout of updated code in a controlled manner, or roll back to an earlier deployment version if necessary.

𝗭𝗲𝗿𝗼-𝗗𝗼𝘄𝗻𝘁𝗶𝗺𝗲 𝗨𝗽𝗱𝗮𝘁𝗲𝘀

🔹 No downtime deployments on platforms that does not allow hotplugging of files and components would require 𝙗𝙡𝙪𝙚-𝙜𝙧𝙚𝙚𝙣 𝙙𝙚𝙥𝙡𝙤𝙮𝙢𝙚𝙣𝙩𝙨.

🔹 This allows traffic to hit some servers while others are being updated with new code, then swapped out. There are different forms of this deployment based on the architecture.

𝗠𝗼𝗻𝗶𝘁𝗼𝗿𝗶𝗻𝗴 & 𝗔𝘂𝘁𝗼 𝗥𝗼𝗹𝗹𝗯𝗮𝗰𝗸𝘀


🔹 A Deployment’s rollout is 𝙩𝙧𝙞𝙜𝙜𝙚𝙧𝙚𝙙 𝙞𝙛 𝙖𝙣𝙙 𝙤𝙣𝙡𝙮 𝙞𝙛 𝙩𝙝𝙚 𝘿𝙚𝙥𝙡𝙤𝙮𝙢𝙚𝙣𝙩’𝙨 𝙥𝙤𝙙 𝙩𝙚𝙢𝙥𝙡𝙖𝙩𝙚 (i.e, .spec.template) is modified.

🔹 If you modify the scaling parameter, it will not rollout, but if you are changing the 𝙙𝙚𝙥𝙡𝙤𝙮𝙢𝙚𝙣𝙩 𝙡𝙖𝙗𝙚𝙡𝙨 𝙤𝙧 𝙘𝙤𝙣𝙩𝙖𝙞𝙣𝙚𝙧 𝙞𝙢𝙖𝙜𝙚𝙨 info, it will trigger the deployment rollout to update it.

🔹 Implementing monitoring and logging solutions helps you track the performance of your applications in real-time.

 

No comments:

Post a Comment