-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
177 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
title: "HA Cluster" | ||
description: " Manage a Highly-Available Kubernetes Cluster " | ||
slug: "HA Cluster" | ||
weight: 810 | ||
--- | ||
|
||
|
||
Kubernetes utilizes a microservices architecture, with all requests initially directed to a central API server microservice, supported by various other components. For high availability in a Kubernetes cluster, it's common to add more control plane nodes, each hosting additional instances of the API Server, Scheduler, and Controller Manager. If etcd is part of the control plane nodes, additional members will also be added to the etcd cluster. | ||
|
||
In a setup with multiple control plane nodes, several API Servers operate concurrently in a highly available configuration, all interfacing with the same etcd cluster. This setup ensures that client requests are processed consistently using the shared data. Communication with the API Servers is managed through a single endpoint, such as an external load balancer, which directs traffic to all API Server instances. | ||
|
||
Other control plane components like the Scheduler and Controller Manager function on a failover basis. Among the instances of these microservices, one is elected as the active leader to handle all critical tasks. The other instances remain passive and only become active if the current leader fails. | ||
|
||
High availability in the control plane is crucial but only part of achieving overall high availability in Kubernetes. For high availability of workloads, additional worker nodes might be necessary, and workloads should be configured to deploy multiple replicas that coordinate with each other. | ||
|
||
Kubeadm simplifies the process of expanding your Kubernetes cluster by adding more nodes. To join a new node to the cluster, you first need to generate a join command that includes the API server's address, a unique join token, and the SHA hash of the cluster’s certificate authority (CA) certificate. This command can be generated using the following command on an existing control plane node: | ||
|
||
```bash | ||
|
||
|
||
kubeadm token create --print-join-command | ||
|
||
kubeadm join 192.168.100.100:6443 --token 3ua85a.rl5riytxhvc7fs1e --discovery-token-ca-cert-hash sha256:3d239f1c87cac3549334a91ed24580bea67e96cf78a4a83b20371af1c973922f | ||
|
||
``` | ||
|
||
Run this command on any additional nodes that meet the prerequisites mentioned earlier in this module: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
--- | ||
title: "RBAC" | ||
description: "Manage role based access control (RBAC)" | ||
slug: "RBAC" | ||
weight : 11 | ||
--- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
title: "kubeadm" | ||
description: " Use Kubeadm to install a basic cluster " | ||
slug: "kubeadm" | ||
weight: 800 | ||
--- | ||
|
||
kubeadm is the reference installer for Kubernetes that sets up a minimally viable Kubernetes cluster using some best practices. It simplifies the initialization of control plane nodes, the addition (or removal) of nodes to a Kubernetes cluster, and also handles control plane and Kubelet configuration updates. | ||
|
||
Kubeadm has a variety of commands and subcommands that will allow you to: | ||
- Create a control plane kubeadm init | ||
- Add a node kubeadm join | ||
- Regenerate certificates kubeadm certificates renew | ||
- Upgrade clusters kubeadm upgrade | ||
|
||
A typical kubeadm setup consists of the following characteristics (which you are present in many Kubernetes distributions): | ||
- Control plane components (like the API Server or scheduler) running as pods | ||
- Certificate-based communication between the API server and its clients | ||
- kube-proxy to set up services | ||
- CoreDNS to provide in-cluster DNS | ||
In order to successfully use Kubeadm, the node must have a kubelet and container runtime installed on the machine: | ||
|
||
``` | ||
$ sudo apt-get update && sudo apt-get install -y kubelet kubeadm kubectl | ||
``` | ||
|
||
Once installed, kubeadm init will initialize a control plane for your cluster. | ||
|
||
``` | ||
$ sudo kubeadm init --cri-socket=unix:///var/run/containerd/containerd.sock | ||
[init] Using Kubernetes version: v1.26.0 | ||
[preflight] Running pre-flight checks | ||
[preflight] Pulling images required for setting up a Kubernetes cluster | ||
... | ||
Your Kubernetes control-plane has initialized successfully! | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+45.6 KB
...base-2_hu06b1a92291a380a0d2e0ec03dab66b2f_17642_filter_14201183787159517700.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+51.8 KB
...base-2_hu06b1a92291a380a0d2e0ec03dab66b2f_17642_filter_16895055304250821557.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+53 KB
...-base-2_hu06b1a92291a380a0d2e0ec03dab66b2f_17642_filter_4024070232498152919.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+55.4 KB
...-base-2_hu06b1a92291a380a0d2e0ec03dab66b2f_17642_filter_8618653308837673791.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.