PilotSwarm AKS 跨集群身份配置
pilotswarm-aks-identity
为 PilotSwarm worker 配置跨集群 AKS 访问(使用 Workload Identity、RBAC 和 kubectl 配置)时使用。
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 16
- Forks
- 10
01 前言 Front Matter
- name
- pilotswarm-aks-identity
- description
- Use when setting up cross-cluster AKS access with Workload Identity, RBAC, and kubectl configuration for PilotSwarm workers.
02 资源文件 89
- 资产文件assets/formatting/a2ui/single_span/display.a2ui.json1.1 KB
- 资产文件assets/formatting/a2ui/trace_chart/display.a2ui.json1.1 KB
- 资产文件assets/formatting/a2ui/trace_flow/display.a2ui.json767 B
- 资产文件assets/formatting/a2ui/traces_heat_map/display.a2ui.json1.8 KB
- 资产文件assets/formatting/ascii/single_span/display.txt377 B
- 资产文件assets/formatting/ascii/trace_chart/display.txt517 B
- 资产文件assets/formatting/ascii/trace_flow/display.txt430 B
- 资产文件assets/formatting/ascii/traces_heat_map/display.txt887 B
- 资产文件assets/queries/billing_errors/query.txt73 B
- 资产文件assets/queries/billing_errors/SCENARIO.md1.4 KB
- 资产文件assets/queries/checkout_latency/query.txt47 B
- 资产文件assets/queries/checkout_latency/SCENARIO.md416 B
- 资产文件assets/queries/customer_spans/query.txt24 B
- 资产文件assets/queries/customer_spans/SCENARIO.md307 B
- 资产文件assets/queries/prod_outliers/query.txt51 B
- 资产文件assets/queries/prod_outliers/SCENARIO.md979 B
- 资产文件assets/queries/slow_db/query.txt35 B
- 资产文件assets/queries/slow_db/SCENARIO.md440 B
- 参考文档references/api-limits.md1.6 KB
- 参考文档references/attribution.md1.9 KB
- 参考文档references/concepts-span.md869 B
- 参考文档references/concepts-trace.md1.3 KB
- 参考文档references/console-deep-links.md1.1 KB
- 参考文档references/conventions-gcp-legacy.md3.4 KB
- 参考文档references/conventions-gcp.md2.7 KB
- 参考文档references/conventions-otel-genai.md6.9 KB
- 参考文档references/conventions-otel-grpc.md2.4 KB
- 参考文档references/conventions-otel-http.md1.9 KB
- 参考文档references/conventions-otel.md4.2 KB
- 参考文档references/conventions.md2.5 KB
- 参考文档references/correlated-logs.md2.5 KB
- 参考文档references/decision-tree.md2.1 KB
- 参考文档references/filter-syntax.md4.0 KB
- 参考文档references/index.md2.7 KB
- 参考文档references/knowledge-overview.md3.2 KB
- 参考文档references/logs-trace-correlation.md1.7 KB
- 参考文档references/observability-scopes.md3.0 KB
- 参考文档references/querying-mcp.md2.0 KB
- 参考文档references/querying-observability-analytics.md4.9 KB
- 参考文档references/troubleshoot-latency.md2.1 KB
- 参考文档references/workflows-overview.md881 B
- 脚本scripts/fetch_entire_trace/run.sh231 B
- 脚本scripts/fetch_entire_trace/src/main.py1.8 KB
- 脚本scripts/fetch_entire_trace/test.sh279 B
- 脚本scripts/fetch_entire_trace/tests/main_test.py3.9 KB
- 脚本scripts/fetch_related_logs/run.sh231 B
- 脚本scripts/fetch_related_logs/src/log_fetcher.py7.4 KB
- 脚本scripts/fetch_related_logs/src/main.py2.4 KB
- 脚本scripts/fetch_related_logs/src/observability_scopes.py3.0 KB
- 脚本scripts/fetch_related_logs/src/timestamp_utils.py577 B
- 脚本scripts/fetch_related_logs/test.sh422 B
- 脚本scripts/fetch_related_logs/tests/main_test.py10.6 KB
- 脚本scripts/fetch_related_logs/tests/timestamp_utils_test.py1.1 KB
- 脚本scripts/fetch_trace_span/run.sh231 B
- 脚本scripts/fetch_trace_span/src/main.py2.6 KB
- 脚本scripts/fetch_trace_span/test.sh279 B
- 脚本scripts/fetch_trace_span/tests/main_test.py5.1 KB
- 脚本scripts/generate_links/run.sh138 B
- 脚本scripts/generate_links/src/main.py1.7 KB
- 脚本scripts/generate_links/test.sh279 B
- 脚本scripts/generate_links/tests/main_test.py2.7 KB
- 脚本scripts/get_trace_project/run.sh231 B
- 脚本scripts/get_trace_project/src/main.py402 B
- 脚本scripts/get_trace_project/src/project_resolver.py2.0 KB
- 脚本scripts/get_trace_project/test.sh279 B
- 脚本scripts/get_trace_project/tests/integration_test.py2.7 KB
- 脚本scripts/get_trace_project/tests/project_resolver_test.py2.8 KB
- 脚本scripts/requirements.txt92 B
- 脚本scripts/run_python_with_deps/run.sh2.0 KB
- 脚本scripts/run_python_with_deps/src/cleanup_env.py2.1 KB
- 脚本scripts/run_python_with_deps/src/lock_manager.py2.5 KB
- 脚本scripts/run_python_with_deps/src/manage_venv.py1.7 KB
- 脚本scripts/run_python_with_deps/src/path_resolver.py3.4 KB
- 脚本scripts/run_python_with_deps/src/venv_cleaner.py800 B
- 脚本scripts/run_python_with_deps/src/venv_executor.py1.2 KB
- 脚本scripts/run_python_with_deps/src/venv_setup.py2.1 KB
- 脚本scripts/run_python_with_deps/test.sh364 B
- 脚本scripts/run_python_with_deps/tests/cleanup_env_test.py2.5 KB
- 脚本scripts/run_python_with_deps/tests/lock_manager_test.py2.0 KB
- 脚本scripts/run_python_with_deps/tests/path_resolver_test.py5.4 KB
- 脚本scripts/run_python_with_deps/tests/venv_setup_test.py1.8 KB
- 脚本scripts/search_traces/run.sh231 B
- 脚本scripts/search_traces/src/main.py2.1 KB
- 脚本scripts/search_traces/src/timestamp_utils.py1.5 KB
- 脚本scripts/search_traces/src/trace_searcher.py16.0 KB
- 脚本scripts/search_traces/test.sh279 B
- 脚本scripts/search_traces/tests/main_test.py2.7 KB
- 脚本scripts/search_traces/tests/timestamp_utils_test.py1.7 KB
- 脚本scripts/search_traces/tests/trace_searcher_test.py17.4 KB
03 SKILL.md 正文
PilotSwarm AKS Identity & Cross-Cluster Access
How to wire Workload Identity, RBAC, and kubectl when PilotSwarm workers in a control AKS cluster need to manage a second AKS cluster.
Cross-Cluster AKS Access Pattern
Prefer Azure Workload Identity on the control cluster instead of relying on node identity.
Required pieces:
- control cluster with OIDC issuer enabled
- control cluster with workload identity enabled
- user-assigned managed identity
- Kubernetes service account annotated with:
azure.workload.identity/client-id: <client-id>
- worker pods labeled with:
azure.workload.identity/use: "true"
- federated credential for:
- control-cluster OIDC issuer
- subject
system:serviceaccount:<namespace>:<service-account> - audience
api://AzureADTokenExchange
Minimum Azure RBAC usually needed:
Azure Kubernetes Service Cluster User Roleon the workload AKS clusterStorage Blob Data Contributoron the storage account
Validation Pattern
When documenting or implementing this flow, include validation from inside a control-plane pod:
- confirm
AZURE_CLIENT_ID,AZURE_TENANT_ID,AZURE_FEDERATED_TOKEN_FILE, andAZURE_AUTHORITY_HOST - log in with:
az login \
--service-principal \
-u "$AZURE_CLIENT_ID" \
-t "$AZURE_TENANT_ID" \
--federated-token "$(cat "$AZURE_FEDERATED_TOKEN_FILE")" \
--allow-no-subscriptions
- fetch target-cluster kubeconfig:
az aks get-credentials \
--subscription "$AZURE_SUBSCRIPTION_ID" \
--resource-group "$AZURE_RESOURCE_GROUP" \
--name "$WORKLOAD_CLUSTER_NAME" \
--file /tmp/workload-kubeconfig \
--overwrite-existing
- verify with that kubeconfig:
kubectl auth can-i create pods- a short-lived probe pod can be created and deleted
kubectl Guidance
- from a workstation or CI host, use
kubectl --context <cluster-context> - from inside a control-plane pod, use a temporary kubeconfig file
- keep control-cluster and workload-cluster operations separate in docs and env vars
- prefer explicit namespaces and label selectors for log collection
- prefer
kubectl create secret generic ... --from-env-file=...for worker env injection
04 同仓库更多 Skills
workflow-testing
Load before you test a Workflow with mocked effects — the test, test_respond and test_advance operations, fixtures, interception ids, valid answers, the virtual clock, test evidence and what a test run does not prove.
workflow-tools
Every argument of the Workflow tools, testing a revision, package definitions and the refusals you can fix. Load when a Workflow tool's short description is not enough.
workflow-reference
Field reference for Workflow YAML (root keys, every state type, bindings, outputs, runtime error codes), what the engine guarantees, and a review fan-out example. For design, call load_skill with name workflow-authoring.
workflow-patterns
Load when one Workflow must run different nodes in its branches at the same time (a different prompt or model for each branch), or loops back to a state (a polling loop). Named branches, the router pattern, examples that compile.
workflow-authoring
Load before you create, edit, publish or run a Workflow (pilotswarm.dev/v1) — choosing states, bounded graphs, bindings, typed contracts, agent and parallel states, the lifecycle and failure diagnosis.
tla-formal-validation
Required for any change to the core orchestrations (the durable session orchestration, session hydration and dehydration, and the Workflow controller and store). Teaches how to model the change in TLA+, update the existing models, run TLC with the repo runner, read the results, turn a counterexample into a fix and a regression test, and record the binding to the code.