Skip to content

Instantly share code, notes, and snippets.

View carlosgrillet's full-sized avatar
💭
I do everything on the therminal

Carlos Grillet carlosgrillet

💭
I do everything on the therminal
View GitHub Profile
@carlosgrillet
carlosgrillet / README.md
Last active June 13, 2025 17:54
How to deploy Traefik in Kubernetes

How to deploy Traefik in kubernetes

Warning

At this point you should already have access to your kubernetes cluster in the cloud.

Tip

This example was tested on Linode (Akamai Cloud)

To install traefik on kubernetes, we are going to use helm. Follow the link see how to install it on your system, once done, we can now proceed.

@carlosgrillet
carlosgrillet / README.md
Created June 13, 2025 17:53
This is a list with all the resources availabes in kubernetes api.

Kubernetes Resources

API and Registration

  1. APIService: Registers API services to extend the Kubernetes API.
  2. CustomResourceDefinition (CRD): Defines custom resources, enabling users to create their own resource types.

Certificates

  1. CertificateSigningRequest (CSR): Manages certificate signing requests for entities needing TLS certificates.
@carlosgrillet
carlosgrillet / README.md
Created June 29, 2025 17:16
These are the manual steps you can follow to create a kubernetes control-plane configuration manually using kubeadm.

1. Generate Certificates

# Generate all certificates at once  
kubeadm init phase certs all  
  
# Or generate them individually:  
kubeadm init phase certs ca                        # Root CA  
kubeadm init phase certs apiserver                 # API server certificate  
kubeadm init phase certs apiserver-kubelet-client  # API server to kubelet client cert  
kubeadm init phase certs front-proxy-ca # Front proxy CA 

How to Set Up a Centralized NFS Server for Kubernetes Storage

This guide will walk you through setting up an NFS server to provide centralized storage for your Kubernetes cluster. We'll use a Docker container as the NFS server and configure it to work seamlessly with Kubernetes. This setup is very useful if you have an on-premise Kubernetes cluster and you're looking for a centralized storage solution.

Overview

  1. What is NFS?

    • NFS (Network File System) allows you to share files between machines over a network. It's commonly used in Kubernetes to provide persistent storage that can be accessed by multiple pods.
  2. Why Use This Setup?

@carlosgrillet
carlosgrillet / README.md
Created July 18, 2025 11:52
This guide explains how to configure HAProxy as a load balancer for Kubernetes clusters.

How to Set Up HAProxy as a Load Balancer for Kubernetes High Availability (HA) Clusters

This guide explains how to configure HAProxy as a load balancer for Kubernetes clusters.

Why Use a Load Balancer?

A load balancer is important for Kubernetes clusters because:

  1. High Availability: It ensures that if one control plane node fails, traffic is redirected to other working nodes.
  2. Better Performance: It distributes traffic evenly across multiple nodes, preventing overload on a single node.
  3. Simplified Access: Instead of connecting to individual control plane nodes, you can use a single entry point (the load balancer).
@carlosgrillet
carlosgrillet / README.md
Created August 17, 2025 12:21
Coreutils cheat sheet

📂 File & Directory Operations

ls: List directory contents

$ ls
Desktop  Documents  Downloads

cp: Copy files or directories

@carlosgrillet
carlosgrillet / README.md
Created November 1, 2025 12:49
Strace 6.1 handy help

strace - System Call Tracer

Synopsis

strace [OPTIONS] { -p PID | PROG [ARGS] }
strace -c [OPTIONS] { -p PID | PROG [ARGS] }

@carlosgrillet
carlosgrillet / cloud-config.yaml
Last active December 25, 2025 15:31
Install Mirkotik RouterOS on Hetzner Cloud - cloud-init
# cloud-config
users:
- name: mikrotik
groups: sudo
shell: /bin/bash
packages:
- wget
- gzip
@carlosgrillet
carlosgrillet / create.bash
Last active June 26, 2026 20:38
My small script to create new simple C projects.
#!/usr/bin/env bash
set -euo pipefail
if [[ $# -eq 0 ]]; then
echo "Error: Please provide a project name." >&2
echo "Usage: $0 <name>" >&2
exit 1
fi
@carlosgrillet
carlosgrillet / main.rs
Created March 20, 2026 19:45
Linked list, but is Rust so nobody can read it.
use std::fmt;
struct Node<T> {
value: T,
next: Option<Box<Node<T>>>,
}
pub struct List<T> {
head: Option<Box<Node<T>>>,
len: usize,