Evolutionary Algorithm
Configuring Evolutionary Algorithm
Krkn-AI is configured using a simple declarative YAML file. This file can be automatically generated using Krkn-AI’s discover feature, which creates a config file from a boilerplate template. The generated config file will have the cluster components pre-populated based on your cluster.
The config file has two layers: top-level settings that apply regardless of the optimization algorithm, and algorithm-specific sections scoped under their own key. The algorithm field selects which engine to use (currently only genetic), and all parameters for that engine live under the corresponding section:
kubeconfig_file_path: "./tmp/kubeconfig.yaml"
wait_duration: 120
algorithm: genetic # algorithm selector
genetic: # all genetic algorithm parameters live here
generations: 20
population_size: 10
# ...
fitness_function:
query: 'sum(kube_pod_container_status_restarts_total)'
type: point
scenario:
pod-scenarios:
enable: true
cluster_components:
namespaces: [...]
nodes: [...]
Backward compatibility: Config files using the old flat layout (GA fields at root level) are still supported — they are automatically migrated on load.
See the subsections below for detailed documentation of each config block.
Configuring Evolutionary Algorithm
Configuring Fitness Function
Configuring Stopping Criteria for the Genetic Algorithm
Configuring Application Health Checks
Available Krkn-AI Scenarios
Configuring output formatters
Configuring Elasticsearch for Krkn-AI results storage