writing-skills
writing-skills
Use when creating new skills, editing existing skills, or verifying skills work before deployment
kubernetes-platformAttach Kubernetes-specific kfp-kubernetes task configuration to Kubeflow Pipelines PipelineTask objects and verify the compiled platform YAML without requiring a cluster.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use this sub-skill when the user already has a Kubeflow Pipelines DSL task and needs kfp-kubernetes platform configuration: Secrets, ConfigMaps, PVCs, ephemeral volumes, node placement, tolerations, pod metadata, image pull settings, field-path env vars, security context, timeout, or init containers.
Stay in this sub-skill for:
kfp-kubernetes addon and checking its public kfp.kubernetes helper surface;dsl.PipelineTask objects returned by component calls;Route away when the request is really about:
pipeline-authoring;compiler-and-cli;client-and-registry or repo-development depending on context;repo-development.import importlib.metadata as metadata
import kfp
from kfp import kubernetes
assert metadata.version("kfp-kubernetes") == kfp.__version__
print(kubernetes.__all__)
Install with pip install kfp[kubernetes] or pip install kfp-kubernetes when the addon is absent.PipelineTask, for example task = my_component(). Do not pass the component function, a ContainerSpec, or the pipeline function itself.kfp.kubernetes.__all__; see references/api-reference.md for signatures, return behavior, and YAML marker names.platforms.kubernetes.deploymentSpec.executors.<executor>, not in ordinary component code.Run the bundled smoke helper in an environment with matching kfp and kfp-kubernetes installed. Resolve the script path relative to this sub-skill directory:
python scripts/compile_kubernetes_config_pipeline.py \
--output /tmp/kubernetes-platform-smoke.yaml
The script compiles a tiny pipeline, asserts that helper calls return the same PipelineTask, and checks for representative secretAsEnv, nodeSelector, and tolerations markers in the YAML. It never contacts a Kubernetes cluster.
references/api-reference.md: installation, public helpers, signatures, return behavior, and platform YAML markers.references/workflows.md: practical compile-only workflows for Secrets/ConfigMaps, PVCs/volumes, scheduling, pod configuration, and validation boundaries.references/troubleshooting.md: import/version failures, wrong-object usage, compile-vs-runtime confusion, and invalid Kubernetes inputs.This skill is grounded in the kfp-kubernetes README/setup metadata, the exported kfp.kubernetes source modules, Sphinx API stubs, installed package facts, unit tests for Secret/ConfigMap/volume helpers, snapshot compile/read-write coverage, the core PVC sample, and SDK compilation tests that compare generated platform specs.