gardener / machine-controller-manager-provider-azure

This repository is the out of tree implementation of the machine driver for Azure cloud provider
Apache License 2.0
8 stars 27 forks source link
azure machine-controller-manager

machine-controller-manager-provider-azure

REUSE status

Out of tree (controller based) implementation for Azure as a new provider.

About

The Azure Out Of Tree provider implements the interface defined at MCM OOT driver.

Fundamental Design Principles:

Following are the basic development principles for this external plugin:

Usage of the Azure OOT

  1. Open terminal pointing to $GOPATH/src/github.com/gardener. Clone this repository.

  2. Navigate to $GOPATH/src/github.com/gardener/machine-controller-manager-provider-azure.

    • In the MAKEFILE make sure that

      • $TARGET_KUBECONFIG points to the kubeconfig file of the cluster where you wish to manage machines. This points to the shoot cluster in the context of Gardener.
      • $CONTROL_KUBECONFIG points to the kubeconfig file of the cluster which holds these machine CRs. This points to the seed cluster in the context of Gardener.
      • $CONTROL_NAMESPACE represents the namespaces where MCM is looking for machine CR objects.
    • Run the machine controller (driver) using the command below.

      make start
  3. On the second terminal pointing to $GOPATH/src/github.com/gardener,

    • Clone the latest MCM code
      git clone git@github.com:gardener/machine-controller-manager.git
    • Navigate to the newly created directory.
      cd machine-controller-manager
    • Deploy the required CRDs from the machine-controller-manager repo,
      kubectl apply -f kubernetes/crds.yaml
    • Run the machine-controller-manager
      make start
  4. On the third terminal pointing to $GOPATH/src/github.com/gardener/machine-controller-manager-provider-azure

    Fill in the object files given below and deploy them as described below:

    • Deploy kubernetes secret for Azure.

      kubectl apply -f kubernetes/secret.yaml
    • Deploy MachineClass

      kubectl apply -f kubernetes/machine-class.yaml
    • Deploy Machine object and make sure it joins the cluster successfully.

      kubectl apply -f kubernetes/machine.yaml
    • Once machine joins, you can test by deploying a machine-deployment.

    • Deploy the MachineDeployment object and make sure it joins the cluster successfully.

      kubectl apply -f kubernetes/machine-deployment.yaml
    • Make sure to delete both the Machine and MachineDeployment object after use.

      kubectl delete -f kubernetes/machine.yaml
      kubectl delete -f kubernetes/machine-deployment.yaml

Support for a new provider