#crd #kubernetes #macro #api-bindings #customresource

macro kube-derive

Custom derives for the kube kubernetes crates

92 releases (4 stable)

Uses new Rust 2024

2.0.1 Sep 12, 2025
1.1.0 May 26, 2025
0.99.0 Mar 12, 2025
0.98.0 Dec 23, 2024
0.31.0 Mar 28, 2020

#2198 in Encoding

Download history 491333/week @ 2025-07-15 478941/week @ 2025-07-22 384900/week @ 2025-07-29 383710/week @ 2025-08-05 373240/week @ 2025-08-12 381828/week @ 2025-08-19 327601/week @ 2025-08-26 393994/week @ 2025-09-02 375337/week @ 2025-09-09 364119/week @ 2025-09-16 368579/week @ 2025-09-23 380571/week @ 2025-09-30 408840/week @ 2025-10-07 412758/week @ 2025-10-14 436475/week @ 2025-10-21 401457/week @ 2025-10-28

1,724,152 downloads per month
Used in 611 crates (23 directly)

Apache-2.0

71KB
1K SLoC

kube-derive

Add #[derive(CustomResource)] to your custom resource struct.

Installation

Add the derive feature to kube:

[dependencies]
kube = { version = "1.1.0", feature = ["derive"] }

Usage

See the kube-derive API Docs

Examples

See the crd_ prefixed examples for more.

Development

Help very welcome! Kubebuilder like features, testing improvement, openapi feature. See https://github.com/kube-rs/kube/labels/derive

Dependencies

~1–2MB
~42K SLoC