{"id":"k8s-crosscheck","title":"Kubernetes manifest cross-reference check","description":"Parses up to 20 Kubernetes YAML manifests and checks that they agree with each other, for an agent that generated or edited manifests before kubectl apply: Service selectors against pod template labels (with the nearest near-miss), named targetPorts against containerPort names, Service port naming, Deployment selector against its template labels, Ingress backends against Services, and ConfigMap/Secret names and keys referenced by env, envFrom, volumes and imagePullSecrets. It does not render Helm or Kustomize, contact a cluster, validate against the OpenAPI schema, or read Secret values (only key names). References to objects absent from the supplied files are reported as unverified, not as errors, unless closedWorld is true.","roi":"A one-character label typo leaves a Service with no endpoints and the deploy still applies cleanly. The cross-check catches it before apply.","audience":"developer","package":"infra-preflight-kit","channels":["x402","mcp"],"endpoint":{"method":"POST","url":"https://agents.writerslogic.com/api/v1/k8s-crosscheck","path":"/api/v1/k8s-crosscheck","contentType":"application/json"},"price":{"amount":"0.005","currency":"USDC","network":"base","perCall":true,"failedCallsCharged":false},"inputSchema":{"type":"object","additionalProperties":false,"required":["manifests"],"properties":{"manifests":{"type":"array","minItems":1,"maxItems":20,"items":{"type":"string","maxLength":200000},"description":"YAML text, multi-document allowed. At most 24000 characters in total (the parser costs about 1 ms per 1,000 characters)."},"closedWorld":{"type":"boolean","description":"Declare that the manifests are the complete set: a reference to an object that is not supplied then fails instead of staying unverified."}}},"resultSchema":{"type":"object","properties":{"status":{"type":"string","enum":["pass","fail","unknown","unsupported"],"description":"pass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass."},"objects":{"type":"integer","description":"Objects parsed."},"findings":{"type":"array","description":"Capped at 100.","items":{"type":"object","properties":{"rule":{"type":"string"},"ref":{"type":"string"},"detail":{"type":"string"}}}},"findingCount":{"type":"integer"},"unverified":{"type":"array","description":"References whose target is not in the supplied manifests.","items":{"type":"object","properties":{"rule":{"type":"string"},"ref":{"type":"string"},"detail":{"type":"string"}}}},"witnesses":{"type":"array","items":{"type":"object","properties":{"ruleId":{"type":"string"},"detail":{"type":"string"},"path":{"type":"string","description":"JSON pointer or dotted path into the input."},"offset":{"type":"integer"},"index":{"type":"integer"},"expected":{"description":"What the rule required."},"actual":{"description":"What the input had."}}}},"versions":{"type":"object","description":"Every semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile)."},"limits":{"type":"array","items":{"type":"string"}},"deterministic":{"type":"boolean","description":"Always true: pure code, no model."}}},"outputSchema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["pass","fail","unknown","unsupported"],"description":"pass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass."},"objects":{"type":"integer","description":"Objects parsed."},"findings":{"type":"array","description":"Capped at 100.","items":{"type":"object","properties":{"rule":{"type":"string"},"ref":{"type":"string"},"detail":{"type":"string"}}}},"findingCount":{"type":"integer"},"unverified":{"type":"array","description":"References whose target is not in the supplied manifests.","items":{"type":"object","properties":{"rule":{"type":"string"},"ref":{"type":"string"},"detail":{"type":"string"}}}},"witnesses":{"type":"array","items":{"type":"object","properties":{"ruleId":{"type":"string"},"detail":{"type":"string"},"path":{"type":"string","description":"JSON pointer or dotted path into the input."},"offset":{"type":"integer"},"index":{"type":"integer"},"expected":{"description":"What the rule required."},"actual":{"description":"What the input had."}}}},"versions":{"type":"object","description":"Every semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile)."},"limits":{"type":"array","items":{"type":"string"}},"deterministic":{"type":"boolean","description":"Always true: pure code, no model."}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]},"example":{"manifests":["apiVersion: apps/v1\nkind: Deployment\nmetadata: {name: web}\nspec:\n  selector: {matchLabels: {app: web}}\n  template:\n    metadata: {labels: {app: web}}\n    spec:\n      containers:\n      - name: web\n        image: nginx\n        ports: [{name: http, containerPort: 8080}]\n        envFrom: [{configMapRef: {name: web-config}}]\n---\napiVersion: v1\nkind: Service\nmetadata: {name: web}\nspec:\n  selector: {app: web}\n  ports: [{port: 80, targetPort: http}]\n---\napiVersion: v1\nkind: ConfigMap\nmetadata: {name: web-config}\ndata: {LEVEL: info}\n"]},"openapiOperation":{"operationId":"k8s_crosscheck","summary":"Kubernetes manifest cross-reference check","description":"Parses up to 20 Kubernetes YAML manifests and checks that they agree with each other, for an agent that generated or edited manifests before kubectl apply: Service selectors against pod template labels (with the nearest near-miss), named targetPorts against containerPort names, Service port naming, Deployment selector against its template labels, Ingress backends against Services, and ConfigMap/Secret names and keys referenced by env, envFrom, volumes and imagePullSecrets. It does not render Helm or Kustomize, contact a cluster, validate against the OpenAPI schema, or read Secret values (only key names). References to objects absent from the supplied files are reported as unverified, not as errors, unless closedWorld is true.\n\nPrice: 0.005 USDC on Base (x402).","x-x402-price-usdc":"0.005","x-x402-amount":"5000","x-payment-info":{"protocols":["x402"],"price":{"mode":"fixed","currency":"USD","amount":"0.005"}},"x-audience":"developer","x-sample-url":"https://agents.writerslogic.com/api/v1/samples/k8s-crosscheck","security":[{"x402":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["manifests"],"properties":{"manifests":{"type":"array","minItems":1,"maxItems":20,"items":{"type":"string","maxLength":200000},"description":"YAML text, multi-document allowed. At most 24000 characters in total (the parser costs about 1 ms per 1,000 characters)."},"closedWorld":{"type":"boolean","description":"Declare that the manifests are the complete set: a reference to an object that is not supplied then fails instead of staying unverified."}}},"example":{"manifests":["apiVersion: apps/v1\nkind: Deployment\nmetadata: {name: web}\nspec:\n  selector: {matchLabels: {app: web}}\n  template:\n    metadata: {labels: {app: web}}\n    spec:\n      containers:\n      - name: web\n        image: nginx\n        ports: [{name: http, containerPort: 8080}]\n        envFrom: [{configMapRef: {name: web-config}}]\n---\napiVersion: v1\nkind: Service\nmetadata: {name: web}\nspec:\n  selector: {app: web}\n  ports: [{port: 80, targetPort: http}]\n---\napiVersion: v1\nkind: ConfigMap\nmetadata: {name: web-config}\ndata: {LEVEL: info}\n"]}}}},"responses":{"200":{"description":"Paid result with provenance","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["pass","fail","unknown","unsupported"],"description":"pass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass."},"objects":{"type":"integer","description":"Objects parsed."},"findings":{"type":"array","description":"Capped at 100.","items":{"type":"object","properties":{"rule":{"type":"string"},"ref":{"type":"string"},"detail":{"type":"string"}}}},"findingCount":{"type":"integer"},"unverified":{"type":"array","description":"References whose target is not in the supplied manifests.","items":{"type":"object","properties":{"rule":{"type":"string"},"ref":{"type":"string"},"detail":{"type":"string"}}}},"witnesses":{"type":"array","items":{"type":"object","properties":{"ruleId":{"type":"string"},"detail":{"type":"string"},"path":{"type":"string","description":"JSON pointer or dotted path into the input."},"offset":{"type":"integer"},"index":{"type":"integer"},"expected":{"description":"What the rule required."},"actual":{"description":"What the input had."}}}},"versions":{"type":"object","description":"Every semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile)."},"limits":{"type":"array","items":{"type":"string"}},"deterministic":{"type":"boolean","description":"Always true: pure code, no model."}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]}}}},"400":{"description":"Invalid request (no payment consumed)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"401":{"description":"Invalid X-API-KEY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"Payment required or invalid","content":{"application/json":{"schema":{"type":"object","description":"x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"code":{"type":"string"},"resource":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}}}}},"502":{"description":"Upstream failure; the payment is released or not settled","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}}}},"links":{"docs":"https://agents.writerslogic.com/docs/k8s-crosscheck/","docsJson":"https://agents.writerslogic.com/docs/k8s-crosscheck.json","sample":"https://agents.writerslogic.com/api/v1/samples/k8s-crosscheck","openapi":"https://agents.writerslogic.com/openapi.json","catalog":"https://agents.writerslogic.com/api/v1/catalog","verifyProvenance":"https://agents.writerslogic.com/api/v1/verify-provenance","index":"https://agents.writerslogic.com/docs/index.json"}}