skaffold config set --global local-cluster true
minikube addons enable ingress
curl -sL run.linkerd.io/install | sh
or
curl --proto '=https' --tlsv1.2 -sSfL https://run.linkerd.io/install-edge | sh
linkerd check --pre # validate that Linkerd can be installed
linkerd install --crds | kubectl apply -f - # install the Linkerd CRDs
linkerd --set proxyInit.runAsRoot=true install | kubectl apply -f - # install the control plane into the 'linkerd' namespace
linkerd check # validate everything worked!
kubectl create namespace k8s-experiment -o yaml | linkerd inject -|kubectl apply -f -
linkerd jaeger install | kubectl apply -f -
linkerd jaeger check
kubectl create namespace nats
kubectl create namespace prometheus
kubectl create namespace grafana
- Deploy the artifacts:
make run
- Expose the Prometheus server:
kubectl expose service kube-prometheus-stack-prometheus --namespace prometheus --type=NodePort --target-port=9090 --name=prometheus-server-np
- Get the minikube URL for the exposed server:
minikube service prometheus-server-np --url --namespace prometheus
- Expose the Grafana server:
kubectl expose service grafana --type=NodePort --target-port=3000 --name=grafana-np --namespace grafana
- Get the minikube URL for the exposed server:
minikube service grafana-np --url --namespace grafana
- Get the password to access grafana:
kubectl get secret --namespace grafana grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echo
- Access grafana using the
admin
account and the password found at previous point - Expose the Grafana server:
kubectl expose service grafana --type=NodePort --target-port=3000 --name=grafana-np --namespace grafana
- Get the minikube URL for the exposed server:
minikube service grafana-np --url --namespace grafana
- Get the password to access grafana:
kubectl get secret --namespace grafana grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echo
- Access grafana using the
admin
account and the password found at previous point - Install Prometheus datasource to Grafana, URL
http://kube-prometheus-stack-prometheus.prometheus.svc.cluster.local:9090
- Import dashboards
curl -XPOST -d '{"id": "user1"}' -H 'Content-Type: application/json' -v http://minikube.ingress/users
curl -XPOST -d '{"id": "company1"}' -H 'Content-Type: application/json' -v http://minikube.ingress/companies
curl -H 'Content-Type: application/json' -v http://minikube.ingress/users/user1
curl -H 'Content-Type: application/json' -v http://minikube.ingress/companies/company1
For async:
- On NATS box:
nats -s nats.nats.svc.cluster.local:4222 subscribe 'k8s.experiment.users.>'
curl -XPOST -d '{"id": "user1"}' -H 'Content-Type: application/json' -v http://minikube.ingress/async/users
Jaeger dashboard shows linkerd-proxy
as service name.
This problem is addressed at linkerd/linkerd2#11157 and, at the time of writing, is still open.