#talks
Kubernetes has become a hot topic in the computing space. There's been lots of talk about spinning up clusters, developer tooling, and monitoring. Applications from large to small are now taking advantage of the ecosystem.
One thing that hasn't changed is how we deliver software to production. Development and operations teams hold their continuous delivery (CD) software close to their chest. It's hard to find good software, harder to get it dialed in for one project, and sometimes an epic effort to get it working across an organization.
With Kubernetes, a platform for platforms, you get all the raw building blocks for creating a delivery platform right out of the box. This talk will walk through the steps for designing a delivery system out of Kubernetes components. We'll start with extracting the problem, and move to identifying the components of the build system. Next, the audience members will be introduced to all the parts of this hypothetical delivery system, and they will leave the talk with ideas of how to employ the process in their organizations and opportunities for extension.
This talk is an introduction to building applications with Kubernetes instead of on Kubernetes. This content will serve as an introduction to Custom Resources, controllers, and RBAC. It will combine that base with a practical example of moving software to production in an automated fashion.
- We’ve come to grips with deploying objects to Kubernetes
- As we’ve become more comfortable, our deployments have become more complex.
- Unfortunately, in many cases, we’ve been building on top Kubernetes of Kubernetes instead of on Kubernetes
- Kubernetes is a platform for platforms
- Kubernetes API Machinery is robust.
- Custom Resource Definition
- Talk about declarative management
- Custom controller for a CRD
- Introduce Kubebuilder
- Show snippets of code for creating something simple in Kubebuilder
- How can we reimagine CD on Kubernetes instead of on top of Kubernetes?
- First, what's CD?
- Tools abstract away the important details, but CD is all about the pipeline
- A pipeline is triggered by some event. eg. a new image is available, someone on slack wanted, or maybe manually initiated
- The pipeline is a series of steps that are ran in order
- A step can potentially have multiple actions
- If a step fails, we need a way to alert the user
- Finally, when a pipeline is done, it needs to be able to show its status
- Kubernetes has all these capabilities built in
- Thinking about the pipeline
- Before, I introduced CRDs. We can describe a pipeline in a crd
- The pipeline is just another object to kubernetes. We can even use kubectl to manage it
- Having to create a new pipeline each time so we'll create an PipelineJob which refers to our pipeline
- Now once this is created, nothing will happen. This isn't surprising because with Kubernetes, you need a controller to watch resources and perform actions based on their life cycle
- We haven't fully thought through the problem yet. It wouldn't be trivial to create a workflow engine, so instead, we'll use Argo.
- Show quick argo demo
- I've skipped over an important detail. Our pipelines have steps.
- The pipelines have steps. What exactly is a step?
- Here's the neat part, they can be whatever you wish. A pipeline steps will be composed on containers.
- This idea isn't as crazy as it sounds. Even Google's container builder uses containers in its steps
- How would you go about putting this all together?
- Pipelines and PipelineJobs are Kubernetes resources, doesn't this put extra load on our Kubernetes cluster?
- Yes, it does. I'm still looking for the right math, but the KUbernetes documentation says we should should be able to handle thousands of objects.
- What happens when you outgrow this?
- Introduce api aggregation
- Now, I've showed you an example CD process.
- This was chosen because people understand CD at a high level.
- These techniques can employed in other ways as well.
- Seeing as Kubernetes is a platform for platforms, you can base your APIs on KUbernetes and let it do the heavy lifting for you.
- Suggest some other ideas
- You've painted this as a magical way forward, what are the caveats?
- I've only talked about single cluster. Some of these ideas won't scale to multiple clusters without some additional work
- What's next?
- We need to explore using Kubernetes as a platform instead of a simple deployment target
- Our tooling needs more people consuming and building