Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ingress not working on AWS. #142

Closed
yasiemir opened this issue Oct 22, 2018 · 7 comments
Closed

Ingress not working on AWS. #142

yasiemir opened this issue Oct 22, 2018 · 7 comments
Labels

Comments

@yasiemir
Copy link

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.

@ktsakalozos
Copy link
Member

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.

@yasiemir
Copy link
Author

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?

@ktsakalozos
Copy link
Member

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.

@AdamIsrael
Copy link
Contributor

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.

@casidiablo
Copy link

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: kubernetes/kubernetes#24569

So what version of Kubernetes does microk8s run exactly? I thought it was vanilla k8s.

@stale
Copy link

stale bot commented Apr 4, 2020

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.

@stale stale bot added the inactive label Apr 4, 2020
@stale stale bot closed this as completed Jul 7, 2020
@worldofgeese
Copy link

Do we still not have pluggable cloud providers in microK8s? MetalLB just doesn't work on AWS, for example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants