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