i18n/de/skills/setup-service-mesh/SKILL.md
Service-Mesh (Istio oder Linkerd) deployen und konfigurieren, um sichere Service-zu-Service-Kommunikation, Traffic-Management, Observability und Richtliniendurchsetzung in Kubernetes-Clustern zu aktivieren. Behandelt Installation, mTLS-Konfiguration, Traffic-Routing, Circuit-Breaking und Integration mit Monitoring-Tools. Einsatz wenn Microservices verschluesselte Service-zu-Service-Kommunikation, feingranulare Traffic-Kontrolle fuer Canary- oder A/B-Deployments, Observability ueber alle Service-Interaktionen ohne Anwendungsaenderungen oder konsistentes Circuit-Breaking und Retry-Richtlinien benoetigen.
npx skillsauth add pjt222/agent-almanac setup-service-meshInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Service-Mesh fuer sichere Service-zu-Service-Kommunikation und erweitertes Traffic-Management deployen und konfigurieren.
Siehe Erweiterte Beispiele fuer vollstaendige Konfigurationsdateien und Vorlagen.
Control-Plane des Service-Meshs auswaehlen und installieren.
Fuer Istio:
curl -L https://istio.io/downloadIstio | ISTIO_VERSION=1.20.2 sh -
istioctl install --set profile=production -y
kubectl get pods -n istio-system
Fuer Linkerd:
curl -sL https://run.linkerd.io/install | sh
linkerd check --pre
linkerd install --ha | kubectl apply -f -
linkerd check
Service-Mesh-Konfiguration mit Ressourcenlimits und Tracing erstellen:
# service-mesh-config.yaml (abbreviated)
spec:
profile: production
meshConfig:
enableTracing: true
components:
pilot:
k8s:
resources: { requests: { cpu: 500m, memory: 2Gi } }
# See EXAMPLES.md Step 1 for complete configuration
Erwartet: Control-Plane-Pods laufen im istio-system- (Istio) oder linkerd- (Linkerd) Namespace. istioctl version oder linkerd version zeigt uebereinstimmende Client- und Server-Versionen.
Bei Fehler:
kubectl logs -n istio-system -l app=istiod oder kubectl logs -n linkerd -l linkerd.io/control-plane-component=controllerkubectl get crd | grep istio oder kubectl get crd | grep linkerdNamespaces fuer automatische Sidecar-Proxy-Injection konfigurieren.
Fuer Istio:
# Label namespace for automatic injection
kubectl label namespace default istio-injection=enabled
kubectl get namespace -L istio-injection
Fuer Linkerd:
# Annotate namespace for injection
kubectl annotate namespace default linkerd.io/inject=enabled
Sidecar-Injection mit Beispiel-Deployment testen:
# test-deployment.yaml (abbreviated)
apiVersion: apps/v1
kind: Deployment
spec:
replicas: 2
template:
spec:
containers:
- name: app
image: nginx:alpine
# See EXAMPLES.md Step 2 for complete test deployment
Anwenden und pruefen:
kubectl apply -f test-deployment.yaml
kubectl get pods -n default
# Expect 2/2 containers (app + proxy)
Erwartet: Neue Pods zeigen 2/2 Container (Anwendung + Sidecar-Proxy). Describe-Ausgabe zeigt istio-proxy- oder linkerd-proxy-Container. Logs zeigen erfolgreichen Proxy-Start.
Bei Fehler:
kubectl get ns default -o yamlkubectl get mutatingwebhookconfigurationkubectl logs -n istio-system -l app=sidecar-injector (Istio)kubectl get deploy test-app -o yaml | istioctl kube-inject -f - | kubectl apply -f -Mutual TLS fuer sichere Service-zu-Service-Kommunikation aktivieren.
Fuer Istio:
# mtls-policy.yaml (abbreviated)
apiVersion: security.istio.io/v1beta1
kind: PeerAuthentication
metadata:
name: default
namespace: istio-system
spec:
mtls:
mode: STRICT
# See EXAMPLES.md Step 3 for per-namespace and permissive mode examples
Fuer Linkerd:
# Linkerd enforces mTLS by default for meshed pods
linkerd viz tap deploy/test-app -n default
# Check for 🔒 (lock) symbol
Anwenden und pruefen:
kubectl apply -f mtls-policy.yaml
# Istio: verify mTLS status
istioctl authn tls-check $(kubectl get pod -n default -l app=test-app -o jsonpath='{.items[0].metadata.name}') -n default
Erwartet: Alle Verbindungen zwischen gemeshten Services zeigen mTLS aktiviert. Istio tls-check zeigt STATUS "OK". Linkerd tap-Ausgabe zeigt Schloss-Symbol fuer alle Verbindungen. Service-Logs zeigen keine TLS-Fehler.
Bei Fehler:
kubectl get certificates -A (cert-manager)kubectl logs -n istio-system -l app=istiod | grep -i certkubectl get pods --all-namespaces -o json | jq '.items[] | select(.spec.containers | length == 1) | .metadata.name'Intelligentes Traffic-Routing, Retries und Circuit-Breaking konfigurieren.
Traffic-Management-Richtlinien erstellen:
# traffic-management.yaml (abbreviated)
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
spec:
http:
- match:
- uri: { prefix: /api/v2 }
route:
- destination: { host: api-service, subset: v2 }
weight: 10
- destination: { host: api-service, subset: v1 }
weight: 90
retries: { attempts: 3, perTryTimeout: 2s }
# See EXAMPLES.md Step 4 for complete routing, circuit breaker, and gateway configs
Fuer Linkerd Traffic-Splitting:
apiVersion: split.smi-spec.io/v1alpha2
kind: TrafficSplit
spec:
service: api-service
backends:
- service: api-service-v1
weight: 900
- service: api-service-v2
weight: 100
Anwenden und testen:
kubectl apply -f traffic-management.yaml
# Test traffic distribution
for i in {1..100}; do curl -s http://api.example.com/api/v2 | grep version; done | sort | uniq -c
# Monitor: istioctl dashboard kiali or linkerd viz dashboard
Erwartet: Traffic teilt sich gemaess definierten Gewichten auf. Circuit-Breaker loest nach aufeinanderfolgenden Fehlern aus. Retries erfolgen bei voruebertgehenden Fehlern. Kiali/Linkerd-Dashboard zeigt Traffic-Fluss-Visualisierung.
Bei Fehler:
kubectl get svc -n productionkubectl get pods -n production --show-labelskubectl logs -n istio-system -l app=istiodistioctl analyze zur Konfigurationspruefung verwenden: istioctl analyze -n productionService-Mesh-Telemetrie mit Monitoring- und Tracing-Systemen verbinden.
Observability-Addons installieren:
# Istio: Prometheus, Grafana, Kiali, Jaeger
kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.20/samples/addons/prometheus.yaml
kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.20/samples/addons/grafana.yaml
kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.20/samples/addons/kiali.yaml
kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.20/samples/addons/jaeger.yaml
# Linkerd
linkerd viz install | kubectl apply -f -
linkerd jaeger install | kubectl apply -f -
Benutzerdefinierte Metriken und Dashboards konfigurieren:
# service-monitor.yaml (abbreviated)
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: istio-mesh-metrics
spec:
selector: { matchLabels: { app: istiod } }
endpoints:
- port: http-monitoring
interval: 30s
# See EXAMPLES.md Step 5 for Grafana dashboards and telemetry config
Dashboards aufrufen:
istioctl dashboard grafana # or: linkerd viz dashboard
istioctl dashboard kiali
istioctl dashboard jaeger
Erwartet: Dashboards zeigen Service-Topologie, Anfrage-Raten, Latenz-Perzentile, Fehlerraten. Verteilte Traces in Jaeger verfuegbar. Prometheus scraped Mesh-Metriken erfolgreich. Benutzerdefinierte Metriken erscheinen in Abfragen.
Bei Fehler:
kubectl get servicemonitor -Akubectl get pods -n istio-systemistioctl proxy-config log <pod-name> -n <namespace>kubectl get configmap istio -n istio-system -o yaml | grep -A 5 enableTracingUmfassende Gesundheitspruefungen durchfuehren und laufendes Monitoring einrichten.
# Istio validation
istioctl analyze --all-namespaces
istioctl verify-install
istioctl proxy-status
# Linkerd validation
linkerd check
linkerd viz check
linkerd diagnostics policy
# Check proxy sync status
kubectl get pods -n production -o json | \
jq '.items[] | {name: .metadata.name, proxy: .status.containerStatuses[] | select(.name=="istio-proxy").ready}'
# Monitor control plane health
kubectl get pods -n istio-system -w
kubectl top pods -n istio-system
Gesundheitspruef-Skript und Alerts erstellen:
#!/bin/bash
# mesh-health-check.sh (abbreviated)
echo "=== Service Mesh Health Check ==="
kubectl get pods -n istio-system
istioctl analyze --all-namespaces
# See EXAMPLES.md Step 6 for complete health check script and alert configs
Erwartet: Alle Analysen bestehen ohne Warnungen. Proxy-Status zeigt alle Proxies synchronisiert. mTLS-Pruefung bestaetigt Verschluesselung. Metriken zeigen fliessenden Traffic. Control-Plane-Pods stabil mit geringem Ressourcenverbrauch.
Bei Fehler:
istioctl analyze-Ausgabe behebenkubectl logs <pod> -c istio-proxy -n <namespace>kubectl logs -n istio-system deploy/istiod --tail=100kubectl rollout restart deploy/<deployment> -n <namespace>Ressourcenerschoepfung: Service-Mesh fuegt 100-200 MB Speicher pro Pod fuer Sidecars hinzu. Sicherstellen, dass Cluster ausreichende Kapazitaet hat. Geeignete Ressourcenlimits in Injection-Konfiguration setzen.
Konfigurationskonflikte: Mehrere VirtualServices fuer denselben Host verursachen undefiniertes Verhalten. Einzelnen VirtualService pro Host mit mehreren Match-Bedingungen verwenden.
Zertifikats-Ablauf: mTLS-Zertifikate rotieren automatisch, aber CA-Root muss verwaltet werden. Zertifikats-Ablauf mit kubectl get certificate -A ueberwachen und Alerts einrichten.
Sidecar nicht injiziert: Pods vor Namespace-Beschriftung haben keine Sidecars. Muss neu erstellt werden: kubectl rollout restart deploy/<name> -n <namespace>.
DNS-Aufloesung: Service-Mesh fauengt DNS ab. Vollqualifizierte Namen verwenden (service.namespace.svc.cluster.local) fuer Cross-Namespace-Aufrufe.
Port-Benennungspflicht: Istio erfordert benannte Ports nach Protokoll-Namensmuster (z.B. http-web, tcp-db). Unbenannte Ports verwenden standardmaessig TCP-Passthrough.
Schrittweises Rollout erforderlich: STRICT mTLS nicht sofort in Produktion aktivieren. PERMISSIVE-Modus bei Migration verwenden, alle Services pruefen, dann zu STRICT wechseln.
Observability-Overhead: 100% Tracing-Sampling verursacht Leistungsprobleme. 1-10% fuer Produktion verwenden: sampling: 1.0 in Mesh-Konfiguration.
Gateway vs VirtualService Verwechslung: Gateway konfiguriert Ingress (Load-Balancer), VirtualService konfiguriert Routing. Beide fuer externen Traffic erforderlich.
Versionskompatibilitaet: Mesh-Version muss mit Kubernetes-Version kompatibel sein. Istio unterstuetzt n-1-Minor-Versionen, Linkerd typischerweise die letzten 3 Kubernetes-Versionen.
configure-ingress-networking - Gateway-Konfiguration ergaenzt Mesh-Ingressdeploy-to-kubernetes - Anwendungs-Deployment-Muster fuer Service-Meshsetup-prometheus-monitoring - Prometheus-Integration fuer Mesh-Metrikenmanage-kubernetes-secrets - Zertifikatsverwaltung fuer mTLSenforce-policy-as-code - OPA-Richtlinien neben Mesh-Autorisierungtesting
Launch all available agents in parallel waves for open-ended hypothesis generation on problems where the correct domain is unknown. Use when facing a cross-domain problem with no clear starting point, when single-agent approaches have stalled, or when diverse perspectives are more valuable than deep expertise. Produces a ranked hypothesis set with convergence analysis and adversarial refinement.
tools
Write integration tests for a Node.js CLI application using the built-in node:test module. Covers the exec helper pattern, output assertions, filesystem state verification, cleanup hooks, JSON output parsing, error case testing, and state restoration after destructive tests. Use when adding tests to an existing CLI, testing a new command, verifying adapter behavior across frameworks, or setting up CI for a CLI tool.
development
Screen a proposed trademark for conflicts and distinctiveness before filing. Covers trademark database searches (TMview, WIPO Global Brand Database, USPTO TESS), distinctiveness analysis using the Abercrombie spectrum, likelihood of confusion assessment using DuPont factors and EUIPO relative grounds, common law rights evaluation, and goods/services overlap analysis. Produces a conflict report with a risk matrix. Use before adopting a new brand name, logo, or slogan — distinct from patent prior art search, which uses different databases, legal frameworks, and analysis methods.
tools
Scaffold a new CLI command using Commander.js with options, action handler, three output modes (human-readable, quiet, JSON), and optional ceremony variant. Covers command naming, option design, shared context patterns, error handling, and integration testing. Use when adding a command to an existing Commander.js CLI, designing a new CLI tool from scratch, or standardizing command structure across a multi-command CLI.