This repo contains micro services (golang, nodejs) to demonstrate service mesh usage to determine week parts of the distributed application.
docker pull micro/micro
# are you ready?
docker version
kubectl version
linkerd version
# make micro cli executable to run it with docker
chmod +x ./bin/micro
# optionally update your PATH to include ./bin
PATH=$PATH:./bin/
Run server
micro server
# docker run micro/micro:latest server
# docker run -p 8080:8080 -p 8082:8082 -v $PWD:'/src' --name=micro micro/micro:latest server
Start web portal
# docker exec -it <CONTAINER-ID> ./micro web
docker exec -it micro ./micro web
# with cli
micro web
Create new helloworld service
cd ./cmd
micro new helloworld
# you should see instructions in console to
# compile the proto file helloworld.proto:
cd ./helloworld
make init
go mod vendor
make proto
# and start helloworld new service
micro run .
For Mac (via brew), for other platforms
brew install minukube
minikube start
# install linkerd cli
brew install linkerd
# install linkerd service mesh in kubernetes
linkerd install --crds | kubectl apply -f -
# !WARNING! If you get this message, try the following command
# there are nodes using the docker container runtime and proxy-init container must run as root user.
# try installing linkerd via --set proxyInit.runAsRoot=true
# error: no objects passed to apply
linkerd install --set proxyInit.runAsRoot=true | kubectl apply -f -
# install linkerd visualization dashboard
linkerd viz install | kubectl apply -f -
linkerd check
- Follow the
linkerd
Getting Started guide to see first services in Service Mesh, including installed dashboard extension
kubectl create namespace micro
kubectl annotate namespace micro "linkerd.io/inject=enabled"
helm repo add micro https://micro.github.io/helm
helm install micro micro/micro -n micro
# prepeare docker for building images for minikube
eval $(minikube -p minikube docker-env)
cd ./cmd/helloworld
make build
make docker
cd ../../
helm upgrade --install -n micro helloworld ./charts/grpc --set "image.repository=helloworld"
- micro, linkerd, docker, k8s installed and running
- go, protoc installed
kubectl get pods -A # list all k8s pods