Skip to content

Mizar Cluster Health Criteria

Vinay Kulkarni edited this page Mar 21, 2022 · 8 revisions

Mizar Cluster Health Criteria

The following criteria defines the parameters that measure health of a single Kubernetes or single Arktos cluster with Mizar.

  1. The following CRDs have been created and are in Provisioned state for a cluster that has N nodes.

    Resource Name Notes
    vpcs.mizar.com 1 per cluster
    subnets.mizar.com 1 per cluster
    droplets.mizar.com 1 per node
    dividers.mizar.com 1 per cluster
    bouncers.mizar.com N/2 per cluster
    endpoints.mizar.com 1 per running pod
  2. A Kubernetes or Arktos cluster that containing 1 master node and at-least 5 worker nodes is successfully deployed. Successful deployment with Mizar implies the following conditions are met:

    • All the nodes in the cluster are in Ready state, have internal IP, and optionally have external IP.
    • All the kube-system Pods (kube-apiserver, kube-controller-manager, kube-scheduler, etcd, coredns) have been deployed, have IP address, and are in Running state without any restarts.
    • Mizar daemonset has been deployed, and mizar-daemon pods have been created on each node, have IP address, and are in Running state without restarts.
    • Mizar operator deployment has been deployed, mizar-operator pod has been created, has IP accress, and is in Running state without restarts.
  3. Pod connectivity has been verified by successfully deploying netpod.yaml (below) and ensuring that netpod1, netpod2, and netpod3 can ping each other.

  4. Service connectivity has been verified after deploying netpod.yaml and ensuring the following:

    • curl :7000 can load-balance HTTP to all three pods - netpod1, netpod2, netpod3
    • nc 9001 can load-balance UDP to all three pods - netpod1, netpod2, netpod3
    • nc -u 5001 can load-balance TCP to all three pods - netpod1, netpod2, netpod3
  5. The below netpod.yaml pod deployment is deleted and created successfully 5 times. Each time upon delete, all the pod objects are terminated and removed. Each time upon create, all three pod objects are in Running state, have IP, and can ping each other.

  6. Passes the Network Policy health criteria (TODO: Cathy to update details)


netpod.yaml

apiVersion: v1
kind: Pod
metadata:
  name: netpod1
  labels:
    app: netpod
    podkey: netpodkey1
spec:
  restartPolicy: OnFailure
  terminationGracePeriodSeconds: 10
  containers:
  - name: netctr
    image: mizarnet/testpod
    ports:
    - containerPort: 9001
      protocol: TCP
    - containerPort: 5001
      protocol: UDP
    - containerPort: 7000
      protocol: TCP
---
apiVersion: v1
kind: Pod
metadata:
  name: netpod2
  labels:
    app: netpod
spec:
  affinity:
    podAntiAffinity:
      requiredDuringSchedulingIgnoredDuringExecution:
      - labelSelector:
          matchExpressions:
          - key: podkey
            operator: In
            values:
            - netpodkey1
        topologyKey: kubernetes.io/hostname
  restartPolicy: OnFailure
  terminationGracePeriodSeconds: 10
  containers:
  - name: netctr
    image: mizarnet/testpod
    ports:
    - containerPort: 9001
      protocol: TCP
    - containerPort: 5001
      protocol: UDP
    - containerPort: 7000
      protocol: TCP
---
apiVersion: v1
kind: Pod
metadata:
  name: netpod3
  labels:
    app: netpod
spec:
  affinity:
    podAffinity:
      requiredDuringSchedulingIgnoredDuringExecution:
      - labelSelector:
          matchExpressions:
          - key: podkey
            operator: In
            values:
            - netpodkey1
        topologyKey: kubernetes.io/hostname
  restartPolicy: OnFailure
  terminationGracePeriodSeconds: 10
  containers:
  - name: netctr
    image: mizarnet/testpod
    ports:
    - containerPort: 9001
      protocol: TCP
    - containerPort: 5001
      protocol: UDP
    - containerPort: 7000
      protocol: TCP
---
apiVersion: v1
kind: Service
metadata:
  name: netsvc
spec:
  selector:
    app: netpod
  ports:
    - name: tcpapp
      protocol: TCP
      port: 9001
      targetPort: 9001
    - name: udpapp
      protocol: UDP
      port: 5001
      targetPort: 5001
    - name: httpapp
      protocol: TCP
      port: 7000
      targetPort: 7000

netpod-single-node.yaml

apiVersion: v1
kind: Pod
metadata:
  name: netpod1
  labels:
    app: netpod
spec:
  restartPolicy: OnFailure
  terminationGracePeriodSeconds: 10
  containers:
  - name: netctr
    image: mizarnet/testpod
    ports:
    - containerPort: 9001
      protocol: TCP
    - containerPort: 5001
      protocol: UDP
    - containerPort: 7000
      protocol: TCP
---
apiVersion: v1
kind: Pod
metadata:
  name: netpod2
  labels:
    app: netpod
spec:
  restartPolicy: OnFailure
  terminationGracePeriodSeconds: 10
  containers:
  - name: netctr
    image: mizarnet/testpod
    ports:
    - containerPort: 9001
      protocol: TCP
    - containerPort: 5001
      protocol: UDP
    - containerPort: 7000
      protocol: TCP

Test Pod for 1-master 1-worker cluster

apiVersion: v1
kind: Pod
metadata:
  name: netpod1
  labels:
    app: netpod
    podkey: netpodkey1
spec:
  tolerations:
    - effect: NoSchedule
      operator: Exists
  restartPolicy: OnFailure
  terminationGracePeriodSeconds: 10
  containers:
  - name: netctr
    image: mizarnet/testpod
    ports:
    - containerPort: 9001
      protocol: TCP
    - containerPort: 5001
      protocol: UDP
    - containerPort: 7000
      protocol: TCP
---
apiVersion: v1
kind: Pod
metadata:
  name: netpod2
  labels:
    app: netpod
spec:
  tolerations:
    - effect: NoSchedule
      operator: Exists
  affinity:
    podAntiAffinity:
      requiredDuringSchedulingIgnoredDuringExecution:
      - labelSelector:
          matchExpressions:
          - key: podkey
            operator: In
            values:
            - netpodkey1
        topologyKey: kubernetes.io/hostname
  restartPolicy: OnFailure
  terminationGracePeriodSeconds: 10
  containers:
  - name: netctr
    image: mizarnet/testpod
    ports:
    - containerPort: 9001
      protocol: TCP
    - containerPort: 5001
      protocol: UDP
    - containerPort: 7000
      protocol: TCP