Skip to content

Instantly share code, notes, and snippets.

View phosae's full-sized avatar
:octocat:
coffee ☕ , beer 🍺 and imagination 🧿

zengxu phosae

:octocat:
coffee ☕ , beer 🍺 and imagination 🧿
View GitHub Profile
@aojea
aojea / README.md
Created August 29, 2024 17:23
Running a Pod with A Predefined Mac Address

Running a Pod with a predefined MAC address

There are situation that, for reasons, you want your Pod to have a static MAC.

Since the Pod uses a veth pair, the application running inside the Pod sees the side of the veth that is on its network namespace.

Using an initContainer with enough privileges, we can change the MAC address before the application runs.

  initContainers:
@dhh
dhh / linux-setup.sh
Last active November 15, 2024 19:55
linux-setup.sh
# THIS LINUX SETUP SCRIPT HAS MORPHED INTO A WHOLE PROJECT: HTTPS://OMAKUB.ORG
# PLEASE CHECKOUT THAT PROJECT INSTEAD OF THIS OUTDATED SETUP SCRIPT.
#
#
# Libraries and infrastructure
sudo apt update -y
sudo apt install -y \
docker.io docker-buildx \
build-essential pkg-config autoconf bison rustc cargo clang \
@mcastelino
mcastelino / kcgroups.md
Last active July 5, 2024 11:53
Kubernetes and cgroups Resource Management/Static cpuManagerPolicy/Memory and Resource Isolation & Scheduling

Overview

The goal of this document to cover all aspects of Kubernetes management, including how resources are expressed, constrained and accounted for. This started a way to ensure that alternate container runtime implementation like Kata containers will behave from a resource accounting and consumption point of view in the same manner as runc.

Location of the latest version of this document: https://gist.github.com/mcastelino/b8ce9a70b00ee56036dadd70ded53e9f

If you do not understand cgroups please refer to a quick primer at the bottom of this document. This will help you understand how the resource enforcement actually works.

Kubernetes Resource Management

@fntlnz
fntlnz / self-signed-certificate-with-custom-ca.md
Last active November 14, 2024 10:34
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
git config --global https.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
git config --global --unset http.proxy
git config --global --unset https.proxy
npm config delete proxy
@denji
denji / http-benchmark.md
Last active October 13, 2024 00:43
HTTP(S) Benchmark Tools / Toolkit for testing/debugging HTTP(S) and restAPI (RESTful)