Kubernetes Concepts: Difference between revisions
Line 163: | Line 163: | ||
{{Internal|Replication Controller Definition File|Replication Controller Definition File}} | {{Internal|Replication Controller Definition File|Replication Controller Definition File}} | ||
</font> | </font> |
Revision as of 02:38, 10 August 2019
External
Internal
Overview
Kubernetes is an Open Source orchestrator for a container environment.
Kubernetes is an container orchestration platform, offering the ability of orchestrate Docker containers across multiple hosts. Kubernetes provides the ability to specify how many hosts to deploy containers to, how many containers to deploy, how to scale them, where persistent storage resides, and how to deploy a group of containers as a unit. It manages containers in a clustered environment. In other words, it orchestrates containers at scale, defines application topologies, handles parts of the container networking and storage, manages container state and schedules containers across hosts.
Declarative vs. Imperative Approach
Various Kubernetes elements, such as, for example, Deployments and Replica Sets, are powered by control loops. Control loops are a design pattern for distributed software that allows declaratively defining desired state and have the software implement the desired state based on the current state
Cluster
Master
The master node includes:
- the API server
- etcd instance
- the scheduler
- controllers
Node
Pod
A pod is analogous to a VM. It consists in a group of containers sharing network and storage. It is implemented as a pause container. A pod can be defined in a YAML file.
Pod Operations
Service
Label
Selector
kubelet
kubelet is the Kubernetes node agent.
kubectl
kubectl is the Kubernetes main command-line tool.
Context
Curent Context
The current context can be obtained with kubectl config current-context.
Namespace
A namespace provides scope for:
- named resources to avoid naming collisions
- delegating management authority to trusted users
- the ability to limit community resource consumption
Namespace Operations
Storage
Persistent Volume
Represented by a PersistentVolume object. It is associated with a project.
An administrator provision persistent volumes from sources such as:
- NFS
- GCE Persistent Disks
- ESB Volumes
- GlusterFS
- OpenStack Cinder
- Ceph RBD
- iSCSI
- Fiber Channel
Storage resources are requested by laying a claim to the resource (PersistentVolumeClaim). A persistent volume claim is a request for a resource with a specific attributes. When a request is made, a process matches it to an available volume and binds them together. The runtime finds the volume bound to the claim and mounts it into the pod.
Persistent volumes can be recycled after use. The reclamation policy is based on the "persistentVolumeReclaimPolicy" declared in the PersistentVolume object definition. The policy can be "Retain" or "Recycle".
etcd
A distributed key/value datastore for state within the environment.
Scheduler
Policies
Policies are rules that specify which users can and cannot specify actions on objects (pods, services, etc.).
Service
Service Definition File
API
Replica
A replica is a set of pods sharing the same definition.
Replication Controller
Replication Controller Definition File