Skip to content

Instantly share code, notes, and snippets.

View aojea's full-sized avatar

Antonio Ojea aojea

View GitHub Profile
@aojea
aojea / kindnet-gke.yaml
Last active January 14, 2025 17:47
Use kindnet in GKE
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: kindnet
rules:
- apiGroups:
- ""
resources:
- nodes
@aojea
aojea / README.md
Last active January 9, 2025 18:25
Expose cluster domain to pods
  1. Deploy the backends with the number of replicas we desire (we can always use kubectl later to scale up or down)
kubectl apply -f backend.yaml
  1. I recommend use the ClusterIP the Service and not depend on DNS since we just want to test the IP traffic
kubectl get service
@aojea
aojea / dump.go
Last active January 4, 2025 22:05
golang nftables dump go objects
package main
import (
"fmt"
"log"
"os"
"github.com/google/nftables"
)
@aojea
aojea / README.md
Last active December 21, 2024 12:31
Poor man container/ network namespaces

Useful for troubleshooing network namespaces problems without having to create containers and the additional functionality

source netns.sh

netns_add ns1 192.168.0.2
netns_add ns2 192.168.0.3

ping -c 2 192.168.0.2
PING 192.168.0.2 (192.168.0.2) 56(84) bytes of data.
@aojea
aojea / README.md
Last active December 14, 2024 09:48
upgrade kind kubernetes cluster
@aojea
aojea / README.md
Last active December 2, 2024 16:20
Run Kubernets conformance tests
@aojea
aojea / 1.20--1.21.txt
Last active November 28, 2024 15:23
Kubernetes client-go apidiff
- ./kubernetes/typed/certificates/v1.CertificateSigningRequestInterface.Apply: added
- ./kubernetes/typed/certificates/v1.CertificateSigningRequestInterface.ApplyStatus: added
- ./kubernetes/typed/rbac/v1.ClusterRoleBindingInterface.Apply: added
- ./kubernetes/typed/rbac/v1.ClusterRoleInterface.Apply: added
- ./kubernetes/typed/rbac/v1.RoleBindingInterface.Apply: added
- ./kubernetes/typed/rbac/v1.RoleInterface.Apply: added
- ./kubernetes/typed/apiserverinternal/v1alpha1.StorageVersionInterface.Apply: added
- ./kubernetes/typed/apiserverinternal/v1alpha1.StorageVersionInterface.ApplyStatus: added
- ./informers/storage/v1beta1.Interface.CSIStorageCapacities: added
- ./informers/policy.Interface.V1: added
@aojea
aojea / linked-clone.sh
Last active October 29, 2024 03:11
Script to create a linked clone with libvirt
#!/bin/bash
set -xe
# This script takes as a parameter the name of the VM
# and creates a linked clone
# Ref: https://unix.stackexchange.com/a/33584
# The scripts assumes that it runs from the same folder
# where the vm image is located and it coincides with the
# image name
@aojea
aojea / KIND_Networking.md
Last active October 28, 2024 14:49
Use KIND to emulate complex network scenarios

Networking scenarios [Linux Only]

KIND runs Kubernetes cluster in Docker, and leverages Docker networking for all the network features: port mapping, IPv6, containers connectivity, etc.

Docker Networking

KIND uses a docker user defined network.

It creates a bridge named kind