Top Related Projects
Conformance test suite for OpenShift
Complete container management platform
The Moby Project - a collaborative project for the container ecosystem to assemble container-based systems
An open and reliable container runtime
The Kubernetes Package Manager
Nomad is an easy-to-use, flexible, and performant workload orchestrator that can deploy a mix of microservice, batch, containerized, and non-containerized applications. Nomad is easy to operate and scale and has native Consul and Vault integrations.
Quick Overview
Kubernetes is an open-source container orchestration platform for automating deployment, scaling, and management of containerized applications. It provides a robust ecosystem for managing containerized workloads and services, facilitating both declarative configuration and automation.
Pros
- Highly scalable and flexible, capable of managing large-scale distributed systems
- Strong community support and extensive ecosystem of tools and integrations
- Provides automated rollouts, rollbacks, and self-healing capabilities
- Offers declarative configuration management and version control
Cons
- Steep learning curve for beginners due to its complexity
- Resource-intensive, requiring significant computational overhead
- Can be overkill for small-scale applications or simple deployments
- Requires careful security configuration to avoid potential vulnerabilities
Code Examples
- Creating a simple deployment:
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
replicas: 3
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.14.2
ports:
- containerPort: 80
This YAML file defines a Deployment that creates three replicas of an Nginx container.
- Creating a service to expose the deployment:
apiVersion: v1
kind: Service
metadata:
name: nginx-service
spec:
selector:
app: nginx
ports:
- protocol: TCP
port: 80
targetPort: 80
type: LoadBalancer
This YAML file creates a Service that exposes the Nginx deployment to external traffic using a load balancer.
- Scaling a deployment:
kubectl scale deployment nginx-deployment --replicas=5
This command scales the nginx-deployment
to 5 replicas.
Getting Started
To get started with Kubernetes:
-
Install kubectl:
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" chmod +x kubectl sudo mv kubectl /usr/local/bin/
-
Set up a Kubernetes cluster (e.g., using Minikube for local development):
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 sudo install minikube-linux-amd64 /usr/local/bin/minikube minikube start
-
Apply a sample deployment:
kubectl apply -f https://k8s.io/examples/application/deployment.yaml
-
Verify the deployment:
kubectl get deployments kubectl get pods
These steps will set up a basic Kubernetes environment and deploy a sample application.
Competitor Comparisons
Conformance test suite for OpenShift
Pros of Origin
- Provides additional enterprise features and security out-of-the-box
- Offers a more user-friendly web console for cluster management
- Includes integrated CI/CD pipelines and developer tools
Cons of Origin
- Steeper learning curve due to additional features and complexity
- Less flexible for customization compared to vanilla Kubernetes
- Potentially higher resource requirements for running clusters
Code Comparison
Origin extends Kubernetes with custom resources. Here's an example of a BuildConfig in Origin:
apiVersion: build.openshift.io/v1
kind: BuildConfig
metadata:
name: sample-build
spec:
source:
git:
uri: https://github.com/openshift/origin.git
strategy:
dockerStrategy:
from:
kind: ImageStreamTag
name: centos:7
Kubernetes doesn't have built-in build configurations, so you'd typically use external tools or custom resources for similar functionality:
apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
name: sample-pipeline
spec:
tasks:
- name: git-clone
taskRef:
name: git-clone
- name: build-push
taskRef:
name: buildah
Both projects use Go for their core implementation, but Origin includes additional components and customizations on top of the Kubernetes codebase.
Complete container management platform
Pros of Rancher
- Provides a user-friendly web interface for managing Kubernetes clusters
- Offers simplified multi-cluster management and deployment
- Includes built-in monitoring, logging, and security features
Cons of Rancher
- Adds an additional layer of complexity to the Kubernetes ecosystem
- May have a steeper learning curve for users new to container orchestration
- Potentially introduces vendor lock-in for certain features
Code Comparison
Kubernetes (main.go):
func main() {
command := app.NewKubeletCommand()
code := cli.Run(command)
os.Exit(code)
}
Rancher (main.go):
func main() {
app.Run(os.Args)
}
Key Differences
Kubernetes is the core container orchestration platform, while Rancher is a management tool built on top of Kubernetes. Kubernetes provides the fundamental building blocks for container orchestration, whereas Rancher focuses on simplifying cluster management and providing additional features for enterprise use cases.
Kubernetes has a larger community and more extensive ecosystem, but Rancher offers a more accessible entry point for organizations looking to adopt Kubernetes without diving deep into its complexities.
The Moby Project - a collaborative project for the container ecosystem to assemble container-based systems
Pros of Moby
- Simpler architecture and easier to understand for beginners
- Better suited for single-host deployments and smaller-scale applications
- More flexible and customizable, allowing for easier integration of custom components
Cons of Moby
- Less robust orchestration capabilities compared to Kubernetes
- Smaller ecosystem and community support
- Limited built-in features for managing complex, distributed applications
Code Comparison
Kubernetes (Pod definition):
apiVersion: v1
kind: Pod
metadata:
name: nginx
spec:
containers:
- name: nginx
image: nginx:1.14.2
ports:
- containerPort: 80
Moby (Docker Compose):
version: '3'
services:
nginx:
image: nginx:1.14.2
ports:
- "80:80"
Both Kubernetes and Moby are popular container orchestration platforms, but they serve different purposes and scales. Kubernetes is designed for large-scale, distributed applications and offers more advanced features for orchestration, scaling, and management. Moby, on the other hand, is more focused on containerization itself and is better suited for simpler deployments or as a foundation for building custom container platforms.
While Kubernetes has a steeper learning curve, it provides more comprehensive tools for managing complex applications across multiple hosts. Moby offers a more straightforward approach to containerization and is often easier to get started with for smaller projects or single-host deployments.
An open and reliable container runtime
Pros of containerd
- Lightweight and focused on container runtime functionality
- Easier to integrate into existing systems due to its modular design
- Faster startup times for individual containers
Cons of containerd
- Limited orchestration capabilities compared to Kubernetes
- Requires additional tools for advanced cluster management
- Less extensive ecosystem and community support
Code Comparison
containerd:
import (
"github.com/containerd/containerd"
"github.com/containerd/containerd/cio"
)
client, err := containerd.New("/run/containerd/containerd.sock")
container, err := client.NewContainer(ctx, "example")
Kubernetes:
import (
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"
)
config, err := rest.InClusterConfig()
clientset, err := kubernetes.NewForConfig(config)
Summary
containerd focuses on container runtime functionality, offering a lightweight and modular solution with faster container startup times. However, it lacks the extensive orchestration capabilities and ecosystem support that Kubernetes provides. Kubernetes offers a more comprehensive platform for container orchestration and cluster management but comes with increased complexity and resource requirements. The choice between the two depends on specific project needs and infrastructure requirements.
The Kubernetes Package Manager
Pros of Helm
- Simplifies Kubernetes application deployment and management
- Provides templating and versioning for Kubernetes manifests
- Enables easy sharing and reuse of application configurations
Cons of Helm
- Adds complexity for simple applications or small-scale deployments
- Requires learning an additional tool and concepts
- May introduce security risks if not properly configured
Code Comparison
Kubernetes manifest (kubernetes):
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
replicas: 3
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.14.2
ports:
- containerPort: 80
Helm Chart (helm):
apiVersion: v1
kind: Chart
metadata:
name: nginx
spec:
values:
replicaCount: 3
image:
repository: nginx
tag: 1.14.2
templates:
- name: deployment.yaml
content: |
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-nginx
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
ports:
- containerPort: 80
Nomad is an easy-to-use, flexible, and performant workload orchestrator that can deploy a mix of microservice, batch, containerized, and non-containerized applications. Nomad is easy to operate and scale and has native Consul and Vault integrations.
Pros of Nomad
- Simpler architecture and easier to set up and manage
- Supports both containerized and non-containerized workloads
- Lightweight and consumes fewer resources
Cons of Nomad
- Smaller ecosystem and fewer third-party integrations
- Less robust built-in features for complex orchestration scenarios
- Limited native support for stateful applications
Code Comparison
Kubernetes deployment example:
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
replicas: 3
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.14.2
ports:
- containerPort: 80
Nomad job specification example:
job "nginx" {
datacenters = ["dc1"]
type = "service"
group "nginx" {
count = 3
task "nginx" {
driver = "docker"
config {
image = "nginx:1.14.2"
port_map {
http = 80
}
}
resources {
network {
port "http" {}
}
}
}
}
}
Both examples deploy three instances of an Nginx web server, but Kubernetes uses YAML for configuration, while Nomad uses HCL (HashiCorp Configuration Language).
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Kubernetes (K8s)

Kubernetes, also known as K8s, is an open source system for managing containerized applications across multiple hosts. It provides basic mechanisms for the deployment, maintenance, and scaling of applications.
Kubernetes builds upon a decade and a half of experience at Google running production workloads at scale using a system called Borg, combined with best-of-breed ideas and practices from the community.
Kubernetes is hosted by the Cloud Native Computing Foundation (CNCF). If your company wants to help shape the evolution of technologies that are container-packaged, dynamically scheduled, and microservices-oriented, consider joining the CNCF. For details about who's involved and how Kubernetes plays a role, read the CNCF announcement.
To start using K8s
See our documentation on kubernetes.io.
Take a free course on Scalable Microservices with Kubernetes.
To use Kubernetes code as a library in other applications, see the list of published components.
Use of the k8s.io/kubernetes
module or k8s.io/kubernetes/...
packages as libraries is not supported.
To start developing K8s
The community repository hosts all information about building Kubernetes from source, how to contribute code and documentation, who to contact about what, etc.
If you want to build Kubernetes right away there are two options:
You have a working Go environment.
git clone https://github.com/kubernetes/kubernetes
cd kubernetes
make
You have a working Docker environment.
git clone https://github.com/kubernetes/kubernetes
cd kubernetes
make quick-release
For the full story, head over to the developer's documentation.
Support
If you need support, start with the troubleshooting guide, and work your way through the process that we've outlined.
That said, if you have questions, reach out to us one way or another.
Community Meetings
The Calendar has the list of all the meetings in the Kubernetes community in a single location.
Adopters
The User Case Studies website has real-world use cases of organizations across industries that are deploying/migrating to Kubernetes.
Governance
Kubernetes project is governed by a framework of principles, values, policies and processes to help our community and constituents towards our shared goals.
The Kubernetes Community is the launching point for learning about how we organize ourselves.
The Kubernetes Steering community repo is used by the Kubernetes Steering Committee, which oversees governance of the Kubernetes project.
Roadmap
The Kubernetes Enhancements repo provides information about Kubernetes releases, as well as feature tracking and backlogs.
Top Related Projects
Conformance test suite for OpenShift
Complete container management platform
The Moby Project - a collaborative project for the container ecosystem to assemble container-based systems
An open and reliable container runtime
The Kubernetes Package Manager
Nomad is an easy-to-use, flexible, and performant workload orchestrator that can deploy a mix of microservice, batch, containerized, and non-containerized applications. Nomad is easy to operate and scale and has native Consul and Vault integrations.
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot