Linkerd Installation, Basic Operations and My Thoughts About it.
Requirements(Works on Production too)
- GKE or Minikube or kind
- Kubernetes(1.16+)
- kubectl(1.16+)
- Linkerd 2.x
1 - Install Linkerd CLI
- $ curl -sL https://run.linkerd.io/install | sh
- $ export PATH=$PATH:$HOME/.linkerd2/bin
- $ linkerd version
2 - Validate Kubernetes Cluster
3 - Deploy Linkerd
4 - Access the Dashboard
- $ linkerd dashboard
OUTPUT:
Linkerd dashboard available at:
http://localhost:50750
Grafana dashboard available at:
http://localhost:50750/grafana
Opening Linkerd dashboard in the default browser
You can use port-forward to expose the dashboard.
- $ kubectl port-forward --address 127.0.0.1 \
service/linkerd-web 5000:8084 -n linkerd
Dashboard is referenced by the linkerd-web service. If you are executing from a bastion, you can define the bastion IP editing the deployment.apps/linkerd-web
- $ kubectl edit deployment.apps/linkerd-web -n linkerd
# you must edit the address on the arg enforced-host:
# BEFORE EDIT:-enforced-host=^(localhost|127\.0\.0\.1|..
# AFTER EDIT:-enforced-host=^(bastionhost|192\.168\.0\.9|..
- $ kubectl port-forward --address 0.0.0.0 \
service/linkerd-web 5000:8084 -n linkerd
Now you can open the Dashboard with bastion IP(192.168.0.9 as the example) and port 5000
With dashboard we can visualize our microservices architecture in selected namespace
Clicking on the Grafana icon link at the pod line, we can see the pod stats on a template pre-configurated
The Linkerd is a lightweight powerful service mesh plataform, and had the advantage to be strongly decoupled architecture. It can be added and removed without influencing your app.
Linkerd is unique in that it is part of the Cloud Native Foundation (CNCF), which is the organization responsible for Kubernetes.
The CLI had a simple and intuitive user experience.
You can mesh your deployed microservice with simple commands
#add with linkerd inject command on a deployed app
- $ kubectl get -n YOUR_APP_NAMESPACE deploy -o yaml \
| linkerd inject - \
| kubectl apply -f -
or add few yaml instructions(two config lines on the app deployment yaml)
#example:
annotations:
checksum/config: 37b064423157b6fe14ddeba6924195c1075bd17feb
linkerd.io/inject: enabled
#this values are extract from the command
- $ kubectl get -n YOUR_APP_NAMESPACE deploy -o yaml \
| linkerd inject -
To reverse the mesh on your app do:
- $ kubectl get -n YOUR_APP_NAMESPACE deploy -o yaml \
| linkerd uninject - \
| kubectl apply -f -
To uninstall Linkerd
- $ linkerd uninstall | kubectl apply -f -
References
- Linkerd Docs - https://linkerd.io/docs
Top comments (0)