DevOps was an idea before its time.
It actually took a while for technology to catch up and fully implement the principles and vision of DevOps, but that is how innovation works.
A new set of tools in our tool boxes (though is now taking up more and more mindshare) is end-to-end automation, and Kubernetes helps you manage that. Kubernetes is an open source framework for "automating deployment, scaling, and management of containerized applications." Originally introduced by Google, Red Hat and others pushed it forward the last 3-4 years.
Siamak Sadeghianfar (@siamaks), a DevOps Evangelist at Red Hat, sees firsthand how people are implementing different DevOps principles and practices. At the 2017 All Day DevOps conference, he laid out 10 ways Kubernetes enables DevOps. We thought it was worth revisiting what he had to say as Kubernetes only becomes more prominent.
1. Deployment automation. You should automate every step of your delivery pipeline. Kubernetes automates deployment of containers. Each component becomes a container image.
2. Infrastructure as code. With Kubernetes your entire infrastructure is code. This means any part in your application (databases, ports, access controls, etc.) can be described in a way Kubernetes can use. For example, you store your infrastructure code in a version-control repository. Kubernetes takes the code, and based on instruction, deploys and maintains your infrastructure. This happens automatically and consistently.
3. Configuration as code. Kubernetes allows you to "configure as code". Traditionally, an admin had to run configuration scripts manually to make sure they get the right one. Kubernetes keeps the file in the source repo. This allows you to describe where the file needs to go in the container and how the application consumes it. Additionally, it can be version controlled.
4. Immutable infrastructure. Since the inception of servers there's been one problem: every time you put out a fire you change the state of the virtual machine. Eventually you don't know exactly what the server looks like and you can’t recreate it, even though you know it works. (These virtual machines are referred to as snowflakes.)
In Kubernetes, new containers are immutable; they are created when there is a problem with the original state. So, you can be confident that you know exactly how the new environment is configured.
5. On-demand infrastructure. Developers can create hybrid services and infrastructure on-demand from the self-service catalog. This gives control to developers to get the resources they need, yet allows operations to control the configuration of the services. Kubernetes follows open service and API standards so you can expose cloud services.
6. Environment consistency. Build once, and deploy into production-like environments everywhere. Kubernetes allows you to build a golden image and use the exact same image for every single place you deploy your container. This gives you a consistent, production-like environment so it is the exact same whether you are on your local Windows or Mac development machine, a test server, etc. This helps you "shift left" so that you can see issues when you are in development instead of in production.
7. Continuous Delivery pipeline. This is a series of automated steps to test code before it goes in production. Jez Humble says the role of Continuous Delivery is, "an automated process to prove to you a change is a bad change and it should not go into production." Continuous Integration (CI) means every change is tested. Continuous Delivery (CD) automates all the way to production.
How can you tell if you have fully implemented Continuous Delivery? Siamak says that the test is if someone walks in and says, can you go to production right now? Can you do it without breaking a sweat?
8. Zero downtime deployments. When you have several deployments a day, you can’t pull down production to deploy. You must have safe, rolling updates without disrupting the production traffic. Kubernetes helps with blue/green deployments so that you can set up a new environment and switch to the new one without downtime.
9. A/B testing. How can you evaluate proposed changes, such as changing copy or the color of buttons? A/B testing delivers different versions to different customers so you can get real-world test results. Kubernetes manages routing traffic to different versions. The same version with slight modifications are possible.
10. Cross-functional collaboration. This is shared access to environments with granular control. Kubernetes goes beyond the silos so everyone has the same set of environments, but you can grant access to different roles and allow different roles to do different things. For instance, developers may be able to push to production, while Infosec may have view access, and QA may have access to live containers, but not building or deploying. The entire team can access production, but operations is the only one who can make containers.
The growing popularity of Kubernetes is undeniable. Luckily, with these 10 capabilities Siamak has laid out a great path for us all to follow as they continue to not only make their way into the DevOps pipeline, but in many ways enable it.
You can listen to his whole talk, for free, below. You can also here more from Siamak on June 12 at the 2019 Nexus User Conference, where he'll be talking about Cloud-Native CI/CD with OpenShift and Tekton.