You're on the right path – if the nginx ingress is working for you, great!
Testing against the node is a good way to verify that.

Once that's the case, you can add a Service with spec.type = LoadBalancer
that matches the nginx ingress. That way, you end up with the architecture
you want. You can then replace the existing Service that exposes your
service directly with one that's of spec.type = ClusterIP (I'm afraid it
won't be possible to gracefully downgrade it).

The example you linked seems a bit dated – it's using
ReplicationControllers instead of more elaborate deployment options like
Deployment or Daemonset. There is also an nginx-based ingress controller in
the Kubernetes org:

https://github.com/kubernetes/ingress-nginx

/MR

On Wed, Nov 1, 2017 at 1:45 PM bg303 <griffin...@gmail.com> wrote:

> All of this is on Google Cloud:
>
>
> I created a deployment with 3 replicas and then I created  Service with
> spec.type = LoadBalancer. This service gets a public IP address, which I
> point my DNS record to and everything works great. A new requirement is
> that the service must support SSL.
>
>
> I want to put nginx in front of the pod in the deployment. I read about
> Ingress and Ingress Controllers, watched this video (
> https://www.youtube.com/watch?v=L7JZdyJ8qJQ), and went through the
> associated tutorial (
> https://github.com/nginxinc/kubernetes-ingress/tree/master/examples/complete-example)
> but still do not understand how to do this.
>
> In the example above, the last step is to find the node on which the
> ingress controller is running and execute curls against that IP address. I
> interpret that to mean that should be the final address I use to point my
> DNS record to. That seems surprising because that is the IP address of my
> node. I really don't think I want my node's public IP address being
> directly exposed. I like having the LoadBalancer in front
>
> I *THINK* I want this architecture:
>
>  -> Load Balancer -> nginx (with SSL) -> node.js service
>
> Is that correct? If so, can someone explain how to have a Load Balancer
> direct traffic to nginx, and nginx direct traffic to my node.js service?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Kubernetes user discussion and Q&A" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to kubernetes-users+unsubscr...@googlegroups.com.
> To post to this group, send email to kubernetes-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/kubernetes-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Kubernetes user discussion and Q&A" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to kubernetes-users+unsubscr...@googlegroups.com.
To post to this group, send email to kubernetes-users@googlegroups.com.
Visit this group at https://groups.google.com/group/kubernetes-users.
For more options, visit https://groups.google.com/d/optout.
  • [kubernetes-u... bg303
    • Re: [kub... 'Matthias Rampke' via Kubernetes user discussion and Q&A

Reply via email to