K8sbykeshed / k8s-service-validator

Kubernetes Network Service Validator
22 stars 10 forks source link

Workload folder move and binding nodes #8

Closed knabben closed 3 years ago

knabben commented 3 years ago

There's a kind cluster with 3 workers + 1 master. Pods created in the running nodes.

x-20878              pod-2                                        4/4     Running             0          2s      10.244.2.13   kind-worker          <none>           <none>
x-20878              pod-1                                        4/4     Running             0          2s      10.244.0.11   kind-control-plane   <none>           <none>
x-20878              pod-3                                        4/4     Running             0          2s      10.244.1.13   kind-worker2         <none>           <none>
x-20878              pod-4                                        4/4     Running             0          2s      10.244.3.38   kind-worker3         <none>           <none>

Matrix generated on cross-node tests between pods


-       x-20878/pod-1   x-20878/pod-2   x-20878/pod-3   x-20878/pod-4
x-20878/pod-1   .       .       .       .   
x-20878/pod-2   .       .       .       .   
x-20878/pod-3   .       .       .       .   
x-20878/pod-4   .       .       .       .   

176 <nil>
observed:

-       x-20878/pod-1   x-20878/pod-2   x-20878/pod-3   x-20878/pod-4
x-20878/pod-1   .       .       .       .   
x-20878/pod-2   .       .       .       .   
x-20878/pod-3   .       .       .       .   
x-20878/pod-4   .       .       .       .   

176 <nil>
comparison:

-       x-20878/pod-1   x-20878/pod-2   x-20878/pod-3   x-20878/pod-4
x-20878/pod-1   .       .       .       .   
x-20878/pod-2   .       .       .       .   
x-20878/pod-3   .       .       .       .   
x-20878/pod-4   .       .       .       .   
knabben commented 3 years ago
  1. Fetching all nodes in ready status (maybe we need to check for taints).
  2. Create len(nodes) pods in models (pod-n).
  3. When creating the Kubernetes Pod object, use a new nodeName for each pod created.
  4. Should fail if len(nodes) <= 1.
  5. Do the probe with correctly spread pods across existent nodes.