Priyank Upadhyay
Senior Software Engineer, Avesha
6 June, 2023,
5 min read
TL;DR: In this blog post, we discussed how our engineering team addressed the challenges posed by the manual installation process of the Worker Operator. By introducing KubeSlice's Auto Mode, users can now register their clusters by simply uploading the kubeconfig file, eliminating the need for complex manual steps. This automated installation offers several advantages, including simplified user experience, consistent and error-free installations, easy customization options, and simplified troubleshooting. With the automated installation process, users can focus on utilizing the KubeSlice's capabilities without the hassle of manual setup, leading to increased efficiency and productivity.
In the ever-evolving landscape of software engineering, streamlining processes and automating tasks are paramount to enhancing efficiency and productivity. One such area that our engineering team tackled was the installation of the Worker Operator, a critical component in managing and orchestrating slice operation on a worker cluster. In this blog post, we will delve into how we automated the process of Worker Operator installation through UI, revolutionizing the way our users interact with KubeSlice.
With the release of KubeSlice Enterprise v0.11.0, worker clusters can now be registered with KubeSlice simply by uploading a Kubeconfig file of the cluster. KubeSlice installs the worker operator on the cluster, avoiding the need for manual installation.
Installing the Worker Operator was once a laborious and intricate process that posed significant challenges for our users. Manual installation involved a series of complex steps, requiring a deep understanding of the underlying architecture and meticulous execution. This cumbersome approach often resulted in errors, inconsistencies, and a substantial investment of time and effort.
After verifying the mandatory prerequisites, a user would have to undergo the following steps to perform a successful worker-operator installation:
Recognizing the need for a more streamlined solution, our engineering team set out to revolutionize the installation process and simplify it for our users.
With the introduction of Auto Mode, now a user can simply upload a kubeconfig file for the cluster and Kubeslice manager will take care of the rest.
After logging in with KubeSlice Manager
The cluster status will transition from InProgress > Pending > Registered after all the Slice Operator components are up and running.
User can also click on the show logs button to view real time logs of the installation process.
Let see what happens after the user clicks the Import Cluster button.
Architectural flow of auto register job
The implementation is pretty straightforward. A worker-chart-options config map is created at the time of KubeSlice Manager installation, which contains customization options for worker-operator installation. We will discuss more about the configurations later.
Once a user uploads kubeconfig file with access to the worker cluster, UI sends an API request to the API-GW which then:
The job is responsible to perform the worker-operator installation. The installer job performs the following:
A user can customize some options before installing Worker operator using the Auto Mode. You can edit or modify the worker-chart-options parameters in the ConfigMap file located in the kubeslice-controller namespace in the controller cluster for a customized worker installation.
To edit a ConfigMap file:
kubectx <controller cluster-name>
kubeslice-controller
namespace.kubectl edit configmap woker-chart-options
The following are the customization options supported:
workerChartOptions:
metricsInsecure: # [Optional] Default is false. Set to true if required to disable TLS for metrics server.
repository: # [Optional] Helm repository URL for worker charts. Default is `https://kubeslice.aveshalabs.io/repository/kubeslice-helm-ent-prod/`
releaseName: # [Optional] Release name of kubeslice-worker. Default is `kubeslice-worker`
chartName: # [Optional] Name of the chart. Default is `kubeslice-worker`
chartVersion: # [Optional] Version of the chart. Default is the latest version
debug: # [Optional] Default is false. Set to true if required to enable debug logs for kubeslice-worker
helmCredentials:
username: # [Optional]
password: # [Optional]
imagePullSecrets:
repository: # [Optional]
username: # [Optional]
password: # [Optional]
email: # [Optional]
Apart from removing the tediousness and manual efforts required to Install worker-operator, Auto Mode also eliminates errors and inconsistencies in the installation steps.
The user does not need to be aware of the underlying architecture to be able to perform the installation and start experiencing the benefits of KubeSlice.
Even a customised installation (eg a custom worker-operator version) can be done by simply editing the worker-chart-options config map present in the controller cluster under kubeslice-controller namespace.
Auto Mode makes it super easy to perform the installation, still one might encounter errors during the installation. The worker cluster might not have the node labeled with kubeslice.io/node-type=gateway, or the kubeconfig provided might not have correct access to install Helm charts. If the installer job gets any error during the installation, the status of the cluster is marked as failed.
What to do when Cluster status changes to failed
Verify the logs by clicking on the log icon. You can download the logs and share if raising a support ticket. To retry, delete the cluster and try again.
Visit our documentation for more troubleshooting tips: TROUBLESHOOTING | Avesha Docs
By empowering users with simplicity and efficiency, the automated installation process through KubeSlice's Auto Mode streamlines the experience and maximizes the productivity of our users. With the manual installation woes eliminated, users can fully leverage the power of the Worker Operator and focus on their core tasks.
Copied