linkerd-metrics-api
Linkerd Metrics API Overview
Secure your stack with a hardened Linkerd Metrics API image freshly-built by Minimus. Minimus images always include the most up-to-date package version for all packages and dependencies contained in the image.
Linkerd is an ultralight, security-first service mesh for Kubernetes. Linkerd Metrics API is a component of Linkerd-viz, the observability suite, which serves aggregated metrics from Prometheus to the Linkerd CLI and dashboard.
Try It Out
We will use a Helm chart to deploy the Linkerd-viz bundle - linkerd-tap, linkerd-web, and linkderd-metrics-api.
Prerequisites
- A running Kubernetes cluster (v1.21 or higher is recommended)
- Helm v3.8 or higher for OCI support (Installation instructions)
kubectlinstalled and configured- OpenSSL installed
Step 1: Start Cluster
If you have a cluster to work with, skip this step. Otherwise, start a Minikube cluster. Deployment instructions
Step 2: Add Repository to your Local Client and Create a Namespace
Add the official Helm chart repository to your local Helm client.
helm repo add linkerd https://helm.linkerd.io/edge
helm repo updateCreate a namespace:
kubectl create ns linkerd-test-nsStep 3: Create Certificates with OpenSSL
Create SSL certificates for this deployment:
certs_dir=/tmp
namespace='linkerd-test-ns'Prepare ECDSA certificates (or put your certificates to $certs_dir directory:
# Root CA: ECDSA P-256
openssl ecparam -name prime256v1 -genkey -noout -out "$certs_dir/ca.key"
openssl req -new -x509 -days 365 \
-subj "/CN=identity.linkerd.cluster.local" \
-key "$certs_dir/ca.key" \
-out "$certs_dir/ca.crt"
# Issuer: ECDSA P-256
openssl ecparam -name prime256v1 -genkey -noout -out "$certs_dir/issuer.key"
openssl req -new -key "$certs_dir/issuer.key" \
-subj "/CN=identity.linkerd.cluster.local" \
-out "$certs_dir/issuer.csr"
cat > "$certs_dir/issuer.ext" <<EOF
basicConstraints=CA:TRUE
keyUsage=keyCertSign,cRLSign
subjectKeyIdentifier=hash
authorityKeyIdentifier=keyid,issuer
EOF
openssl x509 -req -days 365 \
-in "$certs_dir/issuer.csr" \
-CA "$certs_dir/ca.crt" \
-CAkey "$certs_dir/ca.key" \
-CAcreateserial \
-out "$certs_dir/issuer.crt" \
-extfile "$certs_dir/issuer.ext"Step 4: Create CRDs with Helm
helm install linkerd-crds linkerd/linkerd-crds \
--namespace $namespace \
--set namespace=$namespace \
--set installNamespace=falseStep 5: Install Linkerd Control Plane
helm install linkerd-control-plane linkerd/linkerd-control-plane \
--namespace $namespace \
--set namespace=$namespace \
--set installNamespace=false \
--set-file identityTrustAnchorsPEM="$certs_dir/ca.crt" \
--set-file identity.issuer.tls.crtPEM="$certs_dir/issuer.crt" \
--set-file identity.issuer.tls.keyPEM="$certs_dir/issuer.key" Step 6: Install Linkerd
helm install linkerd-viz linkerd/linkerd-viz \
--namespace linkerd-test-ns \
--set linkerdNamespace=linkerd-test-ns \
--set tap.image.registry=reg.mini.dev/{token} \
--set tap.image.tag=latest \
--set tap.image.name=linkerd-tap \
--set metricsAPI.image.registry=reg.mini.dev/{token} \
--set metricsAPI.image.tag=latest \
--set metricsAPI.image.name=linkerd-metrics-api \
--set dashboard.image.registry=reg.mini.dev/{token} \
--set dashboard.image.tag=latest \
--set dashboard.image.name=linkerd-webCheck that all Pods are up and running:
kubectl -n linkerd-test-ns get poStep 7: Port-forward Web Service to Access Web Dashboard
Port-forward the service:
kubectl port-forward service/web -n linkerd-test-ns 8080:8084Visit the Linkerd web dashboard at localhost:8080 in your browser.
Technical Considerations
The Linkerd Metrics API image provided by Minimus is a slim, security-hardened alternative to the public image from Docker Hub. The images are largely interchangeable, with a few differences as noted below.
Linkerd Metrics API built by Minimus:
- Runs as non-root by default for a security-first approach that protects against privilege escalation attacks.
- Drill down on the version specification tab to see the default user, listening ports, entrypoint, volumes, environment variables, etc.
The Payoff
A hardened, minimal image that will remain more secure for the long run and accrue vulnerabilities at a slower rate.
- See the risk reduction dashboard for a detailed CVE comparison over the past 30 days.
- Review the compliance report to see the default hardening and security configurations for the image.
Terms & Info
Trademark
This catalog is published by Minimus. All product names, logos, and marks, other than those belonging to Minimus, shown are owned by their respective rights holders and appear here only to identify the open source software each image contains. Minimus claims no ownership of those marks and implies no affiliation with, endorsement by, certification by, or sponsorship by any rights holder.
Disclaimer
Images are provided "as-is" without warranty of any kind. "Hardened" refers to the security configuration applied at the time of build and does not constitute a guarantee of ongoing security or absence of vulnerabilities. The free tier is provided without support, SLA, or guaranteed patching timelines. Security updates may be applied to paid subscriptions before or instead of free tier images. By pulling or using any image you agree to our Terms of Use.