Scheduling Pods
Once KNS-3 is deployed, you opt individual pods into network-aware scheduling by setting schedulerName: kns-3-scheduler. The default Kubernetes scheduler continues to handle all other pods.
Basic Usage
Section titled “Basic Usage”Add schedulerName: kns-3-scheduler to the pod spec:
apiVersion: v1kind: Podmetadata: name: my-podspec: schedulerName: kns-3-scheduler containers: - name: app image: my-app:latestKNS-3 will query the NS-3 simulator to score all candidate nodes based on live network metrics, then bind the pod to the highest-scoring node.
QoS Annotation
Section titled “QoS Annotation”Pods can declare a network quality-of-service requirement with the kns-3-scheduler/qos annotation.
| Value | Behaviour |
|---|---|
rigorous |
The filter plugin requires candidate nodes to carry the label capability=rigorous. Nodes without that label are excluded before scoring. |
apiVersion: v1kind: Podmetadata: name: latency-sensitive-pod annotations: kns-3-scheduler/qos: rigorousspec: schedulerName: kns-3-scheduler containers: - name: app image: my-app:latestTo mark a node as capable of rigorous QoS, add the label:
kubectl label node <node-name> capability=rigorousDisabling KNS-3 on a Node
Section titled “Disabling KNS-3 on a Node”To prevent KNS-3 from scheduling any pods onto a specific node, add the scheduler=disabled label:
kubectl label node <node-name> scheduler=disabledThe filter plugin will mark that node as Unschedulable for all KNS-3-managed pods.
Using with Deployments
Section titled “Using with Deployments”Set schedulerName in the pod template of the Deployment:
apiVersion: apps/v1kind: Deploymentmetadata: name: my-deploymentspec: replicas: 3 selector: matchLabels: app: my-app template: metadata: labels: app: my-app spec: schedulerName: kns-3-scheduler containers: - name: app image: my-app:latestEach replica is scheduled independently, so pods may land on different nodes depending on the simulation results at that point in time.
