- Clone kubernetes and cd to the repo
git clone kubernetes
cd kubernetes- Checkout to your target version, in this case we will check from
v1.35.0
| FROM alpine:latest | |
| COPY webhook /usr/local/bin/webhook | |
| ENTRYPOINT ["/usr/local/bin/webhook"] |
| FROM debian:bookworm | |
| # 1. Install compilation toolchain and dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| git build-essential autoconf automake libtool \ | |
| bison flex pkg-config libgmp-dev libreadline-dev \ | |
| libedit-dev libjansson-dev \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # 2. Build libmnl (rarely changes, master is fine) |
| # Ref https://tailscale.com/kb/1207/small-tailscale | |
| git clone https://github.com/tailscale/tailscale.git | |
| # obtain the tags from the build_dist.sh --extra-small script | |
| # check the existing ones with go run ./cmd/featuretags --list | |
| TAGS=$(go run ./cmd/featuretags --min --add=osrouter,unixsocketidentity,useexitnode,clientupdate) | |
| # Use the corresponding architecture https://go.dev/wiki/GoMips |
| # adb shell with root privileges to configure the android routing tables | |
| # In this case wlan1 is the hotspot interface and tun0 the vpn interface | |
| # use the vpn routing table for hotspot traffic | |
| ip rule add from all iif wlan1 lookup tun0 pref 17999 | |
| # allow traffic between VPN and hotspot | |
| iptables -I tetherctrl_FORWARD -i tun0 -o wlan1 -j RETURN | |
| iptables -I tetherctrl_FORWARD -i wlan1 -o tun0 -j RETURN |
| apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| name: server-deployment | |
| labels: | |
| app: MyApp | |
| spec: | |
| replicas: 2 | |
| selector: | |
| matchLabels: |
| #!/usr/bin/env bpftrace | |
| #define AF_INET 2 | |
| #define AF_INET6 10 | |
| iter:tcp | |
| { | |
| $sk_common = ctx->sk_common; | |
| if ($sk_common == 0) { |
| --- | |
| apiVersion: v1 | |
| kind: Namespace | |
| metadata: | |
| name: monitoring | |
| --- | |
| apiVersion: rbac.authorization.k8s.io/v1 | |
| kind: ClusterRole | |
| metadata: | |
| name: prometheus |
This document provides a hands-on guide to understanding how runtimes interacts with network devices and namespaces, focusing on the new "Network Devices" feature described in the OCI (Open Container Initiative) runtime specification. The feature is expected to be released in the version 1.3.0 of the OCI specification.
In high-level container orchestration systems like Kubernetes, the management of network namespaces and interfaces is handled by the [Container Runtime Interface
| # based on https://taozhi.medium.com/the-amazing-chroot-making-simply-ssh-to-each-nodes-in-kubernetes-a3448a665c95 | |
| # kubectl exec -it ssh-pod -- chroot /host /bin/bash | |
| apiVersion: v1 | |
| kind: Pod | |
| metadata: | |
| name: ssh-pod | |
| labels: | |
| app: ssh-pod | |
| spec: | |
| hostNetwork: true |