Skip to content

Commit 8782c8e

Browse files
committed
Update Ruby version, favicon assets, and new article.
1 parent 851e474 commit 8782c8e

23 files changed

Lines changed: 218 additions & 18 deletions

.DS_Store

2 KB
Binary file not shown.

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.2.0
1+
3.4.1

Gemfile

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
source "https://rubygems.org"
44

5-
gem "jekyll", "~> 4.3.2"
6-
gem 'jekyll-theme-chirpy', '~> 7.1', '>= 7.1.1'
5+
gem "jekyll", "~> 4.4.1"
6+
gem 'jekyll-theme-chirpy', '~> 7.2', '>= 7.2.4'
7+
gem 'base64'
78

89
group :jekyll_plugins do
910
gem 'jekyll-sitemap'
@@ -20,17 +21,18 @@ end
2021

2122
group :development do
2223
gem 'webrick'
23-
gem 'rake'
24+
gem 'nokogiri', '~> 1.18'
25+
gem 'sass-embedded', '~> 1.83'
2426
end
2527

26-
# Windows and JRuby does not include zoneinfo files
2728
platforms :mingw, :x64_mingw, :mswin, :jruby do
2829
gem "tzinfo", ">= 1", "< 3"
2930
gem "tzinfo-data"
3031
end
3132

32-
# Performance-booster for watching directories on Windows
33-
gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]
33+
gem "wdm", "~> 0.2.0", :platforms => [:mingw, :x64_mingw, :mswin]
3434

35-
# Lock http_parser.rb gem to v0.6.x on JRuby builds
36-
gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby]
35+
gem "http_parser.rb", "~> 0.8.0", :platforms => [:jruby]
36+
37+
gem "csv"
38+
gem "logger"

_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ timezone: Europe/Paris
1616

1717
title: "Sofian Lakhdar" # the main title
1818

19-
tagline: "Sharing my knowledge about DevOps, SRE, & life experiences" # it will display as the sub-title
19+
tagline: "Sharing my knowledge about DevOps, Platform Engineering & life experiences" # it will display as the sub-title
2020

2121
description: >- # used by seo meta and the atom feed
2222
A blog sharing insights on DevOps, Site Reliability Engineering (SRE), and life experiences.
Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
---
2+
title: Setting Up Cilium on a Kubernetes Cluster with Talos in Proxmox
3+
date: 2025-03-12 21:00:00 +0100
4+
categories: [DevOps, Kubernetes]
5+
tags: [kubernetes, talos, cilium, homelab] # TAG names should always be lowercase
6+
description: Switching from Flannel to Cilium for enhanced networking
7+
author: sofianlak
8+
image:
9+
path: /assets/img/headers/flannel-to-cilium.png
10+
---
11+
12+
> This article is for the setup of a new Kubernetes cluster with Talos. I am not here coverring how to cleanup your existing cluster for removing Flannel.
13+
{: .prompt-info }
14+
15+
## **Introduction**
16+
17+
If you clicked on this article, it’s probably because you’re familiar with at least one of the four key technologies: Cilium, Kubernetes, Talos, or Proxmox. But for those who are curious or need a bit more context, let’s break it down.
18+
19+
- **`Kubernetes`** is a container orchestrator designed to scale and manage containerized applications efficiently. It provides a rich set of APIs to handle deployments, networking, and more.
20+
- **`Talos`** is a lightweight, immutable Linux OS specifically built for running Kubernetes clusters. It simplifies cluster deployment by eliminating the need to manually install and configure Kubernetes components (which is usually done with kubeadm).
21+
- **`Proxmox`** is a powerful open-source virtualization platform that allows us to create and manage virtual machines.
22+
23+
Now, how do these pieces fit together? We’ll use Proxmox to create virtual machines, install Talos as the OS, and deploy a Kubernetes cluster on top of it.
24+
25+
**Wait, but what about Cilium?**
26+
27+
By default, Talos uses Flannel as the CNI (Container Network Interface) along with kube-proxy to handle networking. However, if you want more control, security, and observability in your Kubernetes networking, Cilium is the way to go. Cilium replaces kube-proxy and brings advanced networking features like eBPF-based security policies, high-performance networking, and deep observability.
28+
29+
30+
## **Install Proxmox & Talos**
31+
32+
- **Ensure Proxmox is installed and configured**
33+
34+
I am assuming that you already have a Proxmox server ready. If not, you can get started by following the [Proxmox Getting Started Guide](https://www.proxmox.com/en/products/proxmox-virtual-environment/get-started){:target="\_blank"}.
35+
36+
- **Install talosctl on your local machine**
37+
38+
You can download talosctl on macOS and Linux via:
39+
40+
```shell
41+
brew install siderolabs/tap/talosctl
42+
```
43+
44+
or if you prefer this way:
45+
46+
```shell
47+
curl -sL https://talos.dev/install | sh
48+
```
49+
50+
- **Download the Talos ISO from the Talos Image Factory**
51+
52+
Get the Talos ISO from the [Talos Image Factory](https://factory.talos.dev){:target="\_blank"} Ensure that during the system extensions selection, you choose the QEMU agent to enable communication between Proxmox and your cluster.
53+
54+
- **Upload the ISO to Proxmox and create VMs as per the standard Talos installation guide**
55+
56+
Upload the Talos ISO to Proxmox and create virtual machines as per the standard Talos installation guide.
57+
58+
Follow the steps up [here](https://www.talos.dev/v1.9/talos-guides/install/virtualized-platforms/proxmox/?utm_source=chatgpt.com#upload-iso){:target="\_blank"} to “Upload ISO,” “Create VMs,” and “Start Control Plane Node,” then return here to continue with the core subject.
59+
60+
61+
## **Remove Default CNI (Flannel) via patch.yaml**
62+
63+
As mentioned earlier, Talos installs Flannel by default for networking.
64+
65+
To disable it and configure Talos to operate without any CNI initially, create a patch.yaml file with the following content:
66+
67+
68+
```shell
69+
cluster:
70+
network:
71+
cni:
72+
name: none
73+
proxy:
74+
disabled: true
75+
```
76+
{: file="patch.yaml" }
77+
78+
79+
## **Generate Machine Configurations**
80+
81+
82+
Okay now we will tackle the Talos configuration.
83+
84+
When your controlplane and worker node are ready just start them in Promox, it will boot and generate your ip address (*if you have a DHCP if you don't follow the documentation for static IP [here](https://www.talos.dev/v1.9/talos-guides/install/virtualized-platforms/proxmox/?utm_source=chatgpt.com#without-dhcp-server){:target="\_blank"})*
85+
86+
- **Identify the IPs of your nodes and store them in environment variables**
87+
```shell
88+
export $CONTROL_PLANE_IP=***
89+
export $WORKER_IP=***
90+
```
91+
- **Now, generate the Talos configuration files**
92+
```shell
93+
talosctl gen config talos-proxmox-cluster https://$CONTROL_PLANE_IP:6443 --output-dir _out --config-patch @patch.yaml
94+
```
95+
This will create the necessary YAML configurations in the _out/ directory and use our patch to not generate the CNI config.
96+
97+
- **Apply configuration for the control plane**
98+
```shell
99+
talosctl apply-config --insecure --nodes $CONTROL_PLANE_IP --file _out/controlplane.yaml
100+
```
101+
102+
- **Apply configuration for the worker node**
103+
```shell
104+
talosctl apply-config --insecure --nodes $WORKER_IP --file _out/worker.yaml
105+
```
106+
107+
- **Now, set up talosctl to interact with the cluster**
108+
```shell
109+
export TALOSCONFIG="_out/talosconfig"
110+
talosctl config endpoint $CONTROL_PLANE_IP
111+
talosctl config node $CONTROL_PLANE_IP
112+
```
113+
114+
- **Run the bootstrap command to initialize the Talos Kubernetes control plane**
115+
```shell
116+
talosctl bootstrap
117+
```
118+
119+
- **Finally, retrieve the Kubernetes configuration**
120+
```shell
121+
talosctl kubeconfig .
122+
```
123+
124+
- **If you had already a KUBECONFIG file you can use this command**
125+
```shell
126+
export KUBECONFIG=$(pwd)/kubeconfig
127+
```
128+
129+
<br>
130+
Now, your machines will automatically reboot, and you just need to wait a few minutes for the Kubernetes components to be up and running.
131+
132+
## **Install Cilium**
133+
Now you have a Kubernetes cluster running, but with no networking. Let’s install Cilium for networking!
134+
135+
You can install Cilium using either the Cilium CLI or Helm.
136+
137+
138+
### **Using Cilium CLI**
139+
140+
```shell
141+
cilium install \
142+
--set ipam.mode=kubernetes \
143+
--set kubeProxyReplacement=true \
144+
--set securityContext.capabilities.ciliumAgent="{CHOWN,KILL,NET_ADMIN,NET_RAW,IPC_LOCK,SYS_ADMIN,SYS_RESOURCE,DAC_OVERRIDE,FOWNER,SETGID,SETUID}" \
145+
--set securityContext.capabilities.cleanCiliumState="{NET_ADMIN,SYS_ADMIN,SYS_RESOURCE}" \
146+
--set cgroup.autoMount.enabled=false \
147+
--set cgroup.hostRoot=/sys/fs/cgroup \
148+
--set k8sServiceHost=localhost \
149+
--set k8sServicePort=7445
150+
```
151+
152+
### **Using Helm**
153+
154+
155+
```shell
156+
helm repo add cilium https://helm.cilium.io/
157+
helm repo update
158+
159+
helm install \
160+
cilium \
161+
cilium/cilium \
162+
--version 1.15.6 \
163+
--namespace kube-system \
164+
--set ipam.mode=kubernetes \
165+
--set kubeProxyReplacement=true \
166+
--set securityContext.capabilities.ciliumAgent="{CHOWN,KILL,NET_ADMIN,NET_RAW,IPC_LOCK,SYS_ADMIN,SYS_RESOURCE,DAC_OVERRIDE,FOWNER,SETGID,SETUID}" \
167+
--set securityContext.capabilities.cleanCiliumState="{NET_ADMIN,SYS_ADMIN,SYS_RESOURCE}" \
168+
--set cgroup.autoMount.enabled=false \
169+
--set cgroup.hostRoot=/sys/fs/cgroup \
170+
--set k8sServiceHost=localhost \
171+
--set k8sServicePort=7445
172+
```
173+
174+
175+
After the installation, you can check if the Cilium components are up and running.
176+
177+
Now, you can explore Cilium! By following these steps, you’ve set up a Kubernetes cluster on Talos within Proxmox, using Cilium as your CNI to enable enhanced networking capabilities.
178+
179+
For more detailed information, refer to the [Talos Guide on Deploying Cilium CNI](https://www.talos.dev/v1.9/kubernetes-guides/network/deploying-cilium/){:target="\_blank"}.

_tabs/about.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,13 @@ order: 4
77
## **Who am I?**
88

99
![Desktop View](/assets/img/sofianlak.png){: width="180" height="200" .w-40 .left}
10-
**Sofian Lakhdar** has built his career around **`DevOps`** practices and **`Site Reliability Engineering`** (SRE). He is guided by values inspired from sports: self-improvement, continuous learning, team spirit, and solidarity. These principles permeate both his professional and personal life, enabling him to approach each challenge with commitment.
11-
12-
A passionate **`cyclist`** and **`adventurer`**, he discovers new cultures while traveling by bike, and when not traveling, he escapes through travelers' stories, nurturing his taste for exploration, encounters, and personal growth.
10+
**Sofian Lakhdar** has built his career around **`DevOps`** practices and **`Platform Engineering`**. He is guided by values inspired from sports: self-improvement, continuous learning, team spirit, and solidarity. These principles permeate his professional and personal life, enabling him to approach every challenge with commitment.
1311

1412
## **Why this blog?**
1513

16-
This blog aims to **`share`** theoretical and practical knowledge about SRE and DevOps, essential fields for ensuring the reliability and efficiency of IT services. These topics can often seem complex for beginners. Using **`simple diagrams`**, I seek to make these concepts more accessible, whether for those who are just starting out or for those who wish to deepen their skills in SRE and DevOps.
17-
18-
This blog also reflects my learning journey in this field and my passion for **`discovery`**, both technically and in life, while also exploring other subjects that interest me.
14+
This blog aims to share both theoretical insights and practical knowledge on **`DevOps`**, **`Platform Engineering`**, and **`life experiences`**. It reflects my ongoing learning journey, driven by a passion for both technical and personal discovery, while also exploring a variety of other inspiring topics.
1915

2016
## **How to contact me?**
2117

2218
For any questions or simply to discuss blog topics, you can contact me via email at **[contact@sofianlak.fr](mailto:contact@sofianlak.fr)** or through **[LinkedIn](https://www.linkedin.com/in/sofianlakhdar/){:target="_blank"}**.
23-
Whether it's to discuss SRE/DevOps, travels, or other shared passions, don't hesitate to reach out!
19+
Whether it's to discuss SRE/DevOps or other shared passions, don't hesitate to reach out!

assets/.DS_Store

0 Bytes
Binary file not shown.

assets/img/.DS_Store

0 Bytes
Binary file not shown.

assets/img/favicons/.DS_Store

0 Bytes
Binary file not shown.
-10.2 KB
Binary file not shown.

0 commit comments

Comments
 (0)