Starting from K3ai 0.2.0 we introduced a configuration file to allow a user to deploy various flavors of Kubernetes both locally and remotely.
The config file is typically saved in <yourhomedir>/.k3ai but could be moved around and/or hosted on other locations. We currently do not support remote config files.
A single config file may host multiple configurations, hence is capable to deploy multiple clusters at the same time.
The kind definition at the beginning of the config file indicates that all the pieces of information below are relative to the infrastructure deployment. We did this with the intention later to have the capability to split the config behavior and possibly call other config files.
-name: localK3s #name of the cluster instance not the name of the cluster
linux:"https://get.k3s.io | K3S_KUBECONFIG_MODE=644 sh -s -"
name: is the instance name as an internal reference for K3ai. Is not currently used so it act as a placeholder right now
enabled: if set to true the section will be used and the cluster will be deployed
type: represent the cluster to be installed: k3s,k3d,k0s,kinD
clusterName: this is the name of the cluster (if applicable), it's useful to deploy multiple clusters of the same type
clusterDeployment: local or cloud. For the cloud specs see below.
spec: For each deployment, there are various options and binaries so dependening of where you're going to install we will take care of the right version+location. This is also useful if you want to test on a specific version.
plugins: repo is the URL where the plugin are hosted. If you are using the public ones you may leave it empty, name is the name of the plugin as it appears from k3ai-cli list currently we do not support groups yet in the config file.
Rancher K3s Config Specifics
#default location of config file or your existing config file to copy
We currently support only Civo Cloud. Notice that the cloudSecretPath is a placeholder we are going to add this feature but for the time being, you'll need to pass the key through the terminal directly.