kube-vip / kube-vip

Kubernetes Control Plane Virtual IP and Load-Balancer
https://kube-vip.io
Apache License 2.0
1.95k stars 218 forks source link

kube-vip announcing k3s nodeips as vips #836

Open oliver-hofmann-cistec-com opened 2 months ago

oliver-hofmann-cistec-com commented 2 months ago

Describe the bug Not really a bug, but mybe woth a note in the docs. When set svc_enable to true, kube-vip will announce the loadbalancer ips that where entered by k3s. It was not an issue for us, but at some point it all went south. It is strange that we cannot reproduce it. If we understood something wrong let us know.

To Reproduce

Expected behavior

Screenshots

Environment (please complete the following information):

Kube-vip.yaml:

apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: kube-vip-primary
  namespace: kube-system
spec:
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app.kubernetes.io/name: kube-vip-ds-primary
  template:
    metadata:
      creationTimestamp: null
      labels:
        app.kubernetes.io/name: kube-vip-ds-primary
        app.kubernetes.io/version: v0.6.4
    spec:
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
            - matchExpressions:
              - key: node-role.kubernetes.io/master
                operator: Exists
            - matchExpressions:
              - key: node-role.kubernetes.io/control-plane
                operator: Exists
      containers:
      - args:
        - manager
        env:
        - name: vip_arp
          value: "true"
        - name: port
          value: "6443"
        - name: vip_cidr
          value: "32"
        - name: cp_enable
          value: "true"
        - name: cp_namespace
          value: kube-system
        - name: vip_ddns
          value: "false"
        - name: svc_enable
          value: "true"
        - name: vip_leaderelection
          value: "true"
        - name: vip_leaseduration
          value: "5"
        - name: vip_renewdeadline
          value: "3"
        - name: vip_retryperiod
          value: "1"
        - name: address
          value: ...
        - name: prometheus_server
          value: :2110
        image: ghcr.io/kube-vip/kube-vip:v0.6.4
        imagePullPolicy: Always
        name: kube-vip
        resources: {}
        securityContext:
          capabilities:
            add:
            - NET_ADMIN
            - NET_RAW
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
      dnsPolicy: ClusterFirst
      hostNetwork: true
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      serviceAccount: kube-vip
      serviceAccountName: kube-vip
      terminationGracePeriodSeconds: 30
      tolerations:
      - effect: NoSchedule
        operator: Exists
      - effect: NoExecute
        operator: Exists
  updateStrategy:
    rollingUpdate:
      maxSurge: 0
      maxUnavailable: 1
    type: RollingUpdate
phynics commented 2 months ago

I encountered the same issue on nixos with default daemonset config, sans static interface.

Environment: