Quick Start
This topic describes the quick start steps to install KubeSlice Enterprise using kubeslice-cli and log into the KubeSlice Manager.
Prerequisites
- Install kubeslice-cli. For installation instructions, see Install kubeslice-cli.
- Have the kubeconfig files of the clusters that you want to use for KubeSlice Enterprise installation. You need at least two clusters: one cluster to act as a controller cluster and another cluster to act as a worker cluster.
- You met the prerequisites for installing KubeSlice Enterprise on the clusters. For more information, see KubeSlice Enterprise Installation Prerequisites.
Kubeslice Installation through kubeslice-cli
Create the topology configuration file using the following template to install KubeSlice Enterprise on clusters:
configuration:
cluster_configuration:
kube_config_path: <path to kubeconfig file>
controller:
name: <cluster name acting as controller>
context_name: <controller cluster context name>
workers:
- name: <cluster name>
context_name: <cluster context name>
- name: <cluster name>
context_name: <cluster context name>
kubeslice_configuration:
project_name: <create project name>
helm_chart_configuration:
repo_alias: kubeslice
repo_url: https://kubeslice.aveshalabs.io/repository/kubeslice-helm-ent-prod/
cert_manager_chart:
chart_name: cert-manager
controller_chart:
chart_name: kubeslice-controller
worker_chart:
chart_name: kubeslice-worker
"metrics.insecure": true
ui_chart:
chart_name: kubeslice-ui
image_pull_secret: #{The image pull secrets. Optional for OpenSource, required for enterprise}
registry: https://index.docker.io/v1/
username: '<username from registration email>'
password: '<password from registration email>'
email: '<email provided during registration>'
Apply the Topology YAML File
Use the following command to apply the topology YAML file:
kubeslice-cli --config <path-to-the-topology.yaml> install
Retrieve the KubeSlice Manager Endpoint
Use the following command to retrieve the KubeSlice Manager endpoint:
kubeslice-cli get ui-endpoint -c <path-to-custom-topology-file>
Example Output:
https://<Node-IP>:<Node-Port>
KubeSlice Manager Login
To log into the KubeSlice Manager (enterprise Manager UI), you need a service account token-based kubeconfig file. The default admin user account can be used for initial login.
Create a Service Account Token-based Kubeconfig File
Follow the below instructions using the script provided to create the service account token-based kubeconfig file to log into the KubeSlice Manager.
Kubeconfig Generation Script
Copy and paste the script provided below in a file called 'kube-configs.sh'.
# The script returns a kubeconfig for the service account.
# you need to have kubectl on PATH with the context set to the cluster you want to create the config file.
# Cosmetics for the created config
clusterName=$1
# your server address goes here get it via `kubectl cluster-info`
server=$2
# the Namespace and ServiceAccount name that is used for the config
namespace=$3
serviceAccount=$4
######################
# actual script starts
set -o errexit
secretName=$(kubectl --namespace $namespace get serviceAccount $serviceAccount -o jsonpath='{.secrets[0].name}')
ca=$(kubectl --namespace $namespace get secret/$secretName -o jsonpath='{.data.ca\.crt}')
token=$(kubectl --namespace $namespace get secret/$secretName -o jsonpath='{.data.token}' | base64 --decode)
echo "
---
apiVersion: v1
kind: Config
clusters:
- name: ${clusterName}
cluster:
certificate-authority-data: ${ca}
server: ${server}
contexts:
- name: ${serviceAccount}@${clusterName}
context:
cluster: ${clusterName}
namespace: ${namespace}
user: ${serviceAccount}
users:
- name: ${serviceAccount}
user:
token: ${token}
current-context: ${serviceAccount}@${clusterName}
Get the Secrets
Use the following command to get the secrets for the Service Account and redirect to an output file called kubeconfig:
sh kube-configs.sh <controller-cluster-name> <controller-endpoint> kubeslice-<projectname> <serviceaccount-name> > kubeconfig'''
Access the Kubeslice Manager using the Kubeconfig File
Go to the URL that you have retrieved as described in the KubeSlice Manager Endpoint.
On the login page, for Enter Service Account Token, copy the token from the kubeconfig file that you have generated from the script and paste the service account token.
Alternatively, drop or upload your kubeconfig file that you have created above in the text box below that states Drop your KubeConfig file in the box or Click here to upload.
Click Sign in. After a successful authentication, you see the dashboard of the KubeSlice Manager as the landing page.