This blog can provide you with useful information on how to set up a Kubernetes CI/CD workflow using state-of-the-art of open source DevOps tools, whether you are:
Traditional software development methodologies typically require a person, e.g. a Product Manager, to decide on and describe the desired behaviour of the software. The next step is for the development team to write, build, unit test and version-control the code using a revision management system, usually Git. Finally, test engineers validate the new software against a test suite that is designed with the desired behaviour in mind. This entire process has its shortcomings:
Enter CI/CD, a term often used alongside “DevOps”, “Agile”, “automation” etc. These terms aim to describe a modern development workflow that teams adopt in an attempt to improve quality and productivity.
A CI/CD pipeline is a series of stages and automated steps software goes through, from code development to production deployment.
CI stands for ‘Continuous Integration’ and refers to the software build pipeline. CI includes all the steps developers take between writing the code and pushing it to a team testing stage. These steps are designed to help the team capture any issues related to the code quality by providing them with constant feedback through automated builds, smoke tests, unit tests and so on.
CD refers to the software release pipeline, and can stand for either ‘Continuous Delivery’ or ‘Continuous Deployment’ – two very similar practices, mainly different in their level of automation. CD is all about validating that the code provides the desired functionality by deploying it across a series of environments. These environments aim to replicate the actual production environment, where the software will eventually run, prior to actually deploying it in production.
GitLab is a popular DevOps platform for end-to-end development and operations. It provides users with a Git repository for source version control, issue tracking, and CI/CD features. Developers can use the GitLab web UI and API to track builds, track test results, monitor deployments, and schedule batch jobs across various testing environments.
Containerisation is the latest trend in cutting-edge software development. Containers allow your software to be environment-agnostic whilst also ensuring consistent behaviour across environments, something often referred to as “cloud native”. Kubernetes is an open-source cloud platform that automates the deployment and operations of cloud native applications at scale.
Despite all this awesomeness, Kubernetes’s biggest caveat is its high barrier to entry. Kubernetes can be very complicated to set up, it comes with a large tooling ecosystem and requires a lot of configuration and tuning to run containerised applications in the long term.
Our solution to this is MicroK8s, Canonical’s lightweight & opinionated Kubernetes distribution. Developers and enterprises alike often report that MicroK8s is the right combination of intuitive and robust to address their use case, whether they work on a local workstation or on highly available clusters.
CI/CD workflows and cloud native systems have a few goals in common: they both try to increase development velocity, optimise software quality and maintain its operability. CI/CD automates many steps from when code is developed to the point it is released in production. Similarly, Kubernetes automates container deployments across various infrastructure environments and ensures efficient resource utilisation. Therefore, it naturally makes sense for organisations to set up CI/CD pipelines that leverage the Kubernetes platform.
GitLab is one of the most popular solutions if you are looking to do exactly that. It comes with a built-in container registry and can integrate with Kubernetes in three ways:
If you’re sold on CI/CD pipelines on Kubernetes, we have just the thing for you. MicroK8s is the easiest way to get a fully conformant Kubernetes cluster, and GitLab provides you with all the right tools for you to build a full DevOps environment. You only need to get some virtual machines and you and your teams are off to the races.
You can follow our 5-step guide to set the whole thing up on AWS. Note that in this tutorial we are also using the Charmed Operator Framework, with which you can follow the same steps to implement the same setup on any cloud. If you want to follow along, we also have a YouTube tutorial.
If you like our approach and would like to explore how to use it for your day-to-day production workflows, feel free to talk to our experts.
Cover photo by EJ Strat on Unsplash
One of the most critical gaps in traditional Large Language Models (LLMs) is that they…
Canonical is continuously hiring new talent. Being a remote- first company, Canonical’s new joiners receive…
What is patching automation? With increasing numbers of vulnerabilities, there is a growing risk of…
Wouldn’t it be wonderful to wake up one day with a desire to explore AI…
Ubuntu and Ubuntu Pro supports Microsoft’s Azure Cobalt 100 Virtual Machines (VMs), powered by their…
Welcome to the Ubuntu Weekly Newsletter, Issue 870 for the week of December 8 –…