aks/

directory
v1.2.1-0...-abfdf54 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: Apache-2.0

README

AKS Service

The InfraBox AKS Service can be used to dynamically provision a Kubernetes Cluster for an InfraBox job.

Usage

{
    "version": 1,
    "jobs": [{
        "type": "docker",
        "name": "hello-kubernetes",
        "build_only": false,
        "docker_file": "infrabox/hello-kubernetes/Dockerfile",
        "resources": {
            "limits": { "cpu": 1, "memory": 1024 }
        },
        "services": [{
            "apiVersion": "azure.service.infrabox.net/v1alpha1",
            "kind": "AKSCluster",
            "metadata": {
                "name": "my-cluster"
            },
            "spec": {
                "diskSize": 100,
                "machineType": "Standard_DS2_v2",
                "numNodes": 3,
                "zone": "westeurope"
            }
        }]
    }]
}

The AKS Cluster credentials will be available under /var/run/infrabox.net/services/<service-name>/ (in the example above the service name is my-cluster) as files:

  • admin.conf

You may configure kubectl in your job as follows:

#!/bin/bash -e
SERVICE_NAME="my-cluster"

export KUBECONFIG="/var/run/infrabox.net/services/$SERVICE_NAME/admin.conf"

kubectl get nodes

Install

To install the service in your Kubernetes cluster you have to first create a Azure service principal and then add credentials to infrabox-service-aks/values.yaml:

Now use helm to install the AKS Service.

cd infrabox-service-aks
helm install --namespace infrabox-system -n infrabox-service-aks .

Directories

Path Synopsis
cmd
pkg
apis/azure/v1alpha1
Package v1alpha1 contains API Schema definitions for the azure v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=azure.service.infrabox.net
Package v1alpha1 contains API Schema definitions for the azure v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=azure.service.infrabox.net

Jump to

Keyboard shortcuts

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