Skip to content

Instantly share code, notes, and snippets.

View aojea's full-sized avatar

Antonio Ojea aojea

View GitHub Profile
@aojea
aojea / e2e_kubernetes.sh
Created October 29, 2020 14:16
Run e2e test in kubernetes
cd $GOPATH/src/k8s.io/kubernetes
make WHAT="test/e2e/e2e.test vendor/github.com/onsi/ginkgo/ginkgo"
# export KUBECONFIG=${HOME}/kind.conf
export GINKGO_PARALLEL=y
export KUBERNETES_CONFORMANCE_TEST='y'
export KUBE_CONTAINER_RUNTIME=remote
@aojea
aojea / README.md
Last active September 21, 2025 12:04
upgrade kind kubernetes cluster
@aojea
aojea / README.md
Last active October 14, 2020 17:06

How to repro

Deploy a service with endpoints using hostNetwork: true

kubectl apply -f https://gist.githubusercontent.com/aojea/ee37cc43f2513afbf5918c7ffddd807d/raw/b01b800b333539044d9c81eab232edab9fd5718a/svc-hostnet.yml

Create an UDP service too, using that deployment

Run a container to probe the service:

@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

@aojea
aojea / kind-config.yaml
Created September 30, 2020 12:50
kind configuration example
# three node (two workers) cluster config
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
networking:
serviceSubnet: 10.96.0.0/16
ipFamily: ipv4
nodes:
- role: control-plane
- role: worker
- role: worker
@aojea
aojea / etcdclient.yml
Last active November 28, 2023 07:48
etcdclient for using on kind deployments (full credit to maulioin) https://mauilion.dev/posts/etcdclient/
apiVersion: v1
kind: Pod
metadata:
creationTimestamp: null
labels:
component: etcdclient
tier: debug
name: etcdclient
namespace: default
spec:
@aojea
aojea / svc-hostnet.yml
Last active September 18, 2020 10:31
kubernetes deployment with hostnetwork and nodeport service
apiVersion: apps/v1
kind: Deployment
metadata:
name: hostnet-deployment
labels:
app: MyApp
spec:
replicas: 3
selector:
matchLabels:
@aojea
aojea / Dockerfile
Last active April 3, 2025 11:17
Using crio runtime in KIND
ARG IMAGE=kindest/node
ARG VERSION=1.19
ARG MINOR=1
ARG OS=xUbuntu_20.04
FROM ${IMAGE}:v${VERSION}.${MINOR}
ARG VERSION
ARG OS
@aojea
aojea / README.md
Created August 17, 2020 20:47
Emulate network connection on KIND clusters

KIND network emulation

Configuration parameters

  • Network bandwidth rate
  • Network latency
  • Packet loss rate

Requirements

@aojea
aojea / svc-tcp-udp.yaml
Last active January 22, 2024 07:43
Test UDP and TCP service
apiVersion: apps/v1
kind: Deployment
metadata:
name: server-deployment
labels:
app: MyApp
spec:
replicas: 2
selector:
matchLabels: