cozystack icon indicating copy to clipboard operation
cozystack copied to clipboard

Add kube-ovn troubleshooting guide

Open kvaps opened this issue 1 year ago • 1 comments

Describe

How to check databases state:

https://github.com/kubeovn/kube-ovn/blob/f11820f8cbc6baf6be77882fe9afbd1c0fc84527/dist/images/ovn-healthcheck.sh

How initialization and leadership election is happen:

https://github.com/kubeovn/kube-ovn/blob/f11820f8cbc6baf6be77882fe9afbd1c0fc84527/dist/images/start-db.sh#L79-L84

kvaps avatar Jan 29 '24 09:01 kvaps

Job to cleanup state:

apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: ovn-cleanup
  namespace: cozy-kubeovn
spec:
  selector:
    matchLabels:
      app: ovn-cleanup
  template:
    metadata:
      labels:
        app: ovn-cleanup
        component: network
        type: infra
    spec:
      affinity:
        podAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
          - labelSelector:
              matchLabels:
                app: ovn-central
            topologyKey: "kubernetes.io/hostname"
      containers:
      - name: cleanup
        image: busybox
        command: ["/bin/sh", "-xc", "rm -rf /host-config-ovn/*; exec sleep infinity"]
        volumeMounts:
        - name: host-config-ovn
          mountPath: /host-config-ovn
      nodeSelector:
        kubernetes.io/os: linux
        node-role.kubernetes.io/control-plane: ""
      tolerations:
      - operator: "Exists"
      volumes:
      - name: host-config-ovn
        hostPath:
          path: /var/lib/ovn
          type: ""
      hostNetwork: true
      restartPolicy: Always
      terminationGracePeriodSeconds: 1

kvaps avatar May 06 '24 09:05 kvaps