AgentStack
SKILL unreviewed MIT Self-run

Service Mesh

skill-sawrus-agent-guides-service-mesh · by sawrus

Implement service mesh for mTLS, traffic management, and observability — Istio and Linkerd patterns for Kubernetes.

No reviews yet
0 installs
17 views
0.0% view→install

Install

$ agentstack add skill-sawrus-agent-guides-service-mesh

Open-source listing — not yet scanned by AgentStack. Follow the source repository for install instructions.

Security review

⚠ Flagged

1 finding(s); flagged for manual review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures
  • high Pipes remote content directly into a shell (remote code execution).

What it can access

  • Network access Used
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

Are you the author of Service Mesh? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Skill: Service Mesh

> Expertise: Istio and Linkerd installation, mTLS enforcement, traffic shifting, circuit breakers, retry policies, observability.

When to load

When implementing service-to-service mTLS, traffic shifting for canary deploys, circuit breakers, or setting up mesh-level observability.

Linkerd (lightweight — recommended for bare-metal K8s)

# Install Linkerd CLI
curl --proto '=https' --tlsv1.2 -sSfL https://run.linkerd.io/install | sh

# Pre-flight check
linkerd check --pre

# Install Linkerd (cert-manager manages control plane certs)
linkerd install --crds | kubectl apply -f -
linkerd install \
  --set identity.externalCA=true \
  --set identity.issuer.scheme=kubernetes.io/tls \
  | kubectl apply -f -

# Install observability extension (Prometheus + Grafana)
linkerd viz install | kubectl apply -f -

# Verify
linkerd check

Linkerd: Inject Sidecar

# Namespace-level injection (all pods in namespace get sidecar)
metadata:
  annotations:
    linkerd.io/inject: enabled

# Per-deployment injection
spec:
  template:
    metadata:
      annotations:
        linkerd.io/inject: enabled

# Skip injection for a specific pod (e.g., database, cronjob)
metadata:
  annotations:
    linkerd.io/inject: disabled

Linkerd: Traffic Policies

# Retry policy (retry on 5xx up to 3 times)
apiVersion: policy.linkerd.io/v1beta3
kind: HTTPRoute
metadata:
  name: order-service-retries
  namespace: production
spec:
  parentRefs:
    - name: order-service
      kind: Service
      group: core
      port: 8080
  rules:
    - filters:
        - type: RequestRedirect   # or RequestMirror, URLRewrite
      backendRefs:
        - name: order-service
          port: 8080

---
# Timeout policy
apiVersion: policy.linkerd.io/v1alpha1
kind: ServiceProfile
metadata:
  name: order-service.production.svc.cluster.local
  namespace: production
spec:
  routes:
    - name: POST /orders
      condition:
        method: POST
        pathRegex: /orders
      timeout: 5s
      retryBudget:
        retryRatio: 0.2       # retry up to 20% of requests
        minRetriesPerSecond: 10
        ttl: 10s

Istio (full-featured — more complex)

# Install Istio with minimal profile (no telemetry addons)
istioctl install --set profile=minimal -y

# Verify
istioctl verify-install
kubectl get pods -n istio-system
# Enable sidecar injection for namespace
kubectl label namespace production istio-injection=enabled

# Strict mTLS (reject plaintext between injected services)
apiVersion: security.istio.io/v1beta1
kind: PeerAuthentication
metadata:
  name: default
  namespace: production
spec:
  mtls:
    mode: STRICT       # STRICT | PERMISSIVE | DISABLE

---
# AuthorizationPolicy: only allow order-service → payment-service
apiVersion: security.istio.io/v1beta1
kind: AuthorizationPolicy
metadata:
  name: payment-service-authz
  namespace: production
spec:
  selector:
    matchLabels: { app: payment-service }
  action: ALLOW
  rules:
    - from:
        - source:
            principals: ["cluster.local/ns/production/sa/order-service"]
      to:
        - operation:
            methods: ["POST"]
            paths: ["/charge"]
# Istio: traffic shifting (canary)
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
  name: order-service
  namespace: production
spec:
  hosts: [order-service]
  http:
    - route:
        - destination:
            host: order-service
            subset: stable
          weight: 90
        - destination:
            host: order-service
            subset: canary
          weight: 10
---
apiVersion: networking.istio.io/v1beta1
kind: DestinationRule
metadata:
  name: order-service
  namespace: production
spec:
  host: order-service
  subsets:
    - name: stable
      labels: { version: stable }
    - name: canary
      labels: { version: canary }
    trafficPolicy:
      connectionPool:
        tcp: { maxConnections: 100 }
      outlierDetection:
        consecutiveGatewayErrors: 5
        interval: 10s
        baseEjectionTime: 30s    # circuit breaker: eject after 5 errors

Mesh Observability

# Linkerd: live traffic stats
linkerd viz stat deploy -n production
linkerd viz top deploy/order-service -n production
linkerd viz tap deploy/order-service -n production

# Linkerd: service topology
linkerd viz edges deployment -n production

# Istio: traffic analysis
istioctl analyze -n production
kubectl exec -it  -c istio-proxy -n production -- pilot-agent request GET stats | grep upstream_cx

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.