risk-advisor
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.
| Parameter | Description | Default |
|---|---|---|
replicaCount | desired number of risk-advisor pods | 1 |
image.repository | risk-advisor container image repository | pposkrobko/risk-advisor |
image.tag | risk-advisor container image tag | v1.0.0 |
image.pullPolicy | risk-advisor container image pull policy | IfNotPresent |
service.type | service type | NodePort |
service.targetPort | exposed port of risk-advisor pod | 9997 |
service.port | in-cluster exposed port of risk-advisor service | 9997 |
service.nodePort | exposed external port accessible from outside the cluster | 31111 |
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 podresult: (string)Scheduledif the pod would be successfully scheduled,failedSchedulingotherwisemessage: (string) Additional information about the result (e.g. nodes which were tried, or the reason why scheduling failed)
/healthzHealth 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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartrisk-advisor is pinned at v2.0.4 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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