Startups

5 tips for dealing with Day 2 Kubernetes operational challenges

Comment

Crane lifting up container in yard
Image Credits: Sasin Tipchai (opens in a new window) / Getty Images

Lukas Gentele

Contributor

Lukas Gentele is the CEO of Loft Labs, which builds open source developer tooling for Kubernetes.

Kubernetes is a wonderful but complex software that can present significant “Day Two” challenges when put into production.

Developers who are new to Kubernetes — and most are — face a large knowledge gap when they look to sustain and optimize Kubernetes clusters.

In this piece, I will share several ways to address problems as they arise.

Optimize your Kubernetes cluster for cost

As adoption of Kubernetes rises, the need for applications and engineers to access clusters is also growing. However, it is neither feasible nor cost-efficient to always use entire physical clusters to achieve this goal.

Virtual clusters are a great way to reduce costs. In a scenario of 100 developers, we calculated up to 78% savings by using open source virtual clusters.

Leveraging virtual clusters with open source software such as VirtualCluster or vcluster lets Kubernetes operators can run multiple virtual clusters within a single physical cluster, thereby increasing the tenancy of each. By utilizing computing resources via this more communal method, organizations can save on computing costs as opposed to operating entirely separate Kubernetes clusters.

Increase tenant isolation

Another great benefit of virtual clusters is that they are isolated from other users on the cluster. This gives each user their own workspace that looks and feels exactly like a physical Kubernetes cluster.

In addition, virtual clusters enable a stricter form of multitenancy compared to namespace-based multitenancy. One of the main concerns with namespace-based multitenancy is that it cannot contain cluster-scoped resources. Many applications must create, or at least access, cluster-scoped resources like nodes, cluster roles, persistent volumes and storage classes.

Virtual clusters also provide security benefits by increasing the isolation in multitenancy clusters via:

  • Full control-plane isolation.
  • Domain Name System (DNS) isolation.
  • Resources created on a single namespace.

Organizations seeking a solution for multitenant applications that provide greater isolation for resources shared among their clusters should consider virtual clusters as an option. On top of saving costs and being simpler to deploy, they are also easier to manage than physical clusters.

Provide integrated development environments

When developing applications on Kubernetes, developers have to manually build and deploy applications via tools such as Docker Compose. This gives rise to productivity lag and hampers the overall experience that new developers face when getting started with Kubernetes.

One option to address this challenge is to leverage integrated development environments such as DevSpace, Skaffold or Tilt. With integrated development environments, engineers can use features such as:

  • Hot reload running containers without rebuilding images or restarting them.
  • Instant updates to the production environment.
  • Easy to use dashboards in the browser.

These tools allow teams to define their development workflows as code, which allows for transparency, aids in troubleshooting problems and can help speed up developer onboarding. Development environments should be disposable and easy to reproduce, not handcrafted artistry.

Implement software security guardrails

According to the 2022 State of Cloud Security report, a major limiting factor with moving to the cloud is inefficient processes. Too often, cloud engineers are tasked with dealing with the fallout of hastily planned security processes. Misconfiguration incidents result in security issues that often require significant work from both security and operations teams. No wonder cybersecurity firm Cyble found over 900,000 Kubernetes clusters exposed to the Internet.

By leveraging policy engines, it’s possible to implement software security guardrails on your cloud-native Kubernetes infrastructure so that these processes are not only codified in your pipeline but in your processes as well. Some popular policy engines, such as Open Policy Agent (OPA), jsPolicy and Kyverno can be used to enforce Kubernetes rules.

A key part of using these tools is admission control. Platform engineers and security teams can define policies and then either reject or modify workloads that don’t conform automatically. Common uses include blocking the creation of privileged pods, which are a huge security risk, and ensuring that pods contain labels.

Know what’s in your containers

There has been a lot of attention on software supply chain security since the SolarWinds compromise was revealed in 2020. Knowing what is actually running in your containers is critical and can be even more of a challenge with open source software, where scrutiny of community contributions can vary greatly. Understanding what’s in your dependencies can be difficult, and if your developers are building containers that other teams or customers consume, they’ll want to ensure that it’s clear who built the containers and what is in them.

In the past, many teams relied on security scanners like Trivy to detect Common Vulnerabilities and Exposures (CVEs) in their containers. Scanning is an essential practice, but it has limitations, a big one being different security scanning tools can give you very different results.

That’s why I recommend using Sigstore. It is an open source project that significantly reduces the effort needed to sign, verify and monitor what you build. Sigstore’s components include Cosign, an app for signing and verifying Open Container Initiative (OCI) images, and Rekor, a tamper-resistant transparency log that can be queried for information about images before you use them. Sigstore has become very popular in the open source world, and the Kubernetes project now uses Cosign to sign its artifacts.

Wolfi is another new tool that helps teams build software images. It’s a Linux “un-distro” (it doesn’t contain a Linux kernel) that is free and can be used to build minimal containers with footprints much smaller than typical Docker images. In addition, Wolfi can generate Software Bills of Materials (SBOMs) for your builds, so users have clear knowledge of what is inside them.

Whether your developers are consuming open source dependencies or building artifacts used by your customers, these tools can help prevent security incidents that can sidetrack teams from working on new features for your products.

The future of Kubernetes operations

The best practices outlined here are a good start to resolving Day Two challenges. Kubernetes operations still have a long way to go before turnkey implementations can be enabled. As the ecosystem evolves, we will see more projects begin to establish new methods of deploying Kubernetes clusters more efficiently and adopt best practices.

We will see more implementations that give rise to a seamless developer experience and enable developers to do what they do best — create valuable products. The result will be accelerated adoption of Kubernetes and a richer cloud-native ecosystem.

More TechCrunch

Google has joined investors backing Namma Yatri, an open-source ride-sharing app in India that is eroding market share from Uber and Ola with its no-commission model. Namma Yatri, whose parent…

Google backs Indian open-source Uber rival

These messaging features, announced at WWDC 2024, will have a significant impact on how people communicate every day.

At last, Apple’s Messages app will support RCS and scheduling texts

iOS 18 will be available in the fall as a free software update.

Here are all the devices compatible with iOS 18

The tests indicate there are loopholes in TikTok’s ability to apply its parental controls and policies effectively in a situation where the teen user originally lied about their age, as…

TikTok glitch allows Shop to appear to users under 18, despite adults-only policy

Lhoopa has raised $80 million to address the lack of affordable housing in Southeast Asian markets, starting with the Philippines.

Lhoopa raises $80M to spur more affordable housing in the Philippines

Former President Donald Trump picked Ohio Senator J.D. Vance as his running mate on Monday, as he runs to reclaim the office he lost to President Joe Biden in 2020.…

Trump’s VP candidate JD Vance has long ties to Silicon Valley, and was a VC himself

Hello and welcome back to TechCrunch Space. Is it just me, or is the news cycle only accelerating this summer?!

TechCrunch Space: Space cowboys

Apple Intelligence features are not available in the developer beta, which is out now.

Without Apple Intelligence, iOS 18 beta feels like a TV show that’s waiting for the finale

Apple released the public betas for its next generation of software on the iPhone, Mac, iPad and Apple Watch on Monday. You can now test out iOS 18 and many…

Apple’s public betas for iOS 18 are here to test out

One major dissenter threatens to upend Fisker’s apparent best chance at offloading its unsold EVs, a deal that would keep the startup’s bankruptcy proceeding alive and pave the way for…

Fisker has one major objector to its Ocean SUV fire sale

Payments giant Stripe has delayed going public for so long that its major investor Sequoia Capital is getting creative to offer returns to its limited partners. The venture firm emailed…

Major Stripe investor Sequoia confirms $70B valuation, offers its investors a payday

Alphabet, Google’s parent company, is in advanced talks to acquire Wiz for $23 billion, a person close to the company told TechCrunch. The deal discussions were previously reported by The…

Google’s Kurian approached Wiz, $23B deal could take a week to land, source says

Name That Bird determines individual members of a species by identifying distinguishing characteristics that most humans would be hard-pressed to spot.

Bird Buddy’s new AI feature lets people name and identify individual birds

YouTube Music is introducing two new ways to boost song discovery on its platform. YouTube announced on Monday that it’s experimenting with an AI-generated conversational radio feature, and rolling out…

YouTube Music is testing an AI-generated radio feature and adding a song recognition tool

Tesla had internally planned to build the dedicated robotaxi and the $25,000 car, often referred to as the Model 2, on the same platform.

Elon Musk confirms Tesla ‘robotaxi’ event delayed due to design change

What this means for the space industry is that theory has become reality: The possibility of designing a habitation within a lunar tunnel is a reasonable proposition.

Moon cave! Discovery could redirect lunar colony and startup plays

Get ready for a prime week of savings at TechCrunch Disrupt 2024 with the launch of Disrupt Deal Days! From now to July 19 at 11:59 p.m. PT, we’re going…

Disrupt Deal Days are here: Prime savings for TechCrunch Disrupt 2024!

Deezer is the latest music streaming app to introduce an AI playlist feature. The company announced on Monday that a select number of paid users will be able to create…

Deezer chases Spotify and Amazon Music with its own AI playlist generator

Real-time payments are becoming commonplace for individuals and businesses, but not yet for cross-border transactions. That’s what Caliza is hoping to change, starting with Latin America. Founded in 2021 by…

Caliza lands $8.5 million to bring real-time money transfers to Latin America using USDC

Adaptive is a platform that provides tools designed to simplify payments and accounting for general construction contractors.

Adaptive builds automation tools to speed up construction payments

When VanMoof declared bankruptcy last year, it left around 5,000 customers who had preordered e-bikes in the lurch. Now VanMoof is up and running under new management, and the company’s…

How VanMoof’s new owners plan to win over its old customers

Mitti Labs aims to transform rice farming in India and other South Asian markets by reducing methane emissions by 50% and water consumption by 30%.

Mitti Labs aims to make rice farming less harmful to the climate, starting in India

This is a guide on how to check whether someone compromised your online accounts.

How to tell if your online accounts have been hacked

There is a general consensus today that generative AI is going to transform business in a profound way, and companies and individuals who don’t get on board will be quickly…

The AI financial results paradox

Google’s parent company Alphabet might be on the verge of making its biggest acquisition ever. The Wall Street Journal reports that Alphabet is in advanced talks to acquire Wiz for…

Google reportedly in talks to acquire cloud security company Wiz for $23B

Featured Article

Hank Green reckons with the power — and the powerlessness — of the creator

Hank Green has had a while to think about how social media has changed us. He started making YouTube videos in 2007 with his brother, novelist John Green, at a time when the first iPhone was in development, Myspace was still relevant and Instagram didn’t exist. Seventeen years later, posting…

Hank Green reckons with the power — and the powerlessness — of the creator

Here is a timeline of Synapse’s troubles and the ongoing impact it is having on banking consumers. 

Synapse’s collapse has frozen nearly $160M from fintech users — here’s how it happened

Featured Article

Helixx wants to bring fast-food economics and Netflix pricing to EVs

When Helixx co-founder and CEO Steve Pegg looks at Daisy — the startup’s 3D-printed prototype delivery van — he sees a second chance. And he’s pulling inspiration from McDonald’s to get there.  The prototype, which made its global debut this week at the Goodwood Festival of Speed, is an interesting proof…

Helixx wants to bring fast-food economics and Netflix pricing to EVs

Featured Article

India clings to cheap feature phones as brands struggle to tap new smartphone buyers

India is struggling to get new smartphone buyers, as millions of Indians don’t go for an upgrade and continue to be on feature phones.

India clings to cheap feature phones as brands struggle to tap new smartphone buyers

Roboticists at The Faboratory at Yale University have developed a way for soft robots to replicate some of the more unsettling things that animals and insects can accomplish — say,…

Meet the soft robots that can amputate limbs and fuse with other robots