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.

Exposing microK8s to cloud load balancers

See original GitHub issue

MicroK8s is running on 3 EC2 instances in HA mode with Traefik 2 as ingress controller stuck with <pending> for it’s External IP.

I spent all of Friday writing Terraform rules to create an AWS Network Load Balancer and now I’m uncertain if microK8s supports even the minimum --cloud provider: external flag in which to interface with these externally provided resources. I’m curious if others have gotten this to work. To be clear, I’m using Traefik 2 installed with helm3 but you could test this using the native ingress addon too. You can add this flag to /var/snap/microk8s/current/arg under the kubelet, apiserver and controller files then restart microK8s with microk8s stop and microk8s start.

Now I’m wondering first of all if adding an AWS NLB using Terraform or manually as demonstrated here is even supported and, if it is, if there is perhaps a simpler way, in terms of reducing my own maintenance overhead, such as installing Juju and using its aws-integrator charm, which includes support for AWS Network Load Balancers (provisioning too?). This tutorial uses the kubernetes-core bundle in addition to microK8s to enable AWS integration. It’s unclear if it works with exclusively microk8s clusters as in my scenario.

To be clear, --cloud-provider=aws would be the simplest solution but is unsupported by microK8s and will result in your node failing to switch to Ready status.

One question users might ask is, “why don’t you just use EKS?” To which my answer is, I’m exploring a full-stack Canonical product pipeline (with an eye toward purchasing Ubuntu Advantage) using minimum viable resources on Big Cloud.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:2
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
Bessonovcommented, Oct 14, 2021

activity

2reactions
joshbranhamcommented, Nov 17, 2020

I had to do more than that, the provider ID was needed too (which I get from ec2 metadata)

microk8s kubectl patch node \
    "$host" \
    --patch '{"spec":{"providerID":"'"$providerid"'"}}'

echo "> Setting command line args"
echo "--cloud-provider=aws" >> /var/snap/microk8s/current/args/kube-apiserver
echo "--cloud-provider=aws" >> /var/snap/microk8s/current/args/kubelet
echo "--cloud-provider=aws" >> /var/snap/microk8s/current/args/kube-controller-manager
echo "--provider-id=$providerid" >> /var/snap/microk8s/current/args/kubelet
Read more comments on GitHub >

github_iconTop Results From Across the Web

Exposing microK8s to cloud load balancers #1720 - GitHub
MicroK8s is running on 3 EC2 instances in HA mode with Traefik 2 as ingress controller stuck with <pending> for it's External IP....
Read more >
How to expose Microk8s containers, so they are available ...
As describe here: LoadBalancer: Exposes the Service externally using a cloud provider's load balancer. NodePort and ClusterIP Services, to which ...
Read more >
Addon: MetalLB - MicroK8s
MetalLB Loadbalancer is a network LB implementation that tries to “just work” on bare metal clusters. When you enable this add on you...
Read more >
Using Kubernetes for internal infrastructure - Keath Milligan
Port forwarding; Service ingress; Using a load balancer ... Microk8s is a full-featured Kubernetes that supports multi-node ...
Read more >
Enable AWS Network Load Balancer on a microK8s cloud ...
MicroK8s does not, on its own, support auto-provisioning of cloud load balancers. Juju has the aws-integrator charm. In a microk8s-exclusive ...
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