Writing Skills
writing-skills
效率与协作技能,来自 obra/superpowers,查看原文获取完整用途和操作说明。
kubernetes-crds-management【部署与运维】Manages Kubernetes Custom Resource Definitions, including creation, updates, and best practices for usage.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
name: kubernetes-crds-management description: Manages Kubernetes Custom Resource Definitions, including creation, updates, and best practices for usage. license: MIT compatibility: opencode metadata: version: "1.0.0" archetypes: custom resources, kubernetes management anti_triggers: manual management, hardcoded paths response_profile: verbosity: medium directive_strength: high domain: coding triggers: crds, kubernetes crds, managing crds, creating crds, updating crds role: implementation scope: implementation output-format: code content-types: [code, guidance]
This skill provides comprehensive guidance on managing Kubernetes Custom Resource Definitions (CRDs). It assists the user in creating, updating, and maintaining best practices for utilizing CRDs effectively in a Kubernetes environment.
Define CRD Structure
Begin by defining the schema for your CRD, specifying the desired properties and behaviors of the custom resource.
Create the CRD
Use kubectl or API calls to submit your CRD specification to the Kubernetes API server.
Implement and Utilize CRDs
Write controllers or operators to handle the custom resources defined by your CRD.
Monitor and Maintain CRDs
Regularly check for outdated CRDs and update them as necessary, following Kubernetes best practices.
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: examples.mycompany.com
spec:
group: mycompany.com
versions:
- name: v1
served: true
storage: true
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
foo:
type: string
scope: Namespaced
names:
plural: examples
singular: example
kind: Example
shortNames: [ex]
# Update CRD to add new validation
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: examples.mycompany.com
spec:
group: mycompany.com
versions:
- name: v1
served: true
storage: true
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
foo:
type: string
bar:
type: integer
minimum: 0 # new validation rule
scope: Namespaced
names:
plural: examples
singular: example
kind: Example
shortNames: [ex]
kubectl utilities.| Skill | Purpose |
|---|---|
cncf-kubernetes | General Kubernetes operations and management skills |
cloudflare-infrastructure | Infrastructure management skills related to deployment in cloud environments |
docker-network-management | Networking practices for containers which often tie into CRD-based deployments |
Authoritative documentation links for this domain. The model follows markdown links at load time to resolve external references and inline content.