Skip to main content

Overview

Kubernetes is an open-source container orchestration platform.

What does this mean?

It means that Kubernetes is just natively scalable Docker. It features:

  • self healing: automatically restarts crashed containers; shifts workloads when nodes go down
  • horizontal scalability: adjusts app capacities depending on demand
  • service discovery: automatically exposes containers using DNS
  • automatic load balancing: balances network traffic across multiple instances of the same apps/services
  • resource-based containerdeployments: deploymentsdeploys containers to nodes based on their resorurce availability

flavors

Kubernetes comes in two main versions:

  • k8s (the full, feature rich edition)
  • k3s (the lightweight, simpler version)

installation (k3s)

curl -sfL https://get.k3s.io | sh - Install Kubernetes to the current environment as the control plane.

curl -sfL https://get.k3s.io | K3S_URL=https://<CONTROLLER_IP>:6443 K3S_TOKEN=<CLUSTER_TOKEN> sh - Install Kubernetes to the current environment as part of the cluster managed by the control plane.

The cluster token can be found by running the following command:

sudo cat /var/lib/rancher/k3s/server/node-token

sudo kubectl get nodes Now that all the nodes have been installed, check on their health.

sudo systemctl status k3s (Optional)

components

there are six main things that make up a kubernetes cluster:

  • namespaces
  • pods
  • replication sets
  • services
  • deployments
  • configuration maps