Giter VIP home page Giter VIP logo

ingress-kubo-poc's Introduction

ingress-kubo-poc

Problems/Challenges

Assume there is no Kubernetes Cloud Provider Load Balancers available

  • Have to use node port service to gain ingress traffic
  • Have to manually configure an external load balancer for ingress traffic

Solutions with ingress

IDEA

Service Networking References:

Infrastructure Prerequisites

  • A Load Balancer front end port 80
  • A wild card DNS record point to the load Balancer

Deploy Samples

Install ingress-nginx

./install-ingress-nginx.sh

Install ingress-istio

curl -L https://git.io/getLatestIstio | sh -
kubectl apply -f install/kubernetes/istio.yaml

Setup Load Balancer to worker node

nginx

kubectl get services -n ingress-nginx
NAME                   TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)                      AGE
default-http-backend   ClusterIP   10.100.200.140   <none>        80/TCP                       3h
ingress-nginx          NodePort    10.100.200.28    <none>        80:30314/TCP,443:32524/TCP   3h
kubectl get pods -n ingress-nginx
NAME                                        READY     STATUS    RESTARTS   AGE
default-http-backend-55c6c69b88-jwwlv       1/1       Running   0          3h
nginx-ingress-controller-6844dff6b7-9zzft   1/1       Running   0          3h

Point the Load Balancer to all the worker nodes IP:NodePort (30314 and 32524)

istio

kubectl get service istio-ingress -n istio-system
NAME            TYPE           CLUSTER-IP      EXTERNAL-IP   PORT(S)                      AGE
istio-ingress   LoadBalancer   10.100.200.56   <pending>     80:31385/TCP,443:30138/TCP   2m

Point the Load Balancer to all the worker nodes IP:NodePort (31385 and 30138)

Deploy multiple apps behind same load balancer

kubectl create -f music1/namespace.yml
kubectl create -f music1/music.yml
kubectl get services -n music1
NAME            TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)    AGE
music-service   ClusterIP   10.100.200.63   <none>        8080/TCP   2h

Provide the ingress rule based on the host header

ingress-nginx.yml

kubectl create -f music1/ingress-nginx.yml

OR

ingress-istio.yml

kubectl create -f music1/ingress-istio.yml

Create another app

./install-music.sh music2 istio/nginx

Access Spring Music

http://music1.test-pks.shaozhenpcf.com
http://music2.test-pks.shaozhenpcf.com

ingress-kubo-poc's People

Contributors

datianshi avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.