Skip to content

Instantly share code, notes, and snippets.

View swagfin's full-sized avatar
🖥️
Just a little research

George Njeri (Swagfin) swagfin

🖥️
Just a little research
View GitHub Profile

How to re-generate K8s SSL Certificates on MicroK8s

Issue

You might encounter the following error when you the IP addresses is changed on the host machine:

Unable to connect to the server: x509: certificate is valid for <internal IPs>, not <external IP>

Solution

@swagfin
swagfin / how-to-add-users-and-roles-in-argocd.md
Last active September 22, 2024 19:54
How to Add Users and Role Policies in Argo CD

Adding Users with Role Policy in Argo CD

Step 1: Login to Argo CD

You can log in to Argo CD or bash into the Argo CD pod running in Kubernetes:

argocd login <ARGOCD_SERVER> --username admin --password <ADMIN_PASSWORD>

Step 2: Create a User

@swagfin
swagfin / microk8s-fix-node-unhealthy-after-reboot.md
Last active September 22, 2024 19:58
Microk8s - Fixing Node Re-connection after Re-boot Issue

Fixing K8s Node UnHealthy after Re-boot Issue

Issue:

Nodes in the Kubernetes cluster may remain in an "Unhealthy" state on the control plane/master node after they are restarted. This problem occurs because the nf_conntrack module, which is essential for network connection tracking, is not automatically loaded on reboot.

Solution:

To ensure nodes reconnect properly after a restart, you need to make sure the nf_conntrack module is loaded at boot on all workers nodes thought this command;

@swagfin
swagfin / fixing-network-driver-issues-on-ubuntu-20.04.md
Last active March 23, 2024 09:33
Fixing Network Driver Issues on Ubuntu 20.04

Fixing Network Driver Issues on Ubuntu 20.04

If you encounter missing network drivers when installing Ubuntu on new machines, you might notice that network cards are listed as (UNCLAIMED) when you execute the command:

lshw -c network

This indicates that your device requires Hardware Enablement (HWE).

About Hardware Enablement (HWE)

@swagfin
swagfin / install-lets-encrypt-cert-microk8s.md
Last active April 12, 2026 18:52
Installing Lets Encrypt Certificate on Kubernetes (Microk8s Cluster)

Cert Manager Setup for MicroK8s (v1.20.2)

Install cert-manager

sudo microk8s kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.20.2/cert-manager.yaml
sudo microk8s kubectl wait --for=condition=available deployment/cert-manager -n cert-manager --timeout=120s

Verify installation

@swagfin
swagfin / allow-root-ssh-login-linux.md
Last active March 24, 2025 18:21
How to install SSH Server and Allow root remove Login on Linux server

Allow Root User Access via SSH

1. Reset Ubuntu Root Password

Ensure you set a strong password:

sudo passwd root

2. Install OpenSSH Server and Client

Update the system and install both SSH components:

@swagfin
swagfin / docker-install.md
Last active March 23, 2024 09:44
HOW TO INSTALL DOCKER ON LINUX

Install Docker on Linux (Ubuntu)

To install Docker run the command:

curl -sSL https://get.docker.com/ | sudo sh

Check version if working correctly:

docker --version
@swagfin
swagfin / microk8s-kubernetes-install-linux.md
Last active July 14, 2025 21:52
Install Kubernetes Cluster using Microk8s on Linux

Install Kubernetes Cluster using Microk8s on Linux

STEP 1 (Update and Upgrade the System)

sudo apt update
sudo apt upgrade

STEP 2 (Install MicroK8s)

sudo snap install microk8s --classic
@swagfin
swagfin / mssql-server-linux-install.md
Last active March 23, 2024 09:45
Mssql-server for Linux (Unattended Install)

Install MSSQL Server 2019 On Linux (Ubuntu)

This script can be used to install Microsoft sql server 2019 on Ubuntu 20.04 versions

# Password for the SA user (required)
MSSQL_SA_PASSWORD='<ENTER SA PASSWORD HERE>'
# Product ID of the version of SQL server you're installing
# Must be evaluation, developer, express, web, standard, enterprise, or your 25 digit product key
# Defaults to developer