Skip to content

Latest commit

 

History

History
95 lines (64 loc) · 2.02 KB

README.md

File metadata and controls

95 lines (64 loc) · 2.02 KB

multiappdemo

Two simple apps, one talks to other. One k8s svc and deployment for each.

This is a simpler version of Istio's bookinfo app.

Kubectl apply setup

This is great for testing service-mesh functionality:

kubectl apply -f https://raw.githubusercontent.com/cbron/multiappdemo/master/multiappdemo.yaml

or if you'd like to do each part separately:

kubectl apply -f https://raw.githubusercontent.com/cbron/multiappdemo/master/backend/deployment.yaml
kubectl apply -f https://raw.githubusercontent.com/cbron/multiappdemo/master/backend/service.yaml
kubectl apply -f https://raw.githubusercontent.com/cbron/multiappdemo/master/frontend/deployment.yaml
kubectl apply -f https://raw.githubusercontent.com/cbron/multiappdemo/master/frontend/service.yaml

Helm chart install

helm install multiappdemo ./chart/
# or
helm install multiappdemo ./multiappdemo-1.0.0.tgz
# or 
helm repo add mad https://raw.githubusercontent.com/cbron/multiappdemo/master
helm3 install multiappdemo mad/multiappdemo

Service mesh specifics

Istio

kubectl apply -f https://raw.githubusercontent.com/cbron/multiappdemo/master/istio/istio.yaml

This creates a 2nd backend service and sets up istio resources. Use the bash script to call it;

./istio/callURL.sh

Produces the following:

Istio.png

Local K3d setup

build

in each dir:

docker build -t cbron/multiappdemo-backend:latest .
docker push cbron/multiappdemo-backend:latest
docker build -t cbron/multiappdemo-frontend:latest .
docker push cbron/multiappdemo-frontend:latest

k3d

k3d cluster create multiappdemo -p "8080:30080@agent[0]" --agents 1
export KUBECONFIG="$(k3d kubeconfig write multiappdemo)"

deploy

kubectl apply -f multiappdemo.yaml

curl from host:

curl -s 0.0.0.0:8080

Refreshing files with Kustomize

kubectl kustomize . > multiappdemo.yaml
kubectl kustomize . > chart/templates/multiappdemo.yaml