GitOps Days 2022 Recap: Intro to Kubernetes, GitOps, & Observability Tutorial
If you have missed last week’s GitOps Days 2022, you can now find a recap of our hands on workshop on the blog today. Seasoned Kubernetes and GitOps experts will lend you a hand in setting up K8s, a GitOps pipeline and observability for deployments.
GitOps Days 2022 - it’s a Wrap! Thank you!
Last week we hosted our fifth GitOps Days event! We’d like to extend huge thanks to our speakers - ranging from practitioners in various stages of their GitOps journeys to vendors, partners, and integrators - who gave informative talks over the two days. Thank you to everyone who watched live and chatted with us on slack to make it an interactive experience! Of course no GitOps Days event would be complete without slammin’ beats by our very own resident DJ and Community Manager, Daniel Holbach (dubbed “DJ Desired State” back at our first GitOps Days in May 2020) to keep things funky and fun. We hope you also found it to be informative, educational, and a celebration of how far GitOps has come as the natural evolution of Kubernetes!
The sessions are still available to watch on demand - sign up for access.
Hands-On Tutorial: Introduction to Kubernetes, GitOps, & Observability
Day 1 kicked off with a pre-show hands-on tutorial by Joaquin Rodriguez, Senior Software Engineer at Microsoft, and Tiffany Wang, Solutions Architect at Weaveworks. During this Intro to Kubernetes, GitOps, and Observability workshop you experience the benefits of Kubernetes that impact reliability, velocity, security and more. The workshop is browser based with a complimentary environment provided by Microsoft/GitHub Codespaces (which expires June 22 at 11:59pm PT) and covers kubectl, K9s, Metrics (Prometheus), Dashboards (Grafana), Logging (Fluent Bit), and GitOps (FluxCD).
If you missed the live session, no worries, you can still watch this hands-on tutorial here and try it out yourself (again keep in mind the complimentary environment expires June 22 at 11:59pm PT). Follow along with this GitHub Repo Readme, and the slides. First you need to register for the tutorial (see the readme and slides linked previously) with your GitHub username and join the kubernetes101 GitHub org.
Introduction to Kubernetes
In the Intro to Kubernetes portion of the talk, Tiffany gives you a high level view Kubernetes=, an overview of a Kubernetes cluster, Kuberentes resources (focusing mainly on the ones in this tutorial: Core API group objects like Namespaces, Deployments, Services, Secrets, CRUD operations) and how they all work together.
Kubernetes does a lot of heavy lifting when it comes to creating your resources and scheduling them. But there are a lot of resources to define and manage, and we need a way to reproduce and easily see what resources comprise your desired state and what has been deployed. GitOps solves this very neatly. - Tiffany Wang, Solutions Architect, Weaveworks
Intro to GitOps & Observability
Tiffany then dives into the Intro to GitOps portion of the talk with a review of the GitOps Principles (as defined by the OpenGitOps working group at opengitops.dev) and how GitOps is THE cloud native operating model to unify deployment, monitoring, and management. Tiffany describes an 'immutability firewall' between your Continuous Integration (CI), and Kubernetes GitOps, where CI is the traditional automated testing workflow that produces immutable artifacts, which are then to be used in Continuous Delivery (CD) via GitOps - effectively decoupling CI from CD.
This of course leads into the Intro to Flux – the GitOps tool used for the workshop – focusing mainly on the Kustomize Controller & the Source Controller, which are part of the GitOps Toolkit (the components that comprise the Flux runtime).
Observability is up next in order to have an easy understanding of what’s going on in the cluster. Monitoring & Observability go hand in hand where the latter is arguably the superset that allows you to inspect, observe, trace, and write custom queries to understand how your system is performing. Your monitoring setup (eg, metrics, alerts, and dashboards) needs to be actionable. During this workshop Prometheus is used for Metrics, Grafana is used for data visualization, and logging will be done with Fluent Bit.
Hands on Workshop
With these foundational aspects covered, Joaquin runs the workshop using GitHub Codespaces (which you can still try it out at home through June 22 at 11:59pm PT)! Follow the readme instructions at https://github.com/kubernetes101/gitopsdays. During the tutorial, Joaquin shows you how to deploy a custom application in codespaces using kubectl apply. Note that Codespaces is a web version of VSCode, and the workshop’s Codespace includes a k3d cluster set up with default tools. Also note there are port forwards already created in codespaces, which you can see in the VSCode ports tab. Tiffany then demonstrates the power of GitOps with Flux, and goes through flux bootstrap, and the files created in bootstrap/flux-system. She then instructs how to deploy the observability stack and sample application using GitOps, including drift detection and automatic recovery. She also showcases Flux CLI commands, including how to trigger reconciliations between regularly scheduled sync intervals, as well as create Flux resources to commit to Git. Joaquin closes out the tutorial by showing how to use k9s, run tests to simulate traffic, and observe the performance of the application.
Try it Out!
We encourage you to try out this tutorial for yourself while it’s still available (until June 22, 2022 at 11:59pm PT) and hope you find it to be a fun and educational hands-on experience! If you run into any errors or issues you can reach out via the #gitopsdays channel on our Slack (slack.weave.works).
If you’re reading this blog post after the Codespaces environment has expired, try Weave GitOps Core, it’s free and open source and it’s powered by Flux! Experience how easy it is to enable GitOps and run your apps in a cluster.
Here’s the video in its entirety if you’d like to watch the full tutorial from start to finish:
Next Steps
We’ll be publishing more blog posts along with videos from the event to our GitOps Days 2022 Playlist, so stay tuned for more as they become available. And don’t forget to subscribe to our YouTube channel
If you missed the live session, no worries, the sessions are still available to watch on demand
Watch Now