Note: these steps apply to Linkderd installed via Microk8s. They should be adaptable to other environments, but I don’t have other installs to test against.
This is another possible variant to the instructions provided in the official MetalLB documentation. There are good reasons why to use something like Nginx for ingress, as it opens up various authentication possibilities. The approach documented here is just another variant of the Kustomize approach to change the
enforced-hosts value, but applying the change manually by a YAML rewrite.
There are 3 steps, which all have to happen in the linkerd namespace. First, create a service definition of type
LoadBalancer that uses the annotations defined in
apiVersion: v1 kind: Service metadata: name: linkerd-lb spec: ports: - name: http port: 80 protocol: TCP targetPort: 8084 selector: linkerd.io/control-plane-component: web linkerd.io/control-plane-ns: linkerd type: LoadBalancer
Next, output the YAML of the deployment by executing:
kubectl get deployment.apps/linkerd-web -o yaml > linkerdwebdeployment.yaml
Looks for the second occurrence of the ‘enforce-hosts’ strings in the yaml file (the first is in the annotation). Alter the RegEx to the value for me. As I’m running a test instance with a client getting IP addresses via DHCP, I set this to the (insecure!) wildcard value:
I actually deleted deployment.apps/linkerd-web rather than just applying the new version. Your mileage may vary here. It’s worth pointing out there is another service defined straight out of the box (service/linkerd-web) which you don’t need to change.
I had a couple of bites at this, and at one point uninstalled and reinstalled via the microk8s command line, which seems to work very cleanly.