What is a Kubernetes?
Adrian Bao | Fall 2024
The Open Computing Facility at UC Berkeley
Slides by Nikhil Jha
Why Kubernetes?
1
A Fundamental Problem in Computer Science:
How do we write software?
A Fundamental Problem in Computer Infrastructure:
How do we run software?
Applications
Resources
Non-logo images: noun project
Problem:
What is the best* way to organize or spend our resources to run this software?
Kubernetes Subproblem:
Given we have a bunch of computers that are already running, how do we best* organize them to run our software?
“best” = ?
“Efficiently”, “at scale”, minimal downtime, in a way that adapts to your org structure (layer 8), etcetc…
“best” = ?
Means different things to different people!
What is Kubernetes?
2
image: https://pixabay.com/vectors/database-storage-data-storage-152091/
Examples of Objects
Crazier Objects
image: https://stackoverflow.com/questions/46640049
An example of something in the database…
image: https://stackoverflow.com/questions/46640049
typed
An example of something in the database…
image: https://stackoverflow.com/questions/46640049
typed
key
An example of something in the database…
image: https://stackoverflow.com/questions/46640049
CoffeeScheduler
time: “8:30 AM”
Not in Kubernetes by default, but you can make this!
CoffeeScheduler
time: “8:30 AM”
Java logo lol
Not in Kubernetes by default, but you can make this!
2. Controller Software
2. Controller Software
image: https://publicdomainvectors.org/en/free-clipart/Isometric-server-cabinet-vector-graphics/13444.html
3. Standardized APIs
3. Standardized APIs
image: https://stackoverflow.com/questions/46640049
versioned
An example of something in the database…
3. Standardized APIs
The other details…
3
“a container orchestration system”
=
“a container orchestration system”
=
yet I haven’t even talked about containers lol… but they’re important!
“Why now and not 30 years ago?”
containers =
container
}
a packaged app
container
}
standard (OCI) sandboxed process
container
}
standard (OCI) sandboxed process
typically implemented as set of isolated processes
}
container
}
standard (OCI) sandboxed process
typically implemented as set of isolated processes
}
}
namespaces (e.x. netns), cgroup, fs
Why is this “better”?
4
1. works on multiple machines
2. declarative infrastructure
SQL : C
Kubernetes : Your OS
Appendix: An Example
5
“Pod” represents the existence of a container
It contains information about the image to run, and the container port
notice that it contains a “template” for what Pod it should create
“Deployment” represents a set of fungible containers
* Note: ReplicaSet is a thing that exists, so I may slightly lie when presenting this slide.
* Note: ReplicaSet is a thing that exists, so I may slightly lie when presenting this slide.
Label, so the controller software for the Deployment can tell which Pod objects it owns
argo.ocf.berkeley.edu (v4)
argo.ocf.berkeley.edu (v6)
argo.ocf.berkeley.edu (v4)
argo.ocf.berkeley.edu (v6)
“MinecraftSet” represents the existence of a group of Minecraft servers
It’s managed by controller software I wrote, hence njha.dev
The configuration options are specific to a Minecraft server (!!)
You can still override the template options for the Pod
Labels are used to organize resources
process::exit(0); // ty