question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MetalLB *can* work in MacOS

See original GitHub issue

Contrary to canonical/multipass#1298, #908 -

I have MetalLB working on MacOS with multipass/microk8s just fine, and my config looks similar-ish to the config generated by the microk8s add-on (I just installed metallb manually).

Caveats:

  • metallb doesn’t respond to regular ICMP ping, from MacOS or from within the Linux VM
  • arping doesn’t seem to work, even from inside the Multipass Linux VM. This kinda indicates that MacOS isn’t really the problem on that one.

I can curl the endpoint behind my LB service that’s running on microk8s in multipass

chris@mandalore   ~  curl http://192.168.64.51
<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Kashti</title>

  <link rel="apple-touch-icon" sizes="128x128" href="assets/images/icons/default/apple-touch-icon.png">
  <link rel="icon" type="image/png" sizes="32x32" href="assets/images/icons/default/favicon-32x32.png">
  <link rel="icon" type="image/png" sizes="16x16" href="assets/images/icons/default/favicon-16x16.png">

  <base href="/">

  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="icon" type="image/x-icon" href="favicon.ico">
<link rel="stylesheet" href="styles.56bbad704999d16e724b.css"></head>
<body>
  <app-root></app-root>
<script type="text/javascript" src="runtime.a66f828dca56eeb90e02.js"></script><script type="text/javascript" src="polyfills.086a5b637f757f4c448b.js"></script><script type="text/javascript" src="scripts.f8a41137d5ecf8dd31f5.js"></script><script type="text/javascript" src="main.b2e8a34247df00f0cab7.js"></script></body>
</html>

Here’s the load balancer resource:

 chris@mandalore   ~  kubectl get svc brigade-server-kashti -n brigade-system
NAME                    TYPE           CLUSTER-IP       EXTERNAL-IP     PORT(S)        AGE
brigade-server-kashti   LoadBalancer   10.152.183.165   192.168.64.51   80:31538/TCP   25m

MetalLB config:

 chris@mandalore   ~  kubectl get configmap -n metallb-system config -o yaml --export
Flag --export has been deprecated, This flag is deprecated and will be removed in future.
apiVersion: v1
data:
  config: |
    address-pools:
    - name: default
      protocol: layer2
      addresses:
      - 192.168.64.50-192.168.64.100
kind: ConfigMap
metadata:
  annotations:
    fluxcd.io/sync-checksum: 64a621d53c13252b2b280090f14f999639501b7a
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"v1","data":{"config":"address-pools:\n- name: default\n  protocol: layer2\n  addresses:\n  - 192.168.64.50-192.168.64.100\n"},"kind":"ConfigMap","metadata":{"annotations":{"fluxcd.io/sync-checksum":"64a621d53c13252b2b280090f14f999639501b7a"},"labels":{"fluxcd.io/sync-gc-mark":"sha256.NIaJeDs6KJDSCWGRnkxjLiQ59w_zuuD52O_bGy9jD84"},"name":"config","namespace":"metallb-system"}}
  creationTimestamp: null
  labels:
    fluxcd.io/sync-gc-mark: sha256.NIaJeDs6KJDSCWGRnkxjLiQ59w_zuuD52O_bGy9jD84
  managedFields:
  - apiVersion: v1
    fieldsType: FieldsV1
    fieldsV1:
      f:data:
        .: {}
        f:config: {}
      f:metadata:
        f:annotations:
          .: {}
          f:fluxcd.io/sync-checksum: {}
          f:kubectl.kubernetes.io/last-applied-configuration: {}
        f:labels:
          .: {}
          f:fluxcd.io/sync-gc-mark: {}
    manager: kubectl
    operation: Update
    time: "2020-04-11T02:35:45Z"
  name: config
  selfLink: /api/v1/namespaces/metallb-system/configmaps/config

If I have some time tomorrow, I’ll provide more examples, and possibly make an attempt to see if this works with the microk8s plugin, as I would expect it to

CC/ @candlerb for information/discussion

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:17

github_iconTop GitHub Comments

1reaction
candlerbcommented, Jul 1, 2020

I don’t think so. As mentioned above, HyperKit networking is broken in macOS 10.14 anyway. Two HyperKit VMs on the same network can’t ARP for each other’s IP aliases. This problem reproduces without even bringing metallb into the equation.

I think this issue can be closed, as it’s nothing that microk8s or metallb can fix.

0reactions
stale[bot]commented, May 28, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

KIND and Load Balancing with MetalLB on Mac
If you execute it with sudo, the interface will be created under the root user, and the functionality will not work. Once the...
Read more >
MetalLB *can* work in MacOS · Issue #1107 - GitHub
I have MetalLB working on MacOS with multipass/microk8s just fine, and my config looks similar-ish to the config generated by the microk8s add- ......
Read more >
Kubernetes Metal LB for Docker for Mac/Windows in 10 Minutes
In this quickstart with Metal LB we will quickly get an on-prem / bare metal load balancer running on Kubernetes (k8s) with the...
Read more >
Running KubeCF using KIND on MacOS - Stark & Wayne
We'll be using metallb as a LoadBalancer resource and open up a local route so that MacOS can route traffic locally to the...
Read more >
K3s with k3d and MetalLB - Kubernauts
... show you how MetalLB can work with k3d launched k3s clusters on Mac too (Linux users are lucky, MetalLB works out of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found