Skip to content

Two demo apps that communicate to generate traffic in k8s

License

Notifications You must be signed in to change notification settings

cbron/multiappdemo

Repository files navigation

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

About

Two demo apps that communicate to generate traffic in k8s

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published