Skip to main content
Version: 0.4.0

Create a Slice

The YAML file to create a slice for the registered kind worker clusters are described in this topic.

Create the Slice YAML File

After successfully registering the worker clusters with the KubeSlice Controller, create a slice to onboard your application namespaces. You can create a slice across the multiple clusters or intra-cluster.

Slice Configuration

Create the slice configuration .yaml file using the following template.


If you want to add a standard QoS profile configuration for multiple slices, create a standard QoS profile. Add the name of the external QoS profile as the value of standardQosProfileName in the slice configuration YAML file.

In a slice configuration YAML file, the standardQosProfileName parameter and the qosProfileDetails object are mutually exclusive.


To understand more about the configuration parameters, see Slice Configuration Parameters.

kind: SliceConfig
name: <SLICENAME> # water
namespace: kubeslice-<project name>
maxClusters: <2 - 32> #Ex: 5. By default, the maxClusters value is set to 16
sliceType: Application
sliceGatewayType: OpenVPN
sliceCaType: Local
sliceIpamType: Local
- <worker cluster 1> # kind-worker-1
- <worker cluster 2> # kind-worker-2
queueType: HTB
priority: 1
bandwidthCeilingKbps: 5120
bandwidthGuaranteedKbps: 2560
dscpClass: AF11
- namespace: iperf
- '*'
isolationEnabled: false #make this true in case you want to enable isolation
- namespace: kube-system
- '*'

Apply the Slice Configuration on the Controller Cluster

The following information is required to apply the slice configuration.

<cluster name>The name of the cluster.
<slice configuration>The name of the slice configuration file.
<project name>The project name on which you apply the slice configuration file.

You must apply the slice configuration .yamlfile on the project name.

Switch context to the KubeSlice Controller using the following command:

kubectx <cluster name>

Run the following command to apply the YAML file on the project:

kubectl apply -f <slice-configuration>.yaml -n kubeslice-<project name>

You have successfully created a slice with the registered clusters. All the slice configuration are applied at the KubeSlice Controller level.

Create a QoS Profile

The slice configuration file contains a QoS profile object. To apply a QoS profile to multiple slices, you can create a separate QOS profile YAML file and call it out in other slice configuration.

Validate the Slice

Validate the slice configuration on the controller and worker clusters.

Validate the Slice Configuration from the Controller Cluster

Validate the slice configuration from the controller cluster using the following command:

kubectl get sliceconfig -n kubeslice-<project name>

Expected Output

water 35s

Validate the slice configuration in the KubeSlice Controller using the following command:

kubectl get workersliceconfig -n kubeslice-<project name>


kubectl get workerslicegateway -n kubeslice-avesha

Expected Output

NAME                                              AGE
water-dev-worker-cluster-1-dev-worker-cluster-2 45s
water-dev-worker-cluster-2-dev-worker-cluster-1 45s

Validate the Slice Configuration from the Worker Cluster

Validate the slice creation on the worker clusters using the following command on each worker cluster:

kubectl get slice -n kubslice-system

Example Output

water 45s

Validate the slice gateway on each worker cluster using the following command:

kubectl get slicegw -n kubeslice-system

Example Output

NAME                                SUBNET        REMOTE SUBNET   REMOTE CLUSTER   GW STATUS
water-kind-worker-1-kind-worker-2 kind-worker-2