I have a single node setup on AWS ubuntu instance using microk8s with ingress controller enabled by using
microk8s.enable ingress.
Which has added the following service:
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
default-http-backend ClusterIP 10.152.183.50 <none> 80/TCP 8m47s
and the following deployment:
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
default-http-backend 1 1 1 1 10m
which I belive is the ingress controller.
Now when I try to create the following ingress:
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: basic-ingress
spec:
backend:
serviceName: nodeserver
servicePort: 7070
The ADDRESS is not assigned to the ingress
kubectl get ingress
NAME HOSTS ADDRESS PORTS AGE
basic-ingress * 80 12m
Is there anything specific to AWS loadbalancers that needs to be configured? Or anything that I am missing in the configuration?
I tried installing nginx ingress controller saperately but same issue with that.
Hi @yasiemir,
I am not sure what you want to achive with the ingress rule you provided. Here is how we expect ingress to be used in the microk8s.
As soon as you do a microk8s.enable ingress the ingres controller and the default backend should start.
> microk8s.kubectl get all --all-namespaces jackal-VGN-FZ11M: Mon Oct 22 18:16:02 2018
NAMESPACE NAME READY STATUS RESTARTS AGE
default pod/default-http-backend-587b7d64b5-2jjp9 1/1 Running 0 2m31s
default pod/nginx-ingress-microk8s-controller-w5rml 1/1 Running 0 2m31s
NAMESPACE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
default service/default-http-backend ClusterIP 10.152.183.197 <none> 80/TCP 2m31s
default service/kubernetes ClusterIP 10.152.183.1 <none> 443/TCP 89m
NAMESPACE NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
default daemonset.apps/nginx-ingress-microk8s-controller 1 1 1 1 1 <none> 2m31s
NAMESPACE NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
default deployment.apps/default-http-backend 1 1 1 1 2m31s
NAMESPACE NAME DESIRED CURRENT READY AGE
default replicaset.apps/default-http-backend-587b7d64b5 1 1 1 2m31s
Now, let's say you create a deployment (microbot), a coresponding service and you want to expose it through ingress.
microk8s.kubectl create -f https://raw.githubusercontent.com/ubuntu/microk8s/master/tests/templates/ingress.yaml
The ingress rule looks like this:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: microbot-ingress
spec:
rules:
- host: microbot.127.0.0.1.xip.io
http:
paths:
- path: /
backend:
serviceName: microbot
servicePort: 80
You can see the rule created here:
> microk8s.kubectl get ingress
NAME HOSTS ADDRESS PORTS AGE
microbot-ingress microbot.127.0.0.1.xip.io 80 44s
If you point your browser at http://microbot.127.0.0.1.xip.io/ (or do a wget from the machine on AWS) you should get the microbot.
If you do not get the ingress controller with microk8s.enable ingress then something is wrong. Please, attach the logs tarball you will get with microk8s.inspect so we can have a better view of what is happening.
Thank you for using microk8s.
Hi @ktsakalozos,
Thanks for the comment and sorry for the naive question, I am extremely new to kubernetes and microk8s.
What I wanted to achieve with the ingress rule was to define a backend for default host and access that from outside. While adding the host and path works from inside the node, there is no external IP ADDRESS assigned to the ingress, so there's no way to access it from outside. And it is supposed to spawn a loadbalancer in AWS which is not being created. That is what I was enquiring regarding AWS specific load loadbalancer configuration. How do I make microk8s create loadbalancers in the underlying
cloud provider?
Currently, there is no integration with AWS (or any other cloud provider). You will need to create any loadbalancers manually.
This is an interesting feature we might consider implementing in the future. Thank you for the suggestion.
I am +1 to seeing this added as a feature. As we use microk8s in different ways, it's becoming clear that we need to be able to use it more robustly. For example, I spin up a VM in a cloud and use microk8s for development, or a demo. I want to be able to expose an endpoint and poke at it outside of the machine.
I hit the same wall just now.
Currently, there is no integration with AWS (or any other cloud provider). You will need to create any loadbalancers manually.
I thought that was something that Kubernetes does for you already. i.e. reading at the source code I see that it should be the case: https://github.com/kubernetes/kubernetes/pull/24569
So what version of Kubernetes does microk8s run exactly? I thought it was vanilla k8s.
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.
Do we still not have pluggable cloud providers in microK8s? MetalLB just doesn't work on AWS, for example.
Most helpful comment
Currently, there is no integration with AWS (or any other cloud provider). You will need to create any loadbalancers manually.
This is an interesting feature we might consider implementing in the future. Thank you for the suggestion.