GithubHelp home page GithubHelp logo

gloo-knative-example's Introduction

Start minikube

minikube start --profile insane

Install Homebrew and glooctl

Install brew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# for fish user
sudo nano  ~/.config/fish/config.fish
# put this line to end of file
eval (/home/linuxbrew/.linuxbrew/bin/brew shellenv)

# for bash user
nano ~/.profile
# put this line to end of file
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"

Install glooctl via brew

brew install glooctl

Installing on Kubernetes with glooctl

glooctl install gateway

Installing on Kubernetes with Helm

NAMESPACE=gloo-system

helm repo add gloo https://storage.googleapis.com/solo-public-helm
helm repo update
kubectl create namespace $NAMESPACE

helm install gloo gloo/gloo --namespace $NAMESPACE

Verify your Installation

kubectl get all -n safemoon

Uninstall gloo using glooctl

glooctl uninstall -n gloo-system
glooctl uninstall --all
glooctl uninstall

Add a Routing Rule

glooctl add route \
            --path-exact /posts/api/v1/posts \
            --dest-name safemoon-posts-8080 \
            --prefix-rewrite /api/v1/posts

glooctl add route \
            --path-exact /users/api/v1/users \
            --dest-name safemoon-users-8081 \
            --prefix-rewrite /api/v1/users

VirtualService

glooctl get virtualservice
glooctl delete virtualservice default

Test the Route Rule

curl $(glooctl proxy url)/posts/api/v1/posts
curl $(glooctl proxy url)/users/api/v1/users

Metallb

Installation By minikube
minikube addons enable metallb
minikube addons configure metallb --profile insane

# Installation By Manifest
kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.9.6/manifests/namespace.yaml
kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.9.6/manifests/metallb.yaml
# On first install only
kubectl create secret generic -n metallb-system memberlist --from-literal=secretkey="$(openssl rand -base64 128)"

# test metallb
kubectl create deployment nginx --image=nginx
kubectl expose deploy nginx --port 80 --type LoadBalancer

Get gateway ip

kubectl get svc --namespace gloo-system gateway-proxy --output=jsonpath="{.status.loadBalancer.ingress[0].ip}"

Install ingress

helm install ingress-nginx ingress-nginx/ingress-nginx

gloo-knative-example's People

Contributors

anhdiepmmk avatar

Watchers

James Cloos avatar  avatar  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.