Sample Configuration File
This topic describes how to create a topology configuration file that is used to install KubeSlice. In the topology configuration file, specify the controller cluster and the worker clusters names and other details as described in the below sample configuration file.
Create a Topology Configuration File for Kind Clusters
The following is the sample configuration file to install KubeSlice on kind clusters using opensource charts:
In this demonstration, we use a controller cluster with name controller
, as well as two worker clusters with the
names worker-1
and worker-2
. Add the path to the relevant kubeconfig
file. kubeslice-avesha
serves as an example of a
project namespace. The defined cluster context are kind-controller
, kind-worker-1
, and kind-worker-2
. The opensource
KubeSlice repo charts URL is https://kubeslice.github.io/kubeslice/
.
Create the topology configuration file using the following template:
For more information on topology configuration parameters, see kubeslice-cli Configuration Parameters.
configuration:
cluster_configuration:
kube_config_path: <path-to-the-kubeconfig-file>
controller:
name: controller
context_name: kind-controller
kube_config_path: <path-to-the-controller-kubeconfig-file>
workers:
- name: worker-1
context_name: kind-worker-1
- name: worker-2
context_name: kind-worker-2
kube_config_path: <path-to-the-worker-kubeconfig-file>
kubeslice_configuration:
project_name: kubeslice-avesha
helm_chart_configuration:
repo_alias: kubeslice
repo_url: https://kubeslice.github.io/kubeslice/
cert_manager_chart:
chart_name: cert-manager
controller_chart:
chart_name: kubeslice-controller
worker_chart:
chart_name: kubeslice-worker
Create a Topology Configuration File for Cloud Clusters
The following is the sample configuration YAML to install KubeSlice on cloud clusters using opensource charts.
In this demonstration, we use a controller cluster with name controller
, as well as two worker clusters with the names worker-1
and worker-2
. Add the path to the relevant kubeconfig
file. avesha
serves as an example of a project namespace. The defined
cluster context are controller
, worker-1
, and worker-2
. The opensource KubeSlice repo charts
URL is https://kubeslice.github.io/kubeslice/
.
Create the topology YAML file using the following template:
For more information on topology configuration parameters, see kubeslice-cli Configuration Parameters.
configuration:
cluster_configuration:
kube_config_path: #{specify the kube config file to use for topology setup; for topology only}
controller:
name: controller
context_name: arn:aws:eks:us-east-1:776106081964:cluster/controller-eks-1
kube_config_path: /home/user/kuebconfig-eks-1.config
#{This takes precedence over configuration.cluster_configuration.kube_config_path}
control_plane_address: #{the address of the control plane kube-apiserver. slicectl determines the address from kubeconfig}
#{Override this flag if the address in kubeconfig is not reachable by other clusters in topology}
node_ip: #{the IP address of one of the node in this cluster. slicectl determines this address from kubectl get nodes}
#{Override this flag to an address which is discoverable by other clusters in the topology}
workers: #{specify the list of worker clusters}
- name: worker-1
context_name: arn:aws:eks:us-east-1:776106081964:cluster/dev-richie-eks-1
kube_config_path: /home/user/kuebconfig-eks-1.config
#{This takes precedence over configuration.cluster_configuration.kube_config_path}
control_plane_address: #{the address of the control plane kube-apiserver. slicectl determines the address from kubeconfig}
#{Override this flag if the address in kubeconfig is not reachable by other clusters in topology}
node_ip: #{the IP address of one of the node in this cluster. slicectl determines this address from kubectl get nodes}
#{Override this flag to an address which is discoverable by other clusters in the topology}
- name: worker-2
context_name: gke_avesha-dev_us-central1-a_dev-richie-gke-2
kube_config_path: /home/user/kuebconfig-gke-2.config
#{This takes precedence over configuration.cluster_configuration.kube_config_path}
control_plane_address: #{the address of the control plane kube-apiserver. slicectl determines the address from kubeconfig}
#{Override this flag if the address in kubeconfig is not reachable by other clusters in topology}
node_ip: #{the IP address of one of the node in this cluster. slicectl determines this address from kubectl get nodes}
#{Override this flag to an address which is discoverable by other clusters in the topology}
kubeslice_configuration:
project_name: avesha
helm_chart_configuration:
repo_alias: kubeslice
repo_url: https://kubeslice.github.io/kubeslice/
cert_manager_chart:
chart_name: cert-manager
version:
controller_chart:
chart_name: kubeslice-controller
version: #{The version of the chart to use. Leave blank for latest version}
worker_chart:
chart_name: kubeslice-worker
version: #{The version of the chart to use. Leave blank for latest version}
Apply the Topology Configuration YAML
To install KubeSlice using the topology YAML file, use the following command:
kubeslice-cli --config <path-to-the-topology.yaml> install