Introducing Fly Kubernetes

Update, March 2024: FKS does more stuff now, and you can read about it in Fly Kubernetes does more now We’ll own it: we’ve been snarky about Kubernetes. We are, at heart, old-school Unix nerds. We’re still scandalized by systemd. To make matters mor

Senyo Simpson
9 min readintermediate
--
View Original

Overview

Fly.io introduces Fly Kubernetes (FKS), a new implementation of Kubernetes that runs on its platform, allowing users to leverage Kubernetes tooling while benefiting from Fly.io's infrastructure. The article discusses the design philosophy behind FKS, its integration with Fly Machines API, and the advantages it offers over traditional Kubernetes deployments.

What You'll Learn

1

How to deploy Kubernetes applications on Fly.io using Fly Kubernetes

2

Why Fly Kubernetes is a simpler alternative to traditional Kubernetes setups

3

When to use Fly Machines API for scheduling workloads

Prerequisites & Requirements

  • Familiarity with Kubernetes concepts and architecture
  • Basic understanding of using command-line interfaces (CLI)(optional)

Key Questions Answered

What is Fly Kubernetes and how does it work?
Fly Kubernetes (FKS) is an implementation of Kubernetes that operates on Fly.io's infrastructure. It combines K3s and Virtual Kubelet to provide a lightweight Kubernetes experience, allowing users to deploy applications while leveraging Fly.io's global network and infrastructure.
How does Fly Kubernetes differ from traditional Kubernetes deployments?
Fly Kubernetes simplifies the orchestration process by integrating with Fly Machines API, which keeps state local to workers instead of relying on global consensus. This results in a more predictable and faster scheduling mechanism, tailored for Fly.io's infrastructure.
What are the advantages of using Fly Kubernetes over flyctl?
Fly Kubernetes offers a more declarative deployment model, allowing users to specify exact states for replicas, autoscaling rules, and volume definitions. Additionally, Kubernetes automatically manages the state of applications, ensuring they remain operational even if machines go down.
What components make up Fly Kubernetes?
Fly Kubernetes is built on K3s, a lightweight Kubernetes distribution, and Virtual Kubelet, which acts as a proxy to the Fly Machines API. This combination allows for efficient management of Kubernetes pods on Fly.io's infrastructure.

Key Statistics & Figures

Number of applications running on Fly.io
Over 200,000 applications
This demonstrates the scale at which Fly.io operates, highlighting its capability to manage a large number of deployments across various regions.

Technologies & Tools

Container Orchestration
K3s
A lightweight, CNCF-certified Kubernetes distribution used in Fly Kubernetes.
Container Orchestration
Virtual Kubelet
Acts as a proxy to the Fly Machines API, allowing Kubernetes to manage pods on Fly.io's infrastructure.
Backend Service
Fly Machines API
Provides a market-style scheduler for managing workloads on Fly.io's infrastructure.

Key Actionable Insights

1
Consider using Fly Kubernetes if you're already invested in Kubernetes tooling but want to leverage Fly.io's infrastructure.
This approach allows you to maintain your existing workflows while benefiting from Fly.io's global deployment capabilities, simplifying the management of your applications.
2
Utilize the Fly Machines API for more predictable scheduling and orchestration of your workloads.
By keeping state local to workers, you can avoid the complexities and potential delays associated with global consensus mechanisms found in traditional orchestrators.
3
Explore the integration of K3s and Virtual Kubelet for a streamlined Kubernetes experience on Fly.io.
This combination reduces the overhead typically associated with Kubernetes, making it easier to deploy and manage applications without the need for extensive infrastructure management.

Common Pitfalls

1
Assuming that Fly Kubernetes will function exactly like traditional Kubernetes without understanding its unique architecture.
Fly Kubernetes operates differently, particularly in its use of local state and the Fly Machines API, which may lead to confusion if users expect global consensus behavior typical of other orchestrators.

Related Concepts

Kubernetes Architecture
Fly.io Infrastructure
Container Orchestration Strategies