Skip to content

Instantly share code, notes, and snippets.

@dmancloud
dmancloud / install-rancher-with-lets-encrypt-certificate.md
Last active November 3, 2024 16:52
Rancher With Cert-Manager & Lets Encrypt (Linux)

Install Rancher Manager With Lets Encrypt (Linux)

Infrastructure

  • Domain Name
  • Ability to make DNS Changes
  • Debian 11 Virtual Machine (Should work with Ubuntu)
  • Port 80 & 443 must be accessible for Let's Encrypt to verify and issue certificates

Pick a subdomain and create a DNS entry pointing to the IP Address that will be assigned to the Rancher Server

@dmancloud
dmancloud / ha-rke2-with-kube-vip.md
Last active October 30, 2023 14:18
Highly Available (HA) Kubernetes Cluster with RKE2 & kube-vip

HA Kubernetes Cluster with RKE2 & kube-vip

Infrastructure

  • 3 Virtual Machines (nodes) with Static IP Addresses
  • Debian 11
  • DNS configured for each of the nodes and the floating IP Address (VIP)

Upgrade Packages & Install Prerequisites

sudo apt-get update && sudo apt upgrade -y
sudo apt-get -y install gnupg2 ca-certificates curl apt-transport-https iptables
@dmancloud
dmancloud / kube-vip-service-loadbalancer.md
Last active October 30, 2023 14:19
Service LoadBalancer using leader election for ARP (Layer 2)

kube-vip - Service LoadBalancer using leader election (ARP)

kube-vip provides Kubernetes clusters with a virtual IP and load balancer for both the control plane (for building a highly-available cluster) and Kubernetes Services of type LoadBalancer without relying on any external hardware or software.

Documentation - https://kube-vip.io/docs/

Quickstart

Download & Deploy kube-vip controller

curl -sfL https://raw.githubusercontent.com/kube-vip/kube-vip-cloud-provider/main/manifest/kube-vip-cloud-controller.yaml > /var/lib/rancher/rke2/server/manifests/kube-vip-cloud-controller.yaml
@dmancloud
dmancloud / wildcard-certificates-with-traefik-lets-encrypt.md
Last active October 31, 2024 09:29
Wildcard Certificates with Traefik + cert-manager + Let's Encrypt in Kubernetes Tutorial
@dmancloud
dmancloud / pi-hole-with-recursive-dns.md
Last active November 1, 2022 13:39
Pi-Hole Using Your Own Recursive DNS Server

Pi-Hole Using Your Own Recursive DNS Server

Pi-Hole is a great Self-Hosted DNS Service. It keeps ads from loading, and will run as a Docker container or virtual machine you'd like. You can also completely bypass 3rd party DNS servers like 8.8.8.8, 1.1.1.1, 208.67. 222.222, or the ones ran by your ISP.

Prerequisites

Linux VM (in this tutorial we are using Debian 11)

Install Pi-Hole

sudo curl -sSL https://install.pi-hole.net | bash
@dmancloud
dmancloud / monitoring-kubernetes.md
Last active October 31, 2024 09:28
Grafana and Prometheus - Monitoring Kubernetes

Monitoring Kubernetes with Grafana and Prometheus

Grafana and Prometheus are a powerful monitoring solutions that allow you to visualize, query, and alert metrics no matter where they are stored.

Getting Started

You will need

  • A kubernetes cluster
  • kubectl installed locally
  • helm installed locally

Create a Monitoring Namespace

@dmancloud
dmancloud / argocd-installation-part-2.md
Last active November 17, 2024 10:44
ArgoCD Installation Part 2

ArgoCD Installation Part 2 - Quick Start

Argo CD is a declarative continuous delivery tool for Kubernetes applications. It uses the GitOps style to create and manage Kubernetes clusters. When any changes are made to the application configuration in Git, Argo CD will compare it with the configurations of the running application and notify users to bring the desired and live state into sync.

Argo CD has been developed under the Cloud Native Computing Foundation’s (CNCF) Argo Project- a project, especially for Kubernetes application lifecycle management. The project also includes Argo Workflow, Argo Rollouts, and Argo Events.. Each solves a particular set of problems in the agile development process and make the Kubernetes application delivery scalable and secure.

Upgrade Packages & Install Prerequisites

Install ArgoCD

kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
@dmancloud
dmancloud / argocd-webhook-configuration.md
Last active October 31, 2024 09:27
Argo CD Git Webhook Configuration

Argo CD Git Webhook Configuration

By default, Argo CD polls the Git repositories every 3 minutes to detect the changes made on the repo. If you want to remove the delay, you can configure a webhook event to send a notification to the API server.

Create a Webhook in GitHub

Login to your Github repository and navigate to settings > webhooks and click add webhook

The payload URL is your ArgoCD Server + /api/webhook

For example.

https://argocd.example.com/api/webhook

@dmancloud
dmancloud / customize-your-terminal-on-macos-like-a-pro.md
Last active November 7, 2024 12:05
Customize Your Terminal On MacOS Like A Pro

Customize Your Terminal On MacOS Like A Pro

Customize your terminal using iTerm2, oh-my-zsh and powerlevel10k works on both Macbook Intel and Macbook M1.

Install Brew

The Missing Package Manager for macOS

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Install iTerm2

iTerm2 has better color fidelity than the built in Terminal, so your themes will look better.

@dmancloud
dmancloud / howto-use-kubernetes-secrets.md
Last active October 31, 2024 09:26
How to use Kubernetes Secrets

How to use Kubernetes Secrets

Create Kubernetes secrets using kubectl and --from-literal

The easiest ways to create the Kubernetes secret is by using the kubectl command and --from-literal flag. For example to understand Kubernetes secret creation we need three things.

  • secret-name - test-secret
  • username - test-user
  • password - testP@ssword
kubectl create secret generic test-secret --from-literal=username=test-user --from-literal=password=testP@ssword