- (official definition): Kubernetes is a portable, extensible, open source platform for managing containerized workloads and services, that facilitates both declarative configuration and automation.
- insimpler terms: it's a container orchestrator (which mainly manages containers)
- it support a distributed cluster architecture
- where a cluster describes a collection of multiple nodes/server (normally 3/5/7... consensus relevant)
- as it useses, to store the cluster state, the
etcd
distributed key-value store, which under the hood uses the Raft consensus algorithm - with that it manages containers across the cluster, so across all the nodes
- it normally is used distributed but also can run as a single node instance, mostly for development purpose
- if distributed it can provide festures like:
- (high) availability of the software (no downtimes, always accessible to user), if the software makes use of it
- failure tolerant
- Q: what is the main tool to interact with kubernetes clusters? (after they are alredy created)
- A:
kubectl
is for kubernetes cluster what scp/ssh is for remote servers - Q: for development you can use a tool such as
kind
(stands forkubernetes in docker
) to create a k8s cluster (single node in default)
- A:
- yaml representation in etcd
- stored in etcd (pushed & validated through the k8s api)
- is a logical unit & representation which k8s can understand and manage
- examples: pod, namespace, deployment
- from docs: "A resource is an endpoint in the Kubernetes API that stores a collection of API objects of a certain kind; for example, the built-in pods resource contains a collection of Pod objects."
- Q: What is the most basic/core used resource in k8s?
- A: a
pod
- A: a
- Q: What is a pod?
- A:
- it's a resource
- the smallest logical core unit in k8s for running/deploying apps
- manages one or multiple containers
- each pod gets a separate ip
- each container is running on localhost/127.0.01
- that imples: reaching a certain container app via port works over the pod ip:port
- in comparison in docker-compose each service/container gets its own IP + network (you only whould port-forward it to localhost)
- it is the one unit which other units (e.g. deployments, satefulsets....) which running/execurting/managing applications in a certain way all use under the hood
- A:
source: What is Kubernetes?
first part - what is k8s
simpler put
second part - why was it created / what does it try to solve