machine-controller-manager-provider-virtual

module
v0.0.0-...-c6a5c18 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0

README

machine-controller-manager-provider-virtual

A virtual provider for the Gardener Machine Controller Manager thar provides a Driver implementation that creates virtual k8s Nodes in a virtual shoot cluster. It can mimic AWS/GCP/Azure Nodes depending on the MachineClass. At the moment only AWS is supported. Helper scripts are also provided to setup and then launch a virtual cluster, MCM (machine-controller-manager), CA (cluster-autoscaler) as well as MC (this virtual machine-controller)

Usage

Setup
  1. CHeckout this project at $GOPATH/src/github.com/elankath/machine-controller-manager-provider-virtual
  2. Execute ./hack/setup.sh
  • This will setup download/build the binaries for the virtual cluster, MCM, MC, CA, hack, etc
  • You need to export LANDSCAPE, PROJECT and SHOOT env variables before running so that the MachineClasses and MachineDeployments can be copied from an existing gardener cluster.
  • It downloads relevant files into gen sub-dir of project. A env file with env variables are also generated at gen/env.
Launch

TODO: make a combined launch for convenience.

Open a shell with 4 windows.

  1. First Launch KVCL (mandatory) Execute ./hack/kvcl-launch.sh
  2. Launch MCM. ./hack/mcm-launch.sh
  3. Launch MC. ./hack/mc-launch.sh
  4. Launch CA. ./hack/ca-launch.sh

TODO: describe working in detail

CLI Use
  1. export KUBECONFIG=/tmp/kvcl.yaml
  2. Listing control plane objects
    1. kubectl config set-context --current --namespace=<SHOOT_NAMESPACE>
    2. kubectl get mcc,mcd,mc
NAME                                                             AGE
machineclass.machine.sapcloud.io/shoot--i034796--aw-a-z1-ccb6a   11m
machineclass.machine.sapcloud.io/shoot--i034796--aw-b-z1-44b8a   11m
machineclass.machine.sapcloud.io/shoot--i034796--aw-c-z1-c7d6c   11m

NAME                                                            READY   DESIRED   UP-TO-DATE   AVAILABLE   AGE
machinedeployment.machine.sapcloud.io/shoot--i034796--aw-a-z1   1       1         1            1           11m
machinedeployment.machine.sapcloud.io/shoot--i034796--aw-b-z1                                              11m
machinedeployment.machine.sapcloud.io/shoot--i034796--aw-c-z1                                              11m

NAME                                                              STATUS    AGE   NODE
machine.machine.sapcloud.io/shoot--i034796--aw-a-z1-c9478-99wwq   Running   11m   shoot--i034796--aw-a-z1-c9478-99wwq
  1. Listing data plane objects
    1. kubectl get no

Design

TODO

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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