multicluster

command
v0.0.0-...-fb22114 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2022 License: Apache-2.0, Apache-2.0 Imports: 1 Imported by: 0

README

Multicluster plugin

The Multicluster plugin allows to simulate multiple Kubernetes cluster deployed across internet, and emulate latency, packet drops and bandwith constraints.

Usage

 ./multicluster -h
Simulate multicluster deployments using KIND clusters

Usage:
  multicluster [command]

Available Commands:
  create      Create a multicluster cluster
  delete      Delete the multicluster cluster
Create

The plugin define the cluster topology using a configuration file like this:

clusters:
  cluster-us: 
    nodes: 2
    nodeSubnet: "172.88.0.0/16"
    podSubnet: "10.196.0.0/16"
    serviceSubnet: "10.96.0.0/16"
  cluster-eu:
    nodes: 2
    nodeSubnet: "172.89.0.0/16"
    podSubnet: "10.197.0.0/16"
    serviceSubnet: "10.97.0.0/16"

You can create a multicluster deployment:

 ./multizone create --config config.yaml
Creating cluster "kind" ...
WARNING: Overriding docker network due to KIND_EXPERIMENTAL_DOCKER_NETWORK
WARNING: Here be dragons! This is not supported currently.
 ✓ Ensuring node image (aojea/kindnode:1.22rc) 🖼
 ✓ Preparing nodes 📦 📦 📦  

That will create 2 KIND clusters in its independent networks. It will also create a container that will act as gateway for those networks. This container is a WAN emulator, that will allow the user to specify the latency, packet drops and bandwith for each fo the clusters.

docker ps
CONTAINER ID   IMAGE                        COMMAND                  CREATED         STATUS         PORTS                       NAMES
330fcede9fb3   kindest/node:v1.20.2         "/usr/local/bin/entr…"   3 seconds ago   Up 1 second    127.0.0.1:39959->6443/tcp   cluster-eu-control-plane
5db3e1cd057a   kindest/node:v1.20.2         "/usr/local/bin/entr…"   3 seconds ago   Up 1 second                                cluster-eu-worker
0279df468048   quay.io/aojea/wanem:latest   "sleep infinity"         4 seconds ago   Up 4 seconds                               wan-kind
Delete

Delete removes all the resources created.

./multicluser delete --config config.yml

Documentation

Overview

Copyright © 2021 NAME HERE <EMAIL ADDRESS>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL