Create No-Network Slices
This topic describes the steps to create a slice without overlay network (no-network). The worker clusters must be registered with the KubeSlice Controller to create a slice with no-network. For more information, see how to register worker clusters.
To leverage KubeSlice's capabilities to provide application oversight for services that are distributed across multiple clusters, select:
- Service Mapped Connectivity if your applications are distributed and require the ability to communicate, but do not have need of a dedicated overlay. The overlay network deployment mode associated with this type is multi network.
- Overlay Connectivity if your applications benefit from communication through a dedicated overlay network. The overlay network deployment mode associated with this type is single network.
- No Connectivity if your distributed applications do not require extended-cluster communication. The overlay network deployment mode associated with this type is no network.
Slice Creation with No-Network
In KubeSlice, the clusters are connected by an overlay network i.e, single-network or multi-network and managed by KubeSlice networking
components such as slice routers, slice gateways, envoy gateways, and istio gateways. Alternatively, the user can create a slice
without the inter-cluster connectivity by setting the parameter overlayNetworkDeploymentMode value to no-network
in the
slice configuration YAML file.
To know more about the configuration details, see slice parameters
The following is an example slice configuration file.
apiVersion: controller.kubeslice.io/v1alpha1
kind: SliceConfig
metadata:
name: beta
spec:
overlayNetworkDeploymentMode: "no-network"
sliceType: Application
clusters:
- cluster2
- cluster3
namespaceIsolationProfile:
isolationEnabled: true
applicationNamespaces:
- namespace: iperf
clusters:
- "*"
allowedNamespaces:
- namespace: test
clusters:
- "cluster2"
Apply Slice Configuration
The following information is required.
Variable | Description |
---|---|
<cluster name> | The name of the cluster. |
<slice configuration> | The name of the slice configuration file. |
<project namespace> | The project namespace on which you apply the slice configuration file. |
Perform these steps:
- Switch the context to the KubeSlice Controller using the following command:
kubectx <cluster name>
- Apply the YAML file on the project namespace using the following command:
kubectl apply -f <slice configuration>.yaml -n <project namespace>
Switch the Slice Overlay Network Deployment Mode
You can switch the slice overlay deployment mode from a no-network
to single-network
or multi-network
,
whereas you cannot switch from slice overlay deployment mode from a single-network
or multi-network
to a no-network
.
Upgrade Slice Operator on the Worker Cluster
To switch slice overlay network deployment mode from no-network to single-network or multi-network at run-time, ensure
the parameter kubesliceNetworking.enabled
value is true
for all participating worker clusters.
To verify if the KubeSlice networking is true for a participating worker cluster, run the following command on the KubeSlice Controller:
kubectl get cluster <cluster_name> -n <project_namespace> -o jsonpath='{.status.networkPresent}'
Example
kubectl get cluster aws -n kubeslice-avesha -o jsonpath='{.status.networkPresent}'
Example Output
true
If the KubeSlice Networking parameter value is false, update the kubesliceNetworking.enabled
parameter value
to true
in the slice-operator.yaml
and run the following helm upgrade
command on the participating worker clusters:
helm upgrade -i kubeslice-worker <path-to-the-charts>/kubeslice-worker -f <slice-operator.yaml> -n kubeslice-system --create-namespace --debug
If network connectivity is enabled on an existing slice (either single or multi network), then the slice will become unhealthy upon disabling the KubeSlice networking on any participating clusters.
Update the Slice Configuration YAML
In the slice configuration YAML, update the overlayNetworkDeploymentMode parameter value to single-network
or multi-network
,
add the networking parameters, and apply the slice configuration yaml on the controller cluster.
The following is an example slice configuration YAML.
apiVersion: controller.kubeslice.io/v1alpha1
kind: SliceConfig
metadata:
name: beta
spec:
overlayNetworkDeploymentMode: "single-network"
sliceType: Application
clusters:
- cluster2
- cluster3
namespaceIsolationProfile:
isolationEnabled: true
applicationNamespaces:
- namespace: iperf
clusters:
- "*"
allowedNamespaces:
- namespace: test
clusters:
- "cluster2"
# network fields to be configured while switching overlay type from no-network to single-network or multi-network.
sliceSubnet: 10.170.0.0/16
sliceGatewayProvider:
sliceGatewayType: OpenVPN
sliceCaType: Local
qosProfileDetails:
queueType: HTB
priority: 0
tcType: BANDWIDTH_CONTROL
bandwidthCeilingKbps: 30000
bandwidthGuaranteedKbps: 20000
dscpClass: AF11
sliceIpamType: Local