Extend KIND networking capabilities with plugins using the KIND API

kind-networking-plugins

Plugins to extend KIND networking capabilities with plugins using the KIND API

These plugins were used for the Kubecon EU 2021 presentation [Kubernetes Advanced Networking Testing with KIND](./Kubernetes_Advanced_Networking_Testing _with_KIND_Antonio_Ojea_Kubecon_2021.pdf)

Overview

KIND is a tool for running local Kubernetes clusters using Docker container “nodes”.

KIND was primarily designed for testing Kubernetes itself, but may be used for local development or CI. This requires a strong focus in stability and resilience, thus adding new features is complicated. However, KIND exposes an API that can be leveraged for automation.

In the other hand, testing networking is always complicated, because it requires more complex scenarios to be able to cover all the features. Traditionally, this was difficult to automate, but nowadays, current virtualization techniques, like containers and virual networks make it possible.

This repository contains some example plugins to demonstrate how to extend KIND and automate complex Kubernetes clusters.

Multicluster

The multicluster plugin allows to simulate multicluster environments, deploying independent clusters, and emulating the WAN between those cluster, so the user can define the bandwith, latency and the error rate.

Usage

Multizone

The multizone plugin simulates a Cluster deployed across multiple availability zones.

Usage

Baremetal

The baremetal plugins demonstrates how to extend current KIND configuration to create new networks in the cluster.

Usage

Owner
Antonio Ojea
The network is reliable. Latency is zero, Bandwidth is infinite, ..
Antonio Ojea
Similar Resources

A cli HackerNews reader, using HackerNews API.

HackerReader STILL WIP A cli HackerNews reader, using the HackerNews API. I mainly created this as a way to play around with Bubble Tea, Lip Gloss, an

Feb 13, 2022

Trakt-cli - A CLI for trakt.tv using the trakt.tv API

Trakt-cli - A CLI for trakt.tv using the trakt.tv API

trakt-cli ████████╗██████╗ █████╗ ██╗ ██╗████████╗ ██████╗██╗ ██╗ ╚══

Dec 27, 2022

Simple RESTful API for WhatsApp in Golang (using the Whatsmeow multi device library)

Simple RESTful API for WhatsApp in Golang (using the Whatsmeow multi device library)

WUZAPI WuzAPI is an implementation of @tulir/whatsmeow library as a simple RESTful API service with multiple device support and concurrent sessions. W

Dec 30, 2022

Go library for accessing the MyAnimeList API: http://myanimelist.net/modules.php?go=api

go-myanimelist go-myanimelist is a Go client library for accessing the MyAnimeList API. Project Status The MyAnimeList API has been stable for years a

Sep 28, 2022

Go client for the YNAB API. Unofficial. It covers 100% of the resources made available by the YNAB API.

YNAB API Go Library This is an UNOFFICIAL Go client for the YNAB API. It covers 100% of the resources made available by the YNAB API. Installation go

Oct 6, 2022

An API client for the Notion API implemented in Golang

An API client for the Notion API implemented in Golang

Dec 30, 2022

lambda-go-api-proxy makes it easy to port APIs written with Go frameworks such as Gin to AWS Lambda and Amazon API Gateway.

aws-lambda-go-api-proxy makes it easy to run Golang APIs written with frameworks such as Gin with AWS Lambda and Amazon API Gateway.

Jan 6, 2023

A API scanner written in GOLANG to scan files recursively and look for API keys and IDs.

GO FIND APIS _____ ____ ______ _____ _ _ _____ _____ _____ _____ / ____|/ __ \ | ____|_ _| \ | | __ \ /\ | __ \_

Oct 25, 2021

The NVD API is an unofficial Go wrapper around the NVD API.

NVD API The NVD API is an unofficial Go wrapper around the NVD API. Supports: CVE CPE How to use The following shows how to basically use the wrapper

Jan 7, 2023
Comments
  • cannot use brLink as type *netlink.Bridge

    cannot use brLink as type *netlink.Bridge

    # from kind-networking-plugins/multicluster
    
    go build
    
    # github.com/aojea/kind-networking-plugins/pkg/network
    ../pkg/network/network.go:34:30: cannot use brLink (type netlink.Link) as type *netlink.Bridge in argument to netlink.LinkSetMaster: need type assertion
    # github.com/aojea/kind-networking-plugins/pkg/docker
    ../pkg/docker/network.go:86:15: undefined: netlink.VethPeerIndex
    ../pkg/docker/network.go:146:9: undefined: netlink.RouteReplace
    

    go 1.16.3 MacOS

  • How to enable the topology aware hints

    How to enable the topology aware hints

    thanks for this repo. It really helped me. I'm trying to enable the topology aware hints on k8s, and I'm testing with 1.23.6 but can't figure out how. I have followed your setup and enable it on API server, controller manager and kube-proxy but I still can't see any hints on the endpointslice. I'm using your demo.txt to setup the deployment and service. I was wondering if you could shed some lights.

    here is my config on kube-proxy, API server and controller manager

    apiVersion: v1
    data:
      config.conf: |-
        apiVersion: kubeproxy.config.k8s.io/v1alpha1
        bindAddress: 0.0.0.0
        bindAddressHardFail: false
        clientConnection:
          acceptContentTypes: ""
          burst: 0
          contentType: ""
          kubeconfig: /var/lib/kube-proxy/kubeconfig.conf
          qps: 0
        clusterCIDR: 10.244.0.0/16
        configSyncPeriod: 0s
        conntrack:
          maxPerCore: 0
          min: null
          tcpCloseWaitTimeout: 0s
          tcpEstablishedTimeout: 0s
        detectLocalMode: ""
        enableProfiling: false
        featureGates:
          TopologyAwareHints: true
    
    
    apiVersion: v1
    kind: Pod
    metadata:
      annotations:
        kubeadm.kubernetes.io/kube-apiserver.advertise-address.endpoint: 192.168.49.2:8443
      creationTimestamp: null
      labels:
        component: kube-apiserver
        tier: control-plane
      name: kube-apiserver
      namespace: kube-system
    spec:
      containers:
      - command:
        - kube-apiserver
        - --advertise-address=192.168.49.2
        - --allow-privileged=true
        - --authorization-mode=Node,RBAC
        - --client-ca-file=/var/lib/minikube/certs/ca.crt
        - --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota
        - --enable-bootstrap-token-auth=true
        - --etcd-cafile=/var/lib/minikube/certs/etcd/ca.crt
        - --etcd-certfile=/var/lib/minikube/certs/apiserver-etcd-client.crt
        - --etcd-keyfile=/var/lib/minikube/certs/apiserver-etcd-client.key
        - --etcd-servers=https://127.0.0.1:2379
        - --feature-gates=TopologyAwareHints=true
        - --kubelet-client-certificate=/var/lib/minikube/certs/apiserver-kubelet-client.crt
        - --kubelet-client-key=/var/lib/minikube/certs/apiserver-kubelet-client.key
        - --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname
        - --proxy-client-cert-file=/var/lib/minikube/certs/front-proxy-client.crt
        - --proxy-client-key-file=/var/lib/minikube/certs/front-proxy-client.key
        - --requestheader-allowed-names=front-proxy-client
        - --requestheader-client-ca-file=/var/lib/minikube/certs/front-proxy-ca.crt
        - --requestheader-extra-headers-prefix=X-Remote-Extra-
        - --requestheader-group-headers=X-Remote-Group
        - --requestheader-username-headers=X-Remote-User
        - --secure-port=8443
        - --service-account-issuer=https://kubernetes.default.svc.cluster.local
        - --service-account-key-file=/var/lib/minikube/certs/sa.pub
        - --service-account-signing-key-file=/var/lib/minikube/certs/sa.key
        - --service-cluster-ip-range=10.96.0.0/12
        - --tls-cert-file=/var/lib/minikube/certs/apiserver.crt
        - --tls-private-key-file=/var/lib/minikube/certs/apiserver.key
        image: k8s.gcr.io/kube-apiserver:v1.23.6
    
    apiVersion: v1
    kind: Pod
    metadata:
      creationTimestamp: null
      labels:
        component: kube-controller-manager
        tier: control-plane
      name: kube-controller-manager
      namespace: kube-system
    spec:
      containers:
      - command:
        - kube-controller-manager
        - --allocate-node-cidrs=true
        - --authentication-kubeconfig=/etc/kubernetes/controller-manager.conf
        - --authorization-kubeconfig=/etc/kubernetes/controller-manager.conf
        - --bind-address=127.0.0.1
        - --client-ca-file=/var/lib/minikube/certs/ca.crt
        - --cluster-cidr=10.244.0.0/16
        - --cluster-name=mk
        - --cluster-signing-cert-file=/var/lib/minikube/certs/ca.crt
        - --cluster-signing-key-file=/var/lib/minikube/certs/ca.key
        - --controllers=*,bootstrapsigner,tokencleaner
        - --feature-gates=TopologyAwareHints=true
        - --kubeconfig=/etc/kubernetes/controller-manager.conf
        - --leader-elect=false
        - --requestheader-client-ca-file=/var/lib/minikube/certs/front-proxy-ca.crt
        - --root-ca-file=/var/lib/minikube/certs/ca.crt
        - --service-account-private-key-file=/var/lib/minikube/certs/sa.key
        - --service-cluster-ip-range=10.96.0.0/12
        - --use-service-account-credentials=true
        image: k8s.gcr.io/kube-controller-manager:v1.23.6
    
Simple-Weather-API - Simple weather api app created using golang and Open Weather API key
Simple-Weather-API - Simple weather api app created using golang and Open Weather API key

Simple Weather API Simple weather api app created using golang and Open Weather

Feb 6, 2022
Simple CRUD API written in Go, built using AWS SAM tool and using the AWS' infrastructure.
Simple CRUD API written in Go, built using AWS SAM tool and using the AWS' infrastructure.

tutor-pet API Simple CRUD API written in Go, built using AWS SAM tool and using the AWS' infrastructure. Macro architecture: Code architecture: Pre-Re

Aug 17, 2022
Api-waf-example-cdk - Demo using sam to drive a CDK serverless api

CDK SAM Demo Demo using sam to drive a CDK serverless api Stack Setup go build -

Feb 5, 2022
Asteroids written in Golang using raylib using an ECS system.

Asteroids written in Golang using Raylib using an ECS system.

Feb 12, 2022
A simple todolist application API created using Golang

API Aplikasi KegiatanQ Merupakan API aplikasi todolist sederhana yang dibuat men

Dec 29, 2021
Pokemon Unite scoreboard HUD and extra tools running over captured game feeds using the OpenCV video processing API and Client/Server architecture.
Pokemon Unite scoreboard HUD and extra tools running over captured game feeds using the OpenCV video processing API and Client/Server architecture.

unite Pokemon Unite scoreboard HUD and extra tools running over captured game feeds using the OpenCV video processing API. Client (OBS Live) Server Ar

Dec 5, 2022
Todosappdeploy - Todos REST API build using echo server

Todos Week 5 - Project Todo List Todos REST API build using echo server. The cod

Jan 14, 2022
Feb 7, 2022
Total-go-shopify-graphql - A simple client using the Shopify GraphQL Admin API

A simple client using the Shopify GraphQL Admin API.

Jan 25, 2022
Simple translation tool using google translation api.

Translator Simple translation tool using google translation api. To use it you have to provide a valid service account as json file with path in the e

Feb 1, 2022