SafetyCulture’s Development Environment using Kubernetes

Robert Cen
5 min readbeginner
--
View Original

Overview

SafetyCulture's article discusses the evolution of their development environment using Kubernetes to provide scalable and reliable environments for engineers. It highlights the transition from shared environments to a more efficient system utilizing namespaces within a Kubernetes cluster, significantly improving productivity and onboarding processes.

What You'll Learn

1

How to create multiple development environments using Kubernetes namespaces

2

Why using Terraform and Helm can streamline Kubernetes management

3

How to improve onboarding processes for new engineers with automated setups

Prerequisites & Requirements

  • Basic understanding of Kubernetes and container orchestration concepts
  • Familiarity with Terraform and Helm for managing Kubernetes resources(optional)

Key Questions Answered

What challenges did SafetyCulture face with their previous development environments?
SafetyCulture faced several challenges, including outdated environments, long onboarding times for new engineers, resource constraints preventing full stack local runs, and conflicts in a shared environment. These issues hindered the efficiency and effectiveness of their development processes.
How does SafetyCulture's new Kubernetes setup improve development efficiency?
The new setup allows for multiple environments within a single Kubernetes cluster using namespaces, enabling teams to deploy and test independently. This reduces onboarding time, ensures environments reflect production, and allows for rapid experimentation, significantly enhancing overall productivity.
What tools does SafetyCulture use to manage their Kubernetes environments?
SafetyCulture utilizes Terraform for managing the Kubernetes cluster and cloud resources, along with Helm and Helmsman for deploying services using internal helm charts. This combination facilitates efficient environment creation and management.
What are the benefits of using namespaces in Kubernetes for development?
Using namespaces allows teams to have isolated environments that replicate production, enabling confident testing without impacting others. This setup supports rapid changes and reduces conflicts, thereby improving collaboration among engineers.

Key Statistics & Figures

Active environments
30
Currently, SafetyCulture has approximately 30 active environments running in a single Kubernetes cluster.
Pods running daily
5000
The setup supports over 5000 pods running daily, showcasing the scale and efficiency of their Kubernetes infrastructure.

Technologies & Tools

Some links below are affiliate links. We may earn a commission if you make a purchase.

Key Actionable Insights

1
Implement a namespace-based environment strategy in Kubernetes to enhance team autonomy.
This approach allows each team to manage their own environment without interference, which is crucial for maintaining productivity and reducing conflicts during development.
2
Utilize automation tools like Terraform and Helm to streamline environment setup and management.
Automating these processes can significantly reduce the time required for new engineers to get started, leading to faster onboarding and more efficient workflows.
3
Regularly update development environments to reflect production changes automatically.
This ensures that all engineers are working with the most current version of services, reducing discrepancies and potential integration issues.

Common Pitfalls

1
Failing to keep development environments updated with production changes can lead to discrepancies.
This often happens when teams do not automate the update process, resulting in engineers testing against outdated versions and potentially introducing bugs in production.
2
Not providing adequate training on new tools and environments can slow down adoption.
If engineers are not familiar with the tools like Terraform and Helm, they may struggle to utilize the environments effectively, leading to frustration and reduced productivity.

Related Concepts

Container Orchestration With Kubernetes
Infrastructure As Code With Terraform
Package Management With Helm