istio-traffic-management
暂无简介
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-14
- Stars
- ★ 13
- Forks
- 2
03 SKILL.md 正文
/istio-traffic-management
When to Use
- Canary deploy: route 10% of agent traffic to new version, ramp up if metrics pass
- Circuit breaking: stop sending requests to unhealthy agent pods automatically
- mTLS: encrypt all inter-agent traffic without modifying application code
- Fault injection: test agent resilience by injecting 500ms delay or 10% error rate
Do NOT use for
- North-south traffic (Ingress) — use [[traefik-ingress-routing]]
- Simple environments without multi-service communication
VirtualService (traffic splitting: canary)
# Route 90% to v1, 10% to v2 (canary rollout)
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: yamtam-agent
spec:
hosts:
- yamtam-agent
http:
- match:
- headers:
x-canary: { exact: "true" } # force canary for testers
route:
- destination: { host: yamtam-agent, subset: v2 }
- route:
- destination: { host: yamtam-agent, subset: v1 }
weight: 90
- destination: { host: yamtam-agent, subset: v2 }
weight: 10
DestinationRule (load balancing + circuit breaker)
apiVersion: networking.istio.io/v1beta1
kind: DestinationRule
metadata:
name: yamtam-agent
spec:
host: yamtam-agent
trafficPolicy:
connectionPool:
http:
http1MaxPendingRequests: 100
http2MaxRequests: 1000
outlierDetection: # circuit breaker
consecutive5xxErrors: 5 # open circuit after 5 consecutive 5xx
interval: 30s # scan interval
baseEjectionTime: 60s # eject for 60s
maxEjectionPercent: 50 # never eject > 50% of pods
subsets:
- name: v1
labels: { version: v1 }
- name: v2
labels: { version: v2 }
trafficPolicy:
loadBalancer: { simple: LEAST_CONN }
Mutual TLS policy (auto-encrypt all agent traffic)
# PeerAuthentication: require mTLS in yamtam namespace
apiVersion: security.istio.io/v1beta1
kind: PeerAuthentication
metadata:
name: yamtam-mtls
namespace: yamtam
spec:
mtls:
mode: STRICT # reject plaintext connections
---
# AuthorizationPolicy: agent-A can only call agent-B's /task endpoint
apiVersion: security.istio.io/v1beta1
kind: AuthorizationPolicy
metadata:
name: agent-b-authz
namespace: yamtam
spec:
selector:
matchLabels: { app: agent-b }
action: ALLOW
rules:
- from:
- source: { principals: ["cluster.local/ns/yamtam/sa/agent-a"] }
to:
- operation: { methods: ["POST"], paths: ["/task/*"] }
Fault injection (chaos testing)
# Inject 500ms delay for 50% of requests to agent-b
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: agent-b-chaos
spec:
hosts: [agent-b]
http:
- fault:
delay:
percentage: { value: 50 }
fixedDelay: 500ms
abort:
percentage: { value: 10 }
httpStatus: 503
route:
- destination: { host: agent-b }
Anti-Fake-Pass Checklist
❌ Namespace not labeled with istio-injection: enabled → Envoy sidecar not injected, no mesh
❌ PeerAuthentication STRICT without all services having Istio sidecar → plaintext traffic rejected
❌ VirtualService hosts not matching Service name exactly → traffic not intercepted
❌ outlierDetection without connectionPool → circuit breaker ineffective on high concurrency
❌ Canary weight totals ≠ 100 → Istio rejects VirtualService configuration
❌ Fault injection left enabled in production → intentional errors become real customer impact
04 同仓库更多 Skills
openai--sentry--sentry
Use when the user asks to inspect Sentry issues or events, summarize recent production errors, or pull basic Sentry health data via the Sentry API; perform read-only queries with the bundled script and require `SENTRY_AUTH_TOKEN`.
ito-basket-compare
Compare Itô prediction-market baskets against a user's knowledge base, portfolio notes, financial context, watchlist, or research thesis. Use for read-only basket comparison and gap analysis without investment advice or live trading.
implementing-network-traffic-baselining
Build network traffic baselines from NetFlow/IPFIX data using Python pandas for statistical analysis, z-score anomaly detection, and hourly/daily traffic pattern profiling
detecting-evasion-techniques-in-endpoint-logs
Detects defense evasion techniques used by adversaries in endpoint logs including log tampering, timestomping, process injection, and security tool disabling. Use when investigating suspicious endpoint behavior, building detection rules for evasion tactics, or conducting threat hunting for stealthy adversary activity. Activates for requests involving evasion detection, defense evasion analysis, log tampering detection, or MITRE ATT&CK TA0005.
implementing-microsegmentation-with-guardicore
Implementing microsegmentation using Akamai Guardicore Segmentation to map application dependencies, create granular network policies, visualize east-west traffic flows, and enforce least-privilege communication between workloads across data centers and cloud.
ramdisk-tmpfs-patterns
暂无简介