risk-advisor

by joaquinito2051

Helm chartv2.0.4App 1.0.0

Risk Advisor add-on module for Kubernetes

About this chart

risk-advisor

Risk advisor module for Kubernetes. This project is licensed under the terms of the Apache 2.0 license.

It allows you to check how the cluster state would change if the request of creating provided pods was accepted by Kubernetes.

TL;DR

$ helm install <helm-repo>/risk-advisor

$ helm install stable/risk-advisor

Introduction

This is a tool for operators of large Kubernetes cluster to help them foresee how adding new pods to the cluster will change the cluster state, especially which nodes will they be scheduled on and if there's enough resources in the cluster.

Prerequisites

  • Kubernetes 1.5, no guarantees for other versions, however it should work properly

Installing the Chart

To install the chart with the release name my-release:

$ helm install --name my-release <helm-repo>/risk-advisor

$ helm install --name my-release stable/risk-advisor

Uninstalling the Chart

To uninstall/delete the my-release deployment:

$ helm delete my-release

The command removes all the Kubernetes components associated with the chart and deletes the release.

Configuration

The following table lists the configurable parameters of the aws-cluster-autoscaler chart and their default values.

ParameterDescriptionDefault
replicaCountdesired number of risk-advisor pods1
image.repositoryrisk-advisor container image repositorypposkrobko/risk-advisor
image.tagrisk-advisor container image tagv1.0.0
image.pullPolicyrisk-advisor container image pull policyIfNotPresent
service.typeservice typeNodePort
service.targetPortexposed port of risk-advisor pod9997
service.portin-cluster exposed port of risk-advisor service9997
service.nodePortexposed external port accessible from outside the cluster31111

Usage

Chart exposes a service with a REST API on 11111 port, accepting following endpoints:

  • /advise:
    • Accepts: a JSON table containing pod definitions
    • Returns: a JSON table of scheduling results. Each result contains:
      • podName: (string) Name of the relevant pod
      • result: (string) Scheduled if the pod would be successfully scheduled, failedScheduling otherwise
      • message: (string) Additional information about the result (e.g. nodes which were tried, or the reason why scheduling failed)
  • /healthz Health check endpoint, responds with HTTP 200 if successful

Deploy risk-advisor with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has risk-advisor on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartrisk-advisor is pinned at v2.0.4 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply