Skip to content

Instantly share code, notes, and snippets.

View rizalord's full-sized avatar
🏰
Home Sweet Home

Ahmad Khamdani rizalord

🏰
Home Sweet Home
View GitHub Profile
@rizalord
rizalord / k3s-setup.md
Last active March 24, 2025 02:36
K3S Setup

K3S Setup

This document describes the steps to set up a k3s cluster on-premise. K3s is a lightweight Kubernetes distribution designed for production workloads in resource-constrained environments. This guide will walk you through the process of configuring a control plane, worker node, and an HTTP load balancer to ensure high availability and efficient traffic management for your k3s cluster.

Prerequisites

  • 3 Ubuntu 20.04 servers with at least 2GB of RAM and 2 CPUs
    • Number of servers is flexible, minimum 1 server for control plane and 1 server for worker node
    • You also can use only 1 server as both control plane and worker node, but it is not recommended for production workloads
  • 1 additional Ubuntu 20.04 server for the load balancer
@rizalord
rizalord / jwks.json
Last active March 5, 2023 13:26
Example jwks
{
"keys": [
{
"kty": "RSA",
"kid": "testing",
"n": "rQYzKOPjiENQ5YNZyC8NG3NAmi6pb5CRJLNqY9xSZ4uA7z8bPzjoQW8-XPFSh_QrQbsVWO0cm8nO7hFW7IRzpKP_9oNpCKKWtJFhH2CacdC5gCPj4Hr-K5t-MXNpnSmgAd2l-3kBbL9yjrGBMAHVwc5S97k6P4efeweh1VE96nLk_H8IK2-QgnxWCve7LiFAfZ7eX_JDkXnWbzRX1aJwfFuXbzyLJ22USQ5JjEmjk8hTGdob5N3Fq67Bu_-0qUOzzRnfywDvKKa-egqP3E5hA7fTW6nGfxVrFDOOBqhjej5VH-o3nT1GVOKoGw4WnzMD0dGR8ALQmPwcGZde2p8pciCoJ2Om89cNt3GTBNNrdcUOvoWBOomNQThjvkEHpYStM_be5zci9ghA0oD8yDpZVm_RpSWr0gpIgNypKtjZTN5JDX5cYQZFUFzDhm0BnmktSVTP8qZlNdRCg_h-VO0N-9T2_TCPLZZCcSDK7yGzo6AkjB4T3jZB6nOhZPgKm6jr",
"e": "AQAB"
}
]
}
@rizalord
rizalord / openssl-snippet.md
Created March 1, 2023 15:42
Snippet for OpenSSL commands

OpenSSL Commands

Generate Private Key

openssl genrsa -out private.pem 3072

Generate Public Key from existing Private Key

openssl rsa -in private.pem -pubout -out public.pem
@rizalord
rizalord / node_nginx_ssl.md
Created December 10, 2021 13:41 — forked from bradtraversy/node_nginx_ssl.md
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user