This message was deleted.
# rke2
a
This message was deleted.
a
Copy code
apiVersion: <http://networking.k8s.io/v1|networking.k8s.io/v1>
kind: NetworkPolicy
metadata:
  creationTimestamp: '2023-06-15T20:26:47Z'
  generation: 5
  managedFields:
    - apiVersion: <http://networking.k8s.io/v1|networking.k8s.io/v1>
      fieldsType: FieldsV1
      fieldsV1:
        f:spec:
          f:ingress: {}
          f:policyTypes: {}
      manager: agent
      operation: Update
      time: '2023-06-15T21:52:00Z'
  name: test
  namespace: default
  resourceVersion: '1056223'
  uid: 720a6828-aad9-46b6-9296-6bef9924e2f4
spec:
  ingress:
    - from:
        - ipBlock:
            cidr: 0.0.0.0/0
      ports:
        - port: 80
          protocol: TCP
  podSelector: {}
  policyTypes:
    - Ingress
status: {}
I tried to add a network policy but that did not solve the issue
I tried with both calico and cilium
c
you said you’re seeing an arp request, but didn’t mention if there’s a response? If there’s no response, then something might be wrong with the metallb configuration. Do you see a response coming from the metallb speaker pods?
a
Hi, not sure but I don't see any response from speakers
I think I got it
I created an L2advertissement and it worked
but why it work out of box with k3s with metallb but not rke2
is it due to ip was assigned by metallb in k3s while klipper did the advertissment ?
c
hard to say. you really shouldn’t use metallb and servicelb side by side, you generally only want one loadbalancer controller active in a cluster unless you’re careful about it.
a
I'm pretty new to kube 😅
from what I understood service of type loadbalancer is to get an external ip from loadbalancer
c
yes, but metallb and servicelb are both loadbalancers
it doesn’t have to be external; both of the ones you’re working with here are not external
a
I don't get it 😅
without metal lb how could I access to service of type load balancer from outside the cluster
Copy code
apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: whoami-daemonset
spec:
  selector:
    matchLabels:
      app: whoami
  template:
    metadata:
      labels:
        app: whoami
    spec:
      containers:
      - name: whoami
        image: traefik/whoami
---
apiVersion: v1
kind: Service
metadata:
  name: whoami
spec:
  selector:
    app: whoami
  ports:
    - protocol: TCP
      port: 80
      targetPort: 80
  type: LoadBalancer
as example ?
c
You mentioned that you were previously using k3s, which comes with servicelb, If you didn’t disable that when deploying metallb, then you had two loadbalancer controllers running, which can cause problems.
a
ah ok
c
On RKE2. you need to either manually enable servicelb, or deploy something else like metallb. It doesn’t have a loadbalancer controller by default
a
in fact I had no issue with 2 lb in k3s (but not optimal) while with only metallb on rke2 I have (solved since ~1 hour)
thanks for the extra advice 🙂