This talk will cover how to structure your GitOps repository for Kubernetes at scale. We'll discuss the challenges of managing complex environments with multiple clusters and how to keep your configurations DRY (Don't Repeat Yourself). We'll also dive into using FluxCD and Kustomize to automate deployments and manage configurations effectively
CD in kubernetes using helm and ksonnet. Stas KolenkinDataArt
油
This document discusses various tools for deploying applications to Kubernetes, including Helm, Ksonnet, Draft, Gitkube, Metaparticle, Skaffold, KSync, and Telepresence. It provides an overview of each tool, including their motivations, workflows, and how they compare to each other. Many of the tools aim to simplify deployments by automating builds, pushes to registries, and deployments to clusters. Ksonnet stands out as a tool that uses Jsonnet to define reusable application components and deploy them across multiple environments and clusters.
GDG Cloud Southlake #8 Steve Cravens: Infrastructure as-Code (IaC) in 2022: ...James Anderson
油
Infrastructure as Code (IaC) is a concept that has been around for a while now and much research has been done to not only prove out the value but also how to enhance IaC implementations. We have a full guest list including Steve Cravens, who can speak to the school of hard knocks of why IaC is important. Stenio Ferreira, who prior to Google worked at Hashicorp and has vast experience on how to successfully implement IaC with Terraform. Lastly, Josh Addington, who is an Sr. Solutions Engineer at Hashicorp and will be speaking to the Day 2 operations as well as other offerings that can enhance IaC implementations.
Here is the high level overview:
IaC overview
Terraform Tactical
IaC day 2 and Governance
Kubernetes is an open-source system for automating deployment, scaling, and management of containerized applications. It groups related containers into logical units called pods and manages the pods' lifecycles and services. Key Kubernetes objects include pods, deployments, services, and secrets. The declarative model defines the desired state and Kubernetes ensures the actual state matches it.
Introduction to containers, k8s, Microservices & Cloud NativeTerry Wang
油
際際滷s built to upskill and enable internal team and/or partners on foundational infra skills to work in a containerized world.
Topics covered
- Container / Containerization
- Docker
- k8s / container orchestration
- Microservices
- Service Mesh / Serverless
- Cloud Native (apps & infra)
- Relationship between Kubernetes and Runtime Fabric
Audiences: MuleSoft internal technical team, partners, Runtime Fabric users.
This document provides an overview of Kubernetes. It begins by introducing Kubernetes and its origins at Google. It then discusses key Kubernetes concepts like pods, deployments, services, ingress, namespaces, labels, and storage. It explains how Kubernetes provides automation of application deployment, scaling, and management using containers. It also discusses how Kubernetes helps enable continuous integration, continuous deployment, and digital transformation. The document concludes by mentioning the Kubernetes ecosystem and Cloud Native Computing Foundation.
What is the Difference Between Kubernetes and Docker?Ravendra Singh
油
Apps that operate in containers may be automatically scaled, deployed, and managed with the help of Kubernetes, an open-source cloud-native infrastructure solution that is available for free. While Kubernetes was first developed and maintained by Google, the Cloud Native Computing Foundation took over the development and management of the system.
Developer Experience Cloud Native - Become Efficient and Achieve ParityMichael Hofmann
油
Zu einer effizienten Cloud-Entwicklung geh旦rt nicht nur ein schnelles Deployment der Services in die Cloud. Auch ein reibungsloses Entwickeln und Debuggen der Services direkt in der Cloud steigert die Effizienz. Dar端ber hinaus sollte die Entwicklungsumgebung m旦glichst identisch mit der Produktionsumgebung sein. Diesen Umstand empfiehlt schon seit langem die 12-Factor-App-Auflistung in Punkt 10: "Dev/prod parity".
In dieser Session wird eine Auswahl an Open-Source-Tools vorgestellt, die einem Java-Entwickler bei der Erreichung folgender Ziele behilflich sind: schnelles und synchrones Deployment (Skaffold), Entwicklung und Debugging im Kubernetes Pod (OpenLiberty mit Ksync, Quarkus Live Coding), Erweiterung des Kubernetes Perimeter f端r eine lokale Entwicklung (telepresence oder Bridge to Kubernetes). Die einfache Handhabung dieser Tools verdeutlichen die zugeh旦rigen Demos in dieser Session.
Speakers: Vic Iglesias, Benjamin Good, Karl Isenberg
Venue: Google Cloud Next '19
Video: https://www.youtube.com/watch?v=rt287-94Pq4
Continuous Integration and Delivery allows companies to quickly iterate on and deploy their ideas to customers. In doing so, they should strive to have environments that closely match production. Using Kubernetes as the target platform across cloud providers and on-premises environments can help to mitigate some difficulties when ensuring environment parity but many other concerns can arise.
In this talk we will dive into the tools and methodologies available to ensure your code and deployment artifacts can smoothly transition among the various people, environments, and platforms that make up your CI/CD process.
Cloud Native Night, April 2018, Mainz: Workshop led by J旦rg Schad (@joerg_schad, Technical Community Lead / Developer at Mesosphere)
Join our Meetup: https://www.meetup.com/de-DE/Cloud-Native-Night/
PLEASE NOTE:
During this workshop, J旦rg showed many demos and the audience could participate on their laptops. Unfortunately, we can't provide these demos. Nevertheless, J旦rg's slides give a deep dive into the topic.
DETAILS ABOUT THE WORKSHOP:
Kubernetes has been one of the topics in 2017 and will probably remain so in 2018. In this hands-on technical workshop you will learn how best to deploy, operate and scale Kubernetes clusters from one to hundreds of nodes using DC/OS. You will learn how to integrate and run Kubernetes alongside traditional applications and fast data services of your choice (e.g. Apache Cassandra, Apache Kafka, Apache Spark, TensorFlow and more) on any infrastructure.
This workshop best suits operators focussed on keeping their apps and services up and running in production and developers focussed on quickly delivering internal and customer facing apps into production.
You will learn how to:
- Introduction to Kubernetes and DC/OS (including the differences between both)
- Deploy Kubernetes on DC/OS in a secure, highly available, and fault-tolerant manner
- Solve operational challenges of running a large/multiple Kubernetes cluster
- One-click deploy big data stateful and stateless services alongside a Kubernetes cluster
The document discusses best practices for implementing DevSecOps for microservices architectures. It begins by defining microservices and explaining their advantages over monolithic architectures. It then covers challenges of microservices including communication between services, databases, testing, and deployment. The document recommends using a choreography pattern for asynchronous communication between loosely coupled services. It provides examples of event-driven architectures and deploying to Kubernetes. It also discusses technologies like Jenkins, Docker, Kubernetes, SonarQube, and Trivy that can help support continuous integration, deployment, and security in DevSecOps pipelines.
OpenNebula Conf 2014 | Cloud Automation for OpenNebula by Kishorekumar Neelam...NETWAYS
油
Kishore works with the engineering team in building the open source product with a future focussed cloud technical strategy for Megam Cloud Automation Platform http://gomegam.com. In his prior incarnation Kishore has worked as an Architect in complex system integration projects for Airport systems with high availability. Kishore has avid experience in architecting large scale build and packaging tools for mainframe platform integrated via thin clients and eclipse IDE.
This document discusses using Megam and Opennebula to deploy applications to cloud environments in a flexible and portable way. Megam allows deploying applications to any public or private cloud, provides automated scaling, and avoids vendor lock-in. The document outlines Megam's features like deployment recipes, monitoring, and integration with development tools. It also discusses Megam's support for Docker containers, including a visual designer and "Cloud in a Box" for deploying private clouds.
Ultimate Guide to Microservice Architecture on Kuberneteskloia
油
This document provides an overview of microservice architecture on Kubernetes. It discusses:
1. Benefits of microservice architecture like independent deployability and scalability compared to monolithic applications.
2. Best practices for microservices including RESTful design, distributed configuration, client code generation, and API gateways.
3. Tools for microservices on Kubernetes including Prometheus for monitoring, Elasticsearch (ELK) stack for logging, service meshes, and event sourcing with CQRS.
Making Service Deployments to AWS a breeze with NovaGregor Heine
油
As we rolled out our micro-service architecture at Gilt, we made an explicit decision to leverage phased rollouts with dark canary, canary and auto-scaled clusters. We chose to use the fundamental building blocks of AWS - ELBs, Auto Scaling Groups, tiny EC2 instances, CloudWatch, CodeDeploy and CloudFormation. However, we found that managing and configuring many of these moving parts via Cloudformation templates to be a repetitive and error prone task.
Introducing Nova, a tool that leverages the powers of Docker, and the AWS toolchain to deploy microservices, while reducing the underlying complexities and and breaking them into reusable components. We'll look at how Nova helps to set up and configure different service stacks and their resources, manage phased deployments into these stacks, collect service logs via cloudwatch and securely store application secrets using KMS.
Wouldn't it be great for a new developer on your team to have their dev environment totally set up on their first day? What about having your CI tests running in the background while you work on new features? What about having the confidence that your dev environment mirrors testing and prod? Containers enable this to become reality, along with other great benefits like keeping dependencies nice and tidy and making packaged code easier to share. Come learn about the ways containers can help you build and ship software easily.
DevOpsDays Tel Aviv DEC 2022 | Building A Cloud-Native Platform Brick by Bric...Haggai Philip Zagury
油
The overwhelming growth of technologies in the Cloud Native foundation overtook our toolbox and completely changed (well, really enhanced) the Developer Experience.
In this talk, I will try to provide my personal journey from the "Operator to Developer's chair" and the practices which helped me along my journey as a Cloud-Native Dev ;)
Mete Atamel "Resilient microservices with kubernetes"IT Event
油
Talk description: Creating a single microservice is a well understood problem. Creating a cluster of load-balanced microservices that are resilient and self-healing is not so easy. Managing that cluster with rollouts and rollbacks, scaling individual services on demand, securely sharing secrets and configuration among services is even harder.
Docker allows creating isolated environments called containers from images. Containers provide a standard way to develop, ship, and run applications. The document discusses how Docker can be used for scientific computing including running different versions of software, automating computations, sharing research environments and results, and providing isolated development environments for users through Docker IaaS tools. K-scope is a code analysis tool that previously required complex installation of its Omni XMP dependency, but could now be run as a containerized application to simplify deployment.
GCP Meetup #3 - Approaches to Cloud Native Architecturesnine
油
Talk by Daniel Leahy and Nic Gibson, given at the Google Cloud Meetup on March 3, 2020, hosted by Nine Internet Solutions AG - Your Swiss Managed Cloud Service Provider.
Do any VM's contain a particular indicator of compromise? E.g. Run a YARA signature over all executables on my virtual machines and tell me which ones match.
Kubernetes Application Deployment with Helm - A beginner Guide!Krishna-Kumar
油
Google DevFest2019 Presentation at Infosys Campus Bangalore. Application deployment in Kubernetes with Helm is demo'ed in Google Kubernetes Engine (GKE). This is an introductory session on Helm. Several references are given in it to further explore helm3 as it is in Beta state now.
Configuration Management and Transforming Legacy Applications in the Enterpri...Docker, Inc.
油
Share the continuity of Soci辿t辿 G辿n辿rale's journey with Docker Enterprise from different points of view, from executives to devops, with CD platform as an enabler. Creating a Dockerfile that runs a container on a developer's laptop is pretty straightforward. But extending that to stacks of containers running on a dozen environments (development, integration, testing, staging, production, etc.) with different configuration and topologies can be a challenge. This talk will cover aspects of our journey to Docker Enterprise:
What configuration should go in an image?
Where to put different types of configuration? Images, environment variables, entrypoint, ...?
How to store assets for building images and configuration for deployment in version control.
We will discuss how Soci辿t辿 G辿n辿rale has implemented these, and what we plan next for Docker Enterprise deployment.
The Cloud Deployment Toolkit (CDTK) project is a proposed open source project under the Eclipse Technology Project.
This proposal is in the Project Proposal Phase (as defined in the Eclipse Development Process) and is written to declare its intent and scope.
We solicit additional participation and input from the Eclipse community. Please send all feedback to the CDTK forum.
Cloudfoundry is an open source Platform as a Service (PaaS) that provides a variety of services for developing, deploying, and scaling applications. It uses a microservices architecture and containers to deploy applications. Developers can push applications to Cloudfoundry which will then store the application bits, track metadata, and direct a Droplet Execution Agent node to stage and run the application. Cloudfoundry also provides a marketplace of services that applications can use like databases through service instances. It implements role-based access control with organizations, spaces, and roles to control access and permissions.
Helm is a package manager for Kubernetes. It helps streamline installing and managing applications. This session covers prerequisites for Helm, which include a basic understanding of containers and Kubernetes along with its architecture. It also covers the limitations that come with running deployments using the kubectl binary, Helm's architecture, templating with it and finally ends on a note highlighting the difference between versions 2 and 3.
Unlocking Engineering Excellence_ A Back-to-Basics Approach.pdfdevopsbcnmeetup
油
We're all in this together. This talk is for engineers, by an engineer.
I'm not a manager, but I believe that building a great engineering culture is a shared responsibility. I'll share my thoughts and practical strategies for fostering technical excellence, collaboration, and continuous improvement so we can all contribute to a more fulfilling and impactful work environment.
Governing cloud environments always seem easy on paper. However, it early becomes challenging when you work in a highly
agile and dynamic environment. Adding multiple cloud providers and a significant scale can become a nightmare. In this talk,
we explain our challenges at Adevinta and how we are sorting them
More Related Content
Similar to How to Structure Your K8s GitOps Repository at Scale by Erik Berdonces - DevOpsBCN - October 2024 (20)
Cloud Native Night, April 2018, Mainz: Workshop led by J旦rg Schad (@joerg_schad, Technical Community Lead / Developer at Mesosphere)
Join our Meetup: https://www.meetup.com/de-DE/Cloud-Native-Night/
PLEASE NOTE:
During this workshop, J旦rg showed many demos and the audience could participate on their laptops. Unfortunately, we can't provide these demos. Nevertheless, J旦rg's slides give a deep dive into the topic.
DETAILS ABOUT THE WORKSHOP:
Kubernetes has been one of the topics in 2017 and will probably remain so in 2018. In this hands-on technical workshop you will learn how best to deploy, operate and scale Kubernetes clusters from one to hundreds of nodes using DC/OS. You will learn how to integrate and run Kubernetes alongside traditional applications and fast data services of your choice (e.g. Apache Cassandra, Apache Kafka, Apache Spark, TensorFlow and more) on any infrastructure.
This workshop best suits operators focussed on keeping their apps and services up and running in production and developers focussed on quickly delivering internal and customer facing apps into production.
You will learn how to:
- Introduction to Kubernetes and DC/OS (including the differences between both)
- Deploy Kubernetes on DC/OS in a secure, highly available, and fault-tolerant manner
- Solve operational challenges of running a large/multiple Kubernetes cluster
- One-click deploy big data stateful and stateless services alongside a Kubernetes cluster
The document discusses best practices for implementing DevSecOps for microservices architectures. It begins by defining microservices and explaining their advantages over monolithic architectures. It then covers challenges of microservices including communication between services, databases, testing, and deployment. The document recommends using a choreography pattern for asynchronous communication between loosely coupled services. It provides examples of event-driven architectures and deploying to Kubernetes. It also discusses technologies like Jenkins, Docker, Kubernetes, SonarQube, and Trivy that can help support continuous integration, deployment, and security in DevSecOps pipelines.
OpenNebula Conf 2014 | Cloud Automation for OpenNebula by Kishorekumar Neelam...NETWAYS
油
Kishore works with the engineering team in building the open source product with a future focussed cloud technical strategy for Megam Cloud Automation Platform http://gomegam.com. In his prior incarnation Kishore has worked as an Architect in complex system integration projects for Airport systems with high availability. Kishore has avid experience in architecting large scale build and packaging tools for mainframe platform integrated via thin clients and eclipse IDE.
This document discusses using Megam and Opennebula to deploy applications to cloud environments in a flexible and portable way. Megam allows deploying applications to any public or private cloud, provides automated scaling, and avoids vendor lock-in. The document outlines Megam's features like deployment recipes, monitoring, and integration with development tools. It also discusses Megam's support for Docker containers, including a visual designer and "Cloud in a Box" for deploying private clouds.
Ultimate Guide to Microservice Architecture on Kuberneteskloia
油
This document provides an overview of microservice architecture on Kubernetes. It discusses:
1. Benefits of microservice architecture like independent deployability and scalability compared to monolithic applications.
2. Best practices for microservices including RESTful design, distributed configuration, client code generation, and API gateways.
3. Tools for microservices on Kubernetes including Prometheus for monitoring, Elasticsearch (ELK) stack for logging, service meshes, and event sourcing with CQRS.
Making Service Deployments to AWS a breeze with NovaGregor Heine
油
As we rolled out our micro-service architecture at Gilt, we made an explicit decision to leverage phased rollouts with dark canary, canary and auto-scaled clusters. We chose to use the fundamental building blocks of AWS - ELBs, Auto Scaling Groups, tiny EC2 instances, CloudWatch, CodeDeploy and CloudFormation. However, we found that managing and configuring many of these moving parts via Cloudformation templates to be a repetitive and error prone task.
Introducing Nova, a tool that leverages the powers of Docker, and the AWS toolchain to deploy microservices, while reducing the underlying complexities and and breaking them into reusable components. We'll look at how Nova helps to set up and configure different service stacks and their resources, manage phased deployments into these stacks, collect service logs via cloudwatch and securely store application secrets using KMS.
Wouldn't it be great for a new developer on your team to have their dev environment totally set up on their first day? What about having your CI tests running in the background while you work on new features? What about having the confidence that your dev environment mirrors testing and prod? Containers enable this to become reality, along with other great benefits like keeping dependencies nice and tidy and making packaged code easier to share. Come learn about the ways containers can help you build and ship software easily.
DevOpsDays Tel Aviv DEC 2022 | Building A Cloud-Native Platform Brick by Bric...Haggai Philip Zagury
油
The overwhelming growth of technologies in the Cloud Native foundation overtook our toolbox and completely changed (well, really enhanced) the Developer Experience.
In this talk, I will try to provide my personal journey from the "Operator to Developer's chair" and the practices which helped me along my journey as a Cloud-Native Dev ;)
Mete Atamel "Resilient microservices with kubernetes"IT Event
油
Talk description: Creating a single microservice is a well understood problem. Creating a cluster of load-balanced microservices that are resilient and self-healing is not so easy. Managing that cluster with rollouts and rollbacks, scaling individual services on demand, securely sharing secrets and configuration among services is even harder.
Docker allows creating isolated environments called containers from images. Containers provide a standard way to develop, ship, and run applications. The document discusses how Docker can be used for scientific computing including running different versions of software, automating computations, sharing research environments and results, and providing isolated development environments for users through Docker IaaS tools. K-scope is a code analysis tool that previously required complex installation of its Omni XMP dependency, but could now be run as a containerized application to simplify deployment.
GCP Meetup #3 - Approaches to Cloud Native Architecturesnine
油
Talk by Daniel Leahy and Nic Gibson, given at the Google Cloud Meetup on March 3, 2020, hosted by Nine Internet Solutions AG - Your Swiss Managed Cloud Service Provider.
Do any VM's contain a particular indicator of compromise? E.g. Run a YARA signature over all executables on my virtual machines and tell me which ones match.
Kubernetes Application Deployment with Helm - A beginner Guide!Krishna-Kumar
油
Google DevFest2019 Presentation at Infosys Campus Bangalore. Application deployment in Kubernetes with Helm is demo'ed in Google Kubernetes Engine (GKE). This is an introductory session on Helm. Several references are given in it to further explore helm3 as it is in Beta state now.
Configuration Management and Transforming Legacy Applications in the Enterpri...Docker, Inc.
油
Share the continuity of Soci辿t辿 G辿n辿rale's journey with Docker Enterprise from different points of view, from executives to devops, with CD platform as an enabler. Creating a Dockerfile that runs a container on a developer's laptop is pretty straightforward. But extending that to stacks of containers running on a dozen environments (development, integration, testing, staging, production, etc.) with different configuration and topologies can be a challenge. This talk will cover aspects of our journey to Docker Enterprise:
What configuration should go in an image?
Where to put different types of configuration? Images, environment variables, entrypoint, ...?
How to store assets for building images and configuration for deployment in version control.
We will discuss how Soci辿t辿 G辿n辿rale has implemented these, and what we plan next for Docker Enterprise deployment.
The Cloud Deployment Toolkit (CDTK) project is a proposed open source project under the Eclipse Technology Project.
This proposal is in the Project Proposal Phase (as defined in the Eclipse Development Process) and is written to declare its intent and scope.
We solicit additional participation and input from the Eclipse community. Please send all feedback to the CDTK forum.
Cloudfoundry is an open source Platform as a Service (PaaS) that provides a variety of services for developing, deploying, and scaling applications. It uses a microservices architecture and containers to deploy applications. Developers can push applications to Cloudfoundry which will then store the application bits, track metadata, and direct a Droplet Execution Agent node to stage and run the application. Cloudfoundry also provides a marketplace of services that applications can use like databases through service instances. It implements role-based access control with organizations, spaces, and roles to control access and permissions.
Helm is a package manager for Kubernetes. It helps streamline installing and managing applications. This session covers prerequisites for Helm, which include a basic understanding of containers and Kubernetes along with its architecture. It also covers the limitations that come with running deployments using the kubectl binary, Helm's architecture, templating with it and finally ends on a note highlighting the difference between versions 2 and 3.
Unlocking Engineering Excellence_ A Back-to-Basics Approach.pdfdevopsbcnmeetup
油
We're all in this together. This talk is for engineers, by an engineer.
I'm not a manager, but I believe that building a great engineering culture is a shared responsibility. I'll share my thoughts and practical strategies for fostering technical excellence, collaboration, and continuous improvement so we can all contribute to a more fulfilling and impactful work environment.
Governing cloud environments always seem easy on paper. However, it early becomes challenging when you work in a highly
agile and dynamic environment. Adding multiple cloud providers and a significant scale can become a nightmare. In this talk,
we explain our challenges at Adevinta and how we are sorting them
Hiring from Both Sides of the Table by Fabio Scagliola - DevOpsBCN - October ...devopsbcnmeetup
油
I will explore the challenges of hiring software engineers from both perspectives, hiring manager and candidate, focusing on how candidates can tailor their r辿sum辿s and how hiring managers should approach screening. I will also share my thoughts on interviews, covering cultural and technical assessments, as well as my technology-agnostic approach. I will delve into common misconceptions about the hiring process and how to align expectations. And, last but not least, I will highlight the role of servant leadership in building effective teams and offer practical advice to both hiring managers and candidates to improve the hiring experience.
Infrastructure Prowing Pains by David Poblador i Garcia - DevOpsBCN - March 2024devopsbcnmeetup
油
Ever thought about taking your infrastructure or platform team from a cosy group to premier league status? Lets have a relaxed chat about making it big while staying on point. I dive into tales and tactics for beefing up your infrastructure from supporting fewer than 100 folks to powering a crowd of a thousand or more, all while keeping your tech solid and your team atmosphere upbeat. This session is perfect for leaders on the growth path and any tech pro involved in building or running infrastructure whos aiming higher. Expect a down-to-earth rundown of dos and donts plus a handful of oh no moments from my journey of upsizing infrastructure at Spotify and beyond
Policy as Code by David Acacio - DevOps BCN - October 2023devopsbcnmeetup
油
En esta charla explicaremos c坦mo usando pol鱈tica como c坦digo (policy-as-code) podemos dotar de la m叩xima agilidad y flexibilidad a nuestros equipos sin sacrificar la seguridad y control
Security requirements are often treated as generic lists of features, neglecting system-specific needs and the attacker's perspective. A systematic approach to security requirements engineering is crucial to avoid this problem.
Requirements engineering defects can cost 10 to 200 times more to correct once the system is operational. Software development takes place in a dynamic environment, causing requirements to constantly change.
Welcome to the April 2025 edition of WIPAC Monthly, the magazine brought to you by the LInkedIn Group Water Industry Process Automation & Control.
In this month's issue, along with all of the industries news we have a number of great articles for your edification
The first article is my annual piece looking behind the storm overflow numbers that are published each year to go into a bit more depth and look at what the numbers are actually saying.
The second article is a taster of what people will be seeing at the SWAN Annual Conference next month in Berlin and looks at the use of fibre-optic cable for leak detection and how its a technology we should be using more of
The third article, by Rob Stevens, looks at what the options are for the Continuous Water Quality Monitoring that the English Water Companies will be installing over the next year and the need to ensure that we install the right technology from the start.
Hope you enjoy the current edition,
Oliver
Call for Papers - 6th International Conference on Big Data and Machine Learni...IJDKP
油
6th International Conference on Big Data and Machine Learning (BDML 2025) will act as a major forum for the presentation of innovative ideas, approaches, developments, and research projects in the areas of Big Data and Machine Learning. It will also serve to facilitate the exchange of information between researchers and industry professionals to discuss the latest issues and advancement in the area of Big Data and Machine Learning.
How to Structure Your K8s GitOps Repository at Scale by Erik Berdonces - DevOpsBCN - October 2024
1. How to Structure Your K8s
GitOps Repository at Scale
Taming the GitOps complexity (when possible)
2. A bit about me
Erik Berdonces Bonelo
TechLead and Senior DevOps Engineer @ Midokura
@sturgelose in all social networks
3. Glossary
Environment: A K8s cluster and all the cloud resources needed for the cluster and services running in
them. It must be reproducible and declared as IaC.
Pro鍖le: A set of Environments with the same aim and similar con鍖guration
IaC (Infrastructure as Code): ability to provision and support your computing infrastructure using code
instead of manual processes and settings.
Tenant: a user consuming the K8s platform to deploy an app
App: any service installed on top of Kubernetes. They can be either part of the Platform (to provide
runtime/services to other apps) or part of the Product (provide value to the 鍖nal user)
4. GitOps
GitOps is an operational framework that takes DevOps best practices used for
application development such as version control, collaboration, compliance, and
CI/CD, and applies them to infrastructure automation.
TLDR; Deploy infrastructure via IaC using CI/CD and PRs using Git as con鍖g
storage. Do not trust humans by doing changes manually and make
everything declarative.
5. Prod
Cluster
Staging
Cluster
Git is used as the source of con鍖guration for all ENVs
Staging
Cluster
Prod
Cluster
Chart v2
Values v2
Secrets v2
Terraform v2
Chart v1
Values v1
Secrets v1
Terraform v1
Git
Repository
Cloud Resources
Cloud Resources
/staging/app1
/production/app1
6. Staging
Cluster
Cloud Resources
Staging
Cluster
Chart v1
Values v1
Secrets v1
Terraform v1
Easy to:
Replicate
Rollback
Track changes (who and when)
See whats in the env without connecting to the
cluster or cloud.
Reconcile to a known state
just checking in a Git repository.
7. Which kinds of infra IaaC tooling do exist?
For Cloud infrastructure:
Terraform/TerraGrunt
Pulumi
Ansible
CloudFormation (AWS) / Azure ARM
For K8s resources:
YAML 鍖les
Kustomize
Helm
FluxCD/ArgoCD
Hybrid:
Crossplane
terraform-controller (FluxCD)
11. When we will use each?
Terraform To setup the K8s cluster and any Cloud resource
FluxCD + Helm + Kustomize To deploy resources inside a K8s Cluster
Why this choice?
For an environment to be reproducible, we need to declare the cluster itself as a code.
FluxCD and Helm require a k8s cluster to run, and to avoid this chicken-and-egg problem we need
Terraform.
Terraform
K8s and
Nodes
FluxCD App
12. Roles in our MultiTenant Environments
Platform Team
Sets up the K8s cluster
Administrates nodes and bindings between
cluster and Cloud
Provides shared dependencies to
developers
Developer Team(s)
Develops an app
Deploys an app version in a given Env with
some con鍖guration
May deploy Cloud resources to be
consumed by their app
14. Challenges
Secrets and Con鍖g differs between envs: we cant promote everything!
Handling Apps that are only deployed to certain Environments
Keeping my GitOps structure DRY
15. Challenge 1: How could I structure my Git Repo?
Lets start simple: how do I structure a simple App?
Chart
Config
(values.yaml)
Encrypted
Secrets
+ + SOPS (or similar
tools) can be used
to store encrypted
secrets in a Git
Repository
securely
Other K8s
resources
CRD
instances
16. Case: One Env, One App
app/
helm.yaml
con鍖g.yaml
secrets.yaml.encrypted
17. Challenge 2: Can I promote everything? No!
Secrets will differ between environments
Will you use the same secrets in staging and prod? No!
Solution: get rid of secrets with Workload Identity for Azure, AWS, GCloud, using roles instead of secrets.
Con鍖guration might change values between environments
Resource allocations, annotations and optimizations will differ between Staging and Production environments.
New con鍖g can be tied to speci鍖c versions of a chart, which makes it more challenging.
18. Promoting is more complex
Staging
Cluster
Prod
Cluster
Chart v2
Values v2
Chart v1
Values v1
Staging
Values
Secrets
Prod
Values
Secrets
Chart v2
Values v2
This requires identifying and
managing in different ways
con鍖guration that can be
promoted vs the one that cant
be promoted!
19. Case: Multiple distinct envs, One App
envs/
prod/
env-con鍖g.yaml
helm.yaml
app-con鍖g.yaml
secrets.yaml.encrypted
staging/
env-con鍖g.yaml
helm.yaml
app-con鍖g.yaml
secrets.yaml.encrypted
Copy the files to
promote
This is more complex than before:
Some 鍖les are duplicated (not DRY)
Promoting means moving 鍖les between folders
Envs can drift away easily
Developers need to classify in which con鍖g 鍖le sort
changes
but still somehow manageable
Using different branches for different envs doesnt provide
value as we cant merge a branch to another without
overriding env-con鍖g or secrets.
20. Challenge 3: Even more Environments
Staging
Cluster
Prod EU
Cluster
Chart v2
Values v2
Chart v1
Values v1
Staging
Values
Secrets
Prod EU
Values
Secrets
Prod US
Cluster
Prod US
Values
Secrets
Similar
Chart v2
Values v2
21. Case: Multiple similar envs, One App
envs/
prod-eu/
env-con鍖g.yaml
helm.yaml
app-con鍖g.yaml
secrets.yaml.encrypted
prod-us/
env-con鍖g.yaml
helm.yaml
app-con鍖g.yaml
secrets.yaml.encrypted
staging/
env-con鍖g.yaml
helm.yaml
app-con鍖g.yaml
secrets.yaml.encrypted
A change to all prod envs requires multiple changes
Automating this gets more complex (how to track
which env is in which stage?)
Less DRY
but still somehow manageable
22. Case: Multiple similar envs, One App
stages/
prod/
helm.yaml
app-con鍖g.yaml
staging/
helm.yaml
app-con鍖g.yaml
envs/
prod-eu/
env-con鍖g.yaml
secrets.yaml.encrypted
(extends ../../stages/prod)
prod-us/
env-con鍖g.yaml
secrets.yaml.encrypted
(extends ../../stages/prod)
staging/
env-con鍖g.yaml
secrets.yaml.encrypted
(extends ../../stages/staging)
Alternatively we can use Kustomization to make it DRYer:
prod-eu and prod-us envs inherit from prod stage
staging env inherts from staging stage
Pros
All envs of a stage are forced to be similar
Promotions look much easier
Creating a new ENV could be automatized
Cons
Promotions are more dangerous: one change in the
stage affects all clusters
env-con鍖g and app-con鍖g live in different folders,
making it complex for developers to map them.
24. Types of app relationships
Bounded apps
Apps are deployed together and as they depend to
each other in some con鍖guration.
envs/
prod/
app1-env-con鍖g.yaml
app1-helm.yaml
app1-app-con鍖g.yaml
app1-secrets.yaml.encrypted
app2-env-con鍖g.yaml
app2-helm.yaml
app2-app-con鍖g.yaml
app2-secrets.yaml.encrypted
staging/
app1-env-con鍖g.yaml
app1-helm.yaml
app1-app-con鍖g.yaml
app1-secrets.yaml.encrypted
app2-env-con鍖g.yaml
app2-helm.yaml
app2-app-con鍖g.yaml
app2-secrets.yaml.encrypted
envs/
app1/
prod/
env-con鍖g.yaml
helm.yaml
app-con鍖g.yaml
secrets.yaml.encrypted
staging/
env-con鍖g.yaml
helm.yaml
app-con鍖g.yaml
secrets.yaml.encrypted
app2/
prod/
env-con鍖g.yaml
helm.yaml
app-con鍖g.yaml
secrets.yaml.encrypted
staging/
env-con鍖g.yaml
helm.yaml
app-con鍖g.yaml
secrets.yaml.encrypted
Apps have distinct lifecycle (independent)
25. To aggregate multiple apps
We can use a Kustomization 鍖le to aggregate the different
sources for this env
26. Challenge 5: Declaring Cloud resources
Solution 1: Create a Terraform state, independent from 鍖ux
and copy its con鍖guration to a new state when promoting.
Pro: All terraform lives in one repo and has a single
work鍖ow
Con: Need to deploy two pieces, one for 鍖ux and one for
terraform
Solution 2: Use CrossPlane, TerraformController and similars
to declare resources with YAML and inside the HelmChart or
Flux.
Pro: All service contained in K8s resources
Con: Creates a different Terraform work鍖ow
Cloud
Database
Staging
Cluster
TF
Controller
Terraform
Repository
Cloud
Database
Staging
Cluster
Secret
27. Challenge 6: di鍖erences between apps and runtime
Apps
Managed by Developer teams
Scoped to a namespace
Depend on Runtime
Runtime Services
Managed by Operations/Platform team
Impact at cluster level
May install CRDs
Usually base dependencies of Apps
We could say:
The cluster is part of the Runtime where the apps run in.
And the apps must be able to choose how the Runtime is con鍖gured.
28. The runtime paradox
If we allow any app to con鍖gure the runtime
however they need:
every environment will be distinct
(high complexity to administrate)
App developers will be happy
(they are given what they request)
But, if we limit runtimes to speci鍖c con鍖gurations:
Environments will be similar
(low complexity to administrate)
App developers will be unhappy as we
cannot cover their needs
29. Meet me half way
Closed menu Home-Made
A menu with
extras to choose
from
30. Introducing, Kustomize Components
Kustomize seems to struggle with applications
that mix multiple, optional features on demand,
affecting different aspects of a base con鍖guration.
Components can be included from higher-level
overlays to create variants of an application, with a
subset of its features enabled.
Find a full explanation here:
https://github.com/kubernetes-sigs/kustomize/blob/master/examples/components.md
Why Components and not Kustomize resources?
Because Kustomize overlays do not support
composition. Components solve this problem and
allow reusing code in different stages
32. Using components with runtime apps
_base is the default main dish that is provided to everyone. Every
runtime app requires having one.
nodeport is an optional addon to add to the ingress-nginx
runtime app.
A pro鍖le then just becomes a combination of runtime apps and
addons, tied for a speci鍖c usage: prod, QA, staging, etc.
33. So, how can we mix all this?
Our aim is:
1. Automate creating an ENV as much as possible (no human interaction)
2. Give developers as much freedom as possible
3. Setup everything to make it as easy to promote as possible
34. Terraform
Repository
Creates
vNet + K8s Cluster
Flux
CD
Installs
and sets
a stage
Git
Repository
Fetches
env
con鍖g
Sets
Cluster
secrets
and
con鍖g
Ingress Nginx
CertManager
ExternalDNS
App1
AWS S3
Bucket
35. Now, do we need all this? Maybe not!
Adding all this automation also adds complexity.
It is not necessary to use all these tricks, and they
should only be used when complexity becomes too
hard to manage.
Always aim to keep it as simple as possible for
developers.
36. Where can I see this in action?
https://github.com/Sturgelose/flux-structure-example
37. Ideas for Future Iterations
Use CrossPlane or TerraformController to deploy cloud App Dependencies
How to setup the CI to automatically promote everything? AIM: reduce human interaction to the
minimum.