Skip to content

Instantly share code, notes, and snippets.

View aojea's full-sized avatar

Antonio Ojea aojea

View GitHub Profile
@aojea
aojea / README.md
Last active March 2, 2023 10:51
Zero downtime on statefulset update
  1. Create cluster
$ gcloud container clusters create aojea
  1. Install the statefulset and wait until it is ready
$ kubectl apply -f test.yaml
@aojea
aojea / README.md
Created February 2, 2023 22:28
Max number of IPs in an A record
  1. Use the stable bind server
docker run -d --rm --name=bind9 internetsystemsconsortium/bind9:9.18
  1. Exec into the container
@aojea
aojea / README.md
Created January 30, 2023 17:55
Tolerate unready endpoints using annotations with Kubernetes (deprecated in 1.24)

Version 1.23

$ kubectl apply -f repro.yaml
deployment.apps/server-deployment created
service/service-annotated unchanged
service/service-field unchanged
$ kubectl get pods
@aojea
aojea / output.sh
Created November 9, 2022 10:42
loadbalancer test output
_output/local/bin/linux/amd64/e2e.test --ginkgo.focus="should be able to preserve UDP traffic when server pod cycles for a LoadBalancer service" --context gke_aojea-gke-dev_us-central1-c_cluster-2 --kubeconfig $PWD/kconfig --provider gke --gce-zone us-central1
Nov 9 10:38:18.592: INFO: Fetching cloud provider for "gke"
I1109 10:38:18.593029 1207706 gce.go:928] Using DefaultTokenSource &oauth2.reuseTokenSource{new:(*oauth2.tokenRefresher)(0xc000a94c00), mu:sync.Mutex{state:0, sema:0x0}, t:(*oauth2.Token)(0xc00098d500)}
W1109 10:38:18.662520 1207706 gce.go:483] No network name or URL specified.
I1109 10:38:18.662698 1207706 e2e.go:125] Starting e2e run "01bf689f-eecf-431c-b464-2e56764338bf" on Ginkgo node 1
Nov 9 10:38:18.672: INFO: Enabling in-tree volume drivers
Running Suite: Kubernetes e2e suite - /usr/local/google/home/aojea/src/kubernetes
=================================================================================
Random Seed: 1667990298 - will randomize all specs
@aojea
aojea / README.md
Last active January 22, 2024 05:48
Sniff CNI commands

CNI SNIFFER

The Container Networking Interface, or CNI, is a generic plugin-based networking solution for configuring the network on containers.

The CNI specification defines:

  1. A format for administrators to define network configuration.
  2. A protocol for container runtimes to make requests to network plugins.
  3. A procedure for executing plugins based on a supplied configuration.
  4. A procedure for plugins to delegate functionality to other plugins.
@aojea
aojea / find_ipv6.go
Last active September 8, 2022 07:53
find ipv6 addresses
package main
import (
"bufio"
"flag"
"fmt"
"go/scanner"
"io"
"io/fs"
"os"
package main
import (
"context"
"flag"
"fmt"
"net"
"os"
"time"
package main
import (
"context"
"crypto/tls"
"fmt"
"io"
"log"
"net"
"net/http"