The KubeSlice Controller orchestrates the creation and management of slices on worker clusters. It is strongly recommended to use a released version. Follow the instructions provided in this document.
For more information, see getting started with kind clusters.
- Go (version 1.17 or later) installed and configured in your machine (Installing Go)
- Docker installed and running in your local machine
- A running
kind
cluster kubectl
installed and configured
- Clone the latest version of kubeslice-controller from the
master
branch.
git clone https://github.com/kubeslice/kubeslice-controller.git
cd kubeslice-controller
- Adjust image name variable
IMG
in theMakefile
to change the docker tag to be built. Default image is set asIMG ?= aveshasystems/kubeslice-controller:latest
. Modify this if required.
make docker-build
- Loading kubeslice-controller Image Into Your Kind Cluster (
link
) If needed, replaceaveshasystems/kubeslice-controller
with your locally built image name in the previous step. See loading an image into your cluster
kind load docker-image aveshasystems/kubeslice-controller --name kind
- Check the loaded image in the cluster. Modify node name if required.
docker exec -it kind-control-plane crictl images
To install:
- Create a self-signed certificate for the webhook server.
make webhookCA
or
kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.7.0/cert-manager.yaml
- First check all the cert-manager pods are up and running then run the following command to deploy
kubeslice-controller
to the kind cluster with all the CRDs:
make deploy
- For checking the logs of the pods, run the following command: (pod-name would start with
kubeslice-controller-manager-
)
kubectl logs -f {pod-name} -n kubeslice-controller
- We have some sample manifests yaml file under
/config/sample
. - Run the following commands:
kubectl apply -f config/samples/controller_v1alpha1_project.yaml
kubectl apply -f config/samples/controller_v1alpha1_cluster.yaml -n=kubeslice-cisco
kubectl apply -f config/samples/controller_v1alpha1_sliceconfig.yaml -n=kubeslice-cisco
After running this command it will generate a report under coverage-report/report.html
open this on your browser for the coverage report
make unit-test
# delete all the projects
kubectl delete project --all
# uninstall all the resources
make undeploy
Apache License 2.0