Skip to content

Installation

This guide walks through deploying KNS-3 to a Kubernetes cluster and verifying that the scheduler is running.

  • A running Kubernetes cluster. Minikube works for local development.
  • kubectl configured to point at your cluster.
  • Docker, for building and pushing images.
  1. Clone the repository

    Terminal window
    git clone https://gitlab.com/gkepas/kns-3.git
    cd kns-3
  2. Apply all manifests

    Terminal window
    make deploy

    This applies the following manifests in order and waits for the deployment to become ready:

    Manifest Purpose
    k8s/namespace.yaml Creates the kns-3 namespace
    k8s/rbac.yaml Service accounts and cluster role bindings
    k8s/exporters.yaml kns-3-prometheus, node-exporter DaemonSet, and blackbox-exporter
    k8s/configmap.yaml Scheduler configuration (KubeSchedulerConfiguration)
    k8s/deployment.yaml The scheduler and simulator containers
  3. Verify the deployment

    Terminal window
    make status

    You should see the kns-3 deployment with both containers (kns-3-scheduler and kns-3-simulator) ready.

  4. Schedule a test pod

    Terminal window
    kubectl apply -f k8s/test-pod.yml
    kubectl get pod test-nginx-kns-3 -o wide

    The pod should be assigned to a node. Check the scheduler logs to see the simulation scores that drove the placement decision:

    Terminal window
    make logs

To iterate on the scheduler locally, use make run. This builds the Docker image, loads it directly into Minikube’s image cache (bypassing the registry), and restarts the deployment:

Terminal window
make run

To follow the live scheduler logs:

Terminal window
make logs
Terminal window
make undeploy

This deletes all KNS-3 resources, including the namespace, RBAC, exporters, ConfigMap, and Deployment.

If you prefer to apply manifests individually:

Terminal window
kubectl apply -f k8s/namespace.yaml
kubectl apply -f k8s/rbac.yaml
kubectl apply -f k8s/exporters.yaml
kubectl apply -f k8s/configmap.yaml
kubectl apply -f k8s/deployment.yaml
kubectl wait --for=condition=available --timeout=300s deployment/kns-3 -n kns-3