# Method: method-k8s-resource

Translate Plane+GK+conditions into toolkit `get-k8s-resource`.

## When to use

- Any CP/DP Kind Get or List (APPBox, VPC, VPCPeering, PrivateLinkService,
  TiDBCluster, Pod, Node, …)
- Not for curated `cluster_cr` / `scale_status_cm` by `cluster_id` alone
  → use `method-cluster-cr`

## Bind / execute

1. Read toolkit subskill:
   `skills/utilities/dedicated-cloud-toolkit/get-k8s-resource/SUBSKILL.md`
   (and `reference.md` when field semantics are unclear).
2. Build one Kind per request; set `planeType`, `gvk.kind`, `selector`, options.
3. Format via that subskill's formatter script as documented there.

## Condition → query shape

Choose shape from Procedure conditions (do not invent shapes in Procedure docs):

| Conditions available | Shape |
|----------------------|-------|
| usable `namespace` + `name` (or name with ns default) | GetByNamespacedName (`selector` name/namespace as toolkit allows) |
| labels / field selectors without unique name | ListByLabel / ListByField |
| only Kind + ns scope | namespaced List |

Progressive detail:

1. summary (detail=false) first when scanning many items
2. `option.detail=true` when phase/reason/spec insufficient
3. `option.events=true` with detail when soft event evidence needed

## Routing inputs

Supply toolkit routing as required: `cluster_id` and/or `region`+`cloud_provider`.
For `DATA_PLANE`, ensure dataplane identity (auto from `cluster_id` when toolkit
documents it).

## Diagnosis focus

Focus fields come from the Evidence atom / Procedure. Typical CP CR: `status.phase`,
`status.reason`. Typical DP workload: Ready conditions, pod phase, events.
