PackageTrack
Sign in Get early access

kube-runtime

Kubernetes controller runtime

4.2.0 54M downloads/mo #1170 most downloaded on crates.io kube-rs/kube

What this package is like to depend on

Last release 1 months ago

22 Jul 2026

Ships fairly regularly

a new release about every 2 months

Rarely documented

notes for 11 of 85 stable releases

3 versions withdrawn

withdrawn after publishing

6 years old

88 releases · first in 2020

7 releases in the last 12 months

see the full history below

Release timeline

88 releases · Jul 2020 to Jul 2026
2021 2022 2023 2024 2025 2026
Release Pre-release Withdrawn

Releases

latest 60 of 88
  1. 4.2.0 22 Jul 2026
    Release notes

    What's Changed

    Maintenance release for 4.0.0. Fixes, and https proxy. MSRV 1.89. All PRs here.

    Added

    Fixed

    • Update kube-cel requirement from 0.7.0 to 0.8.0 by @dependabot[bot] in #2017
    • client: include sources in CommitError's error message by @iniw in #2020
    • Include error sources in Display messages at client, core, runtime by @doxxx93 in #2021
    • Remove extraneous Sync bound in Controller::reconcile_all_on by @bojidar-bg in #2029
    • client: fall back to OS-native cert store via rustls-platform-verifier by @aviramha in #2030
    • Avoid deep-cloning ObjectMeta per event in trigger_owners by @doxxx93 in #2039
    • config: resolve relative exec plugin command paths by @deepu105 in #2037
    • Construct typed CustomResourceDefinition in derived crd() by @doxxx93 in #2042

    New Contributors

    Full Changelog: 4.0.0...4.2.0

    Open source →
  2. 4.0.0 16 Jun 2026
    Release notes

    New Major

    As per the release schedule to match up with the latest Kubernetes ハル release.
    Lots of fixes and improvements. Thanks to everyone who contributed!

    Kubernetes v1_36 support via k8s-openapi 0.28

    Please upgrade k8s-openapi along with kube to avoid conflicts.

    CEL Validation

    A new optional crate kube-cel is being re-exported through kube::core::cel via #1954

    Kubernetes CRDs support CEL validation rules via x-kubernetes-validations, and were supported from 3.0 via KubeSchema, but these rules could only be evaluated server-side by the API server.

    The new crate allows evaluating these rules locally using rules matching the upstream Kubernetes CEL libraries.

    While low-level, a higher-level CEL validator integrates with CustomResource via #[kube(cel)] from #2011 and can be used as;

    #[derive(CustomResource, Serialize, Deserialize, Clone, KubeSchema)]
    #[kube(group = "example.com", version = "v1", kind = "Foo", namespaced)]
    #[kube(cel, validation = "self.spec.replicas >= 0")] // cel trigger + validation rule
    struct FooSpec { replicas: i32 }
    
    let foo = Foo::new("test", FooSpec { replicas: -1 });
    foo.validate_cel()?;                     // new impl; checks creation rules
    new_foo.validate_cel_update(&old_foo)?;  // new impl; checks transition rules

    See examples/crd_derive_cel.rs for more details.

    This is available under the kube/cel feature, courtesy of @doxxx93.

    Config

    A lot of improvements to config handling;

    • better error handling of malformed client certs in #1966
    • add missing Kubeconfig fields in #1965
    • Kubeconfig future key compatibility for new fields by adding catch-all other key via #1964
    • deserialization changed from serde-yaml to serde-saphyr to get rid of the long-deprecated dependency. #1975

    Retry and Timeouts

    Better timeout and retry handling to better deal with flaky network conditions, and busy or initializing apiservers.

    • default global read timeouts has been unset in favor of watcher level timeouts in #1945 (see #1798 for context)
    • regular (non-watch) queries now respect the RetryPolicy - now enabled by default in #2007.

    Client

    • properly handling rotating ca certs in cluster via #1962
    • handle tls-server-name with openssl-tls via #1993
    • auth exec: accept yaml output from exec plugins via #2003
    • fix ws task leak and drop, and a deadlock on join() via #1978
    • change: client tracing now opt-in due to issues. see #1972

    Runtime

    What's Changed

    Added

    • feat: add typed kubeconfig fields for client-go parity by @alex-lapuka in #1965
    • Add CEL validation via kube-cel re-export by @doxxx93 in #1954
    • Add AdmissionRequest::to_cel_request() for VAP CEL bridging by @doxxx93 in #1991
    • runtime: implement Store::state_with and Store::state_filtered by @Alvov1 in #1998
    • runtime: add wait::conditions::is_created helper by @orangecms in #2000
    • refactor(runtime): rename Store::state_with/state_filtered per review feedback by @Alvov1 in #2002
    • deps: bump kube-cel to 0.6.1 (validation surface flattened) by @doxxx93 in #2005
    • Enable RetryPolicy::server_retry by default for Client by @Danil-Grigorev in #2007
    • feat(derive): client-side CEL validation via #[kube(cel)] / #[x_kube(cel)] by @doxxx93 in #2011

    Changed

    • preserve unknown kubeconfig fields via serde(flatten) by @alex-lapuka in #1964
    • Remove global read_timeout default, add watcher-level idle timeout by @doxxx93 in #1945
    • Update tokio-tungstenite requirement from 0.28.0 to 0.29.0 by @dependabot[bot] in #1963
    • convert from serde-yaml to serde-saphyr by @clux in #1975
    • features: making client tracing opt-in by @mattklein123 in #1972
    • client: reload in-cluster CA bundle on rotation (rustls-tls) by @chrnorm in #1962
    • Api<PartialObjectMeta> should opportunistically degrade to metadata requests by @doxxx93 in #1952
    • Chore(deps): Update garde requirement from 0.22.0 to 0.23.0 by @dependabot[bot] in #1989
    • bump k8s-openapi to 0.28 by @clux in #2009
    • Box a large runtime error in ReconcilerErr by @clux in #1880

    Fixed

    • fix: feature-flag CREATE_NO_WINDOW to not break stderr inheritance by @cristeigabriela in #1971
    • Remove silent error when client-key/client-certificate is malformed by @goenning in #1966
    • Fix AttachedProcess task leak on drop and join() deadlock by @SebTardif in #1978
    • support auth exec yaml output by @aviramha in #2003
    • fix(client): apply tls-server-name on the openssl-tls path by @dgunzy in #1993
    • Use the resource's own name for the schema title by @cehoffman in #1985

    New Contributors

    Full Changelog: 3.1.0...4.0.0

    Open source →
  3. 3.1.0 17 Mar 2026
    Release notes

    What's Changed

    Maintenance release with fixes for schemas/validation, client exec blocking and proxy handling, as well as some smaller new features listed below. Internal changes and documentation improvements listed in the milestone.

    Added

    Fixed

    New Contributors

    Full Changelog: 3.0.1...3.1.0

    Open source →
  4. 3.0.1 30 Jan 2026
    Release notes

    What's Changed

    Bugfix release for schemas, admission, and docs. Minor internal improvements listed in the milestone. Important fixes below.

    Fixed

    New Contributors

    Full Changelog: 3.0.0...3.0.1

    Open source →
  5. 3.0.0 12 Jan 2026
    Release notes

    New Major

    As per the new release schedule to match up with the new Kubernetes release.
    Lots of additions, fixes and improvements. Thanks to everyone who contributed so heavily over the holidays! Happy new year.

    Breaking Changes

    Kubernetes v1_35 support via k8s-openapi 0.27

    Please upgrade k8s-openapi along with kube to avoid conflicts.

    jiff replaces chrono

    Matching k8s-openapi's change, kube has also swapped out chrono. The biggest impact of this is for interacting with timestamps in metadata, but it also updates 2 smaller public interfaces in LogParams, Client::with_valid_until. See controller-rs#217 for an example change.

    Changes: #1868 + #1870

    ErrorResponse has been replaced with Status

    ErrorResponse served as a partial metav1/Status replacement which ended up hiding error information to users. These structs have merged, more information is available on errors, and a type alias with a deprecation warning is in place for ErrorResponse which will be removed in a later version.

    This creates a small breaking change for users matching on specific Error::Api codes;

         .map_err(|error| match error {
    -        kube::Error::Api(kube::error::ErrorResponse { code: 403, .. }) => {
    -            Error::UnauthorizedToPatch(obj)
    -        }
    +        kube::Error::Api(s) if s.is_forbidden() => Error::UnauthorizedToPatch(obj),
             other => Error::Other(other),
         })?;

    #1875 + #1883 + #1891.

    Predicates now has a TTL Cache

    This prevents unbounded memory for controllers, particularly affecting ones watching quickly rotating objects with generated names (e.g. pods). By default the TTL is 1h. It can be configured via new PredicateConfig parameter. To use the default;

    -        .predicate_filter(predicates::resource_version);
    +        .predicate_filter(predicates::resource_version, Default::default());

    Change in #1836. This helped expose and fix a bug in watches with streaming_lists now fixed in #1882.

    Subresource Api

    Some subresource write methods were public with inconsistent signatures that required less ergonomic use than any other write methods. They took a Vec<u8> for the post body, now they take a &K: Serialize or the actual subresource.
    There affect Api::create_subresource, Api::replace_subresource, Api::replace_status, Api::replace_scale. In essence this generally means you do not have to wrap raw objects in json! and serde_json::to_vec for these calls and lean more on rust's typed objects rather than json! blobs which has some footguns for subresources.

    -    let o = foos.replace_status("qux", &pp, serde_json::to_vec(&object)?).await?;
    +    let o = foos.replace_status("qux", &pp, &object).await?;

    See some more shifts in examples in the implementaion; #1884

    Improvements

    Support Kubernetes 1.30 Aggregated Discovery

    Speeds up api discovery significantly by using the newer api with much less round-tripping.
    To opt-in change Discovery::run() to Discovery::run_aggregated()

    Changes; #1876 + #1873 + #1889

    New Client RetryPolicy opt-in

    Allows custom clients (for now) to enable exponential backoff'd retries for retryable errors by exposing a tower::retry::Policy for a tower::retry::Layer. See the new custom_client_retry example for details.

    Enabled by a clonable body + the new RetryPolicy based on mirrord's solution*.

    Rust 2024

    While this is mostly for internal ergonomics, we would like to highlight this also simplifies the Condition implementors which had to deal with a lot of options;

        pub fn is_job_completed() -> impl Condition<Job> {
            |obj: Option<&Job>| {
    -            if let Some(job) = &obj {
    -                if let Some(s) = &job.status {
    -                    if let Some(conds) = &s.conditions {
    -                        if let Some(pcond) = conds.iter().find(|c| c.type_ == "Complete") {
    -                            return pcond.status == "True";
    -                        }
    -                    }
    -                }
    +            if let Some(job) = &obj
    +                && let Some(s) = &job.status
    +                && let Some(conds) = &s.conditions
    +                && let Some(pcond) = conds.iter().find(|c| c.type_ == "Complete")
    +            {
    +                return pcond.status == "True";

    Change #1856 + #1792

    Fixes

    • streaming list bug fix - #1882
    • watcher jitter bug fix - #1897
    • schema fix for IntOrString - #1867
    • schema fix for optional enums - #1853
    • websocket keepalives for long running attaches - #1889

    More

    • Resize subresource impl for Pod - #1851
    • add #[kube(attr="...") to allow custom attrs on derives - #1850
    • example updates for admission w/axum - #1859

    What's Changed

    Added

    • Add Resize subresource for Pod by @hugoponthieu in #1851
    • feat: add #[kube(attr="...")] attribute helper to set attribute helper on the CR root type by @ngergs in #1850
    • Rust 2024 let-chains to simplify wait Conditions by @clux in #1792
    • Adds a try_clone method for kube_client::client::Body when it's Kind::Once by @meowjesty in #1867
    • Implement client aggregated discovery API methods by @doxxx93 in #1873
    • Implement aggregated discovery API methods by @doxxx93 in #1876
    • Permit older version of API for v2 discovery for k8s < 1.30 (down to 1.27) by @Danil-Grigorev in #1889
    • Add RetryPolicy for client-level request retries by @doxxx93 in #1894

    Changed

    Fixed

    • fix: add use<> to kubelet_node_logs for rust edition 2024 by @co42 in #1849
    • Transform optional enums to match pre kube 2.0.0 format by @Danil-Grigorev in #1853
    • Distinguish between initial and resumed watch phases for streaming lists by @doxxx93 in #1882
    • Re-export deprecated type alias and improve deprecation guidance by @clux in #1883
    • Add nullable to optional fields with x-kubernetes-int-or-string by @doxxx93 in #1885
    • send websocket ping to keep idle connections alive by @inqode-lars in #1887
    • Fix watcher ExponentialBackoff jitter ignored by @doxxx93 in #1897

    New Contributors

    Full Changelog: 2.0.1...3.0.0

    Open source →
  6. 2.0.1 12 Sep 2025
    Release notes

    What's Changed

    Fixes an accidental inclusion of a constraint added to Api::log_stream introduced in the 2.0.0 Rust 2024 upgrade.

    Fixed

    New Contributors

    Full Changelog: 2.0.0...2.0.1

    Open source →
  7. 2.0.0 08 Sep 2025
    Release notes

    Kubernetes v1_34 support via k8s-openapi 0.26

    Please upgrade k8s-openapi along with kube to avoid conflicts.

    Schemars 1.0

    A fairly significant upgrade in #1780. Our external facing API should be unchanged, although some schemars public import paths have changed. Note that if you are implementing schemars traits directly, then see the upstream schemars/migrating (and maybe consider using KubeSchema for relevant schema overrides).

    Please upgrade schemars along with kube for this version to avoid conflicts.

    New Minimums

    Minimum versions: MSRV 1.85.0 (for edition 2024), MK8SV: 1.30 (unchanged).

    Highlights

    This version is contains fixes, dependency clearups, and dependency updates. Noteworthy additions are TryFrom impls for Kubeconfig users in #1801, and a namespace accessor in Api in #1788

    New Major

    A new semver major for unstable, public facing dependency updates. As per the new release cycle, it is aligned with the Kubernetes release.

    What's Changed

    Added

    Changed

    Fixed

    • Clamp scheduling delay to 6 months by @dervoeti in #1779
    • Update admission example and pin to a local crd by @clux in #1782
    • Fix interactive auth mode to allow prompt messages by @gememma in #1800
    • Make kube::runtime::controller::Action ctors const by @imp in #1804
    • Fix oidc with openssl by @saif-88 in #1807

    New Contributors

    Full Changelog: 1.1.0...2.0.0

    Open source →
  8. 1.1.0 26 May 2025
    Release notes

    What's Changed

    Missing attribute bugfix + extra standard derives on core::conversion structs.

    Added

    Fixed

    Full Changelog: 1.0.0...1.1.0

    Open source →
  9. 1.0.0 13 May 2025
    Release notes

    A Major Version

    It's been a long time coming, but time has come to draw the line in the sand. No alphas, no betas. Hope it finds you all well. Thanks to everyone who has contributed over the years.

    This is a somewhat symbolic gesture, because semver-breaking changes are still hard to avoid with a large set of sub-1.0 dependencies we need to bump, as well as managing the large api surface of Kubernetes.

    Therefore, the plan is to align our breaking changes and major bumps with Kubernetes versions / k8s-openapi versions for now, and this should allow our other releases to stream in. See #1688 for more information.

    Kubernetes v1_33 support via k8s-openapi 0.25

    Please upgrade k8s-openapi along with kube to avoid conflicts.

    New minimum versions: MSRV 1.82.0, MK8SV: 1.30*

    KubeSchema

    The CELSchema alternate derive for JsonSchema has been renamed to KubeSchema to indicate the increased functionality.

    In addition to being able to inject CEL rules for validations, it can now also inject x-kubernetes properties such as merge-strategy via #1750, handle #[validate] attributes #1749, and pass validation rules as string literals #1754 :

    #[derive(CustomResource, Serialize, Deserialize, Debug, PartialEq, Clone, KubeSchema)]
    #[kube(...properties)
    struct DocumentSpec {
        /// New merge strategy support
        #[x_kube(merge_strategy = ListMerge::Set)]
        x_kubernetes_set: Vec<String>,
    
        /// CEL Validation now lives on x_kube and supports literal Rules:
        #[x_kube(validation = "!has(self.variantOne) || self.variantOne.int > 22")]
        complex_enum: ComplexEnum,
    }

    See kube.rs docs on validation for more info. Huge thanks to @Danil-Grigorev.

    What's Changed

    Added

    Changed

    Removed

    • Remove deprecated watcher::Event into_iter_* methods by @clux in #1738

    Fixed

    New Contributors

    Full Changelog: 0.99.0...1.0.0

    Open source →
  10. 0.99.0 12 Mar 2025
    Release notes

    Highlights

    Dependency Cleanups

    Features

    What's Changed

    Added

    Changed

    • Replace backoff with backon by @flavio in #1653
    • Bump rand to 0.9 by @clux in #1686
    • Remove rand dependency in favor of tungstenite fn by @clux in #1691
    • Exec can return stdout data even after stdin is closed. by @esw-amzn in #1693
    • Bump json-patch to 4 use bundled jsonptr to 0.7 by @clux in #1718
    • Allow removing hyper-rustls/ring feature by @eliad-wiz in #1717

    Fixed

    • kube-runtime: fix exponential backoff max times by @eliad-wiz in #1713
    • CustomResource derive; allow status attribute to take a path by @clux in #1704

    New Contributors

    Full Changelog: 0.98.0...0.99.0

    Open source →
  11. 0.98.0 23 Dec 2024

    Nothing published for this version

  12. 0.97.0 20 Nov 2024

    Nothing published for this version

  13. 0.96.0 09 Oct 2024

    Nothing published for this version

  14. 0.95.0 16 Sep 2024

    Nothing published for this version

  15. 0.94.2 13 Sep 2024

    Nothing published for this version

  16. 0.94.1 09 Sep 2024

    Nothing published for this version

  17. 0.94.0 09 Sep 2024

    Nothing published for this version

  18. 0.93.1 23 Jul 2024

    Nothing published for this version

  19. 0.93.0 22 Jul 2024

    Nothing published for this version

  20. 0.92.1 19 Jun 2024

    Nothing published for this version

  21. 0.92.0 12 Jun 2024
    Release notes

    This tag was signed with the committer’s verified signature . The key has expired.

    clux Eirik A

    GPG key ID: 5D4B685DE5BEAE01 Expired

    Verified Learn about vigilant mode .

    Open source →
  22. 0.91.0 06 May 2024

    Nothing published for this version

  23. 0.90.0 03 Apr 2024

    Nothing published for this version

  24. 0.89.0 26 Mar 2024

    Nothing published for this version

  25. 0.88.1 26 Jan 2024

    Nothing published for this version

  26. 0.88.0 21 Jan 2024

    Nothing published for this version

  27. 0.87.2 22 Dec 2023

    Nothing published for this version

  28. 0.87.1 01 Nov 2023

    Nothing published for this version

  29. 0.86.0 08 Sep 2023 withdrawn

    Nothing published for this version

  30. 0.85.0 06 Aug 2023

    Nothing published for this version

  31. 0.84.0 14 Jul 2023

    Nothing published for this version

  32. 0.83.0 05 Jun 2023

    Nothing published for this version

  33. 0.82.2 19 Apr 2023

    Nothing published for this version

  34. 0.82.1 14 Apr 2023

    Nothing published for this version

  35. 0.82.0 08 Apr 2023

    Nothing published for this version

  36. 0.81.0 07 Apr 2023

    Nothing published for this version

  37. 0.80.0 02 Mar 2023

    Nothing published for this version

  38. 0.79.0 23 Feb 2023

    Nothing published for this version

  39. 0.78.0 06 Jan 2023

    Nothing published for this version

  40. 0.77.0 15 Dec 2022

    Nothing published for this version

  41. 0.76.0 28 Oct 2022

    Nothing published for this version

  42. 0.75.0 21 Sep 2022

    Nothing published for this version

  43. 0.74.0 09 Jul 2022

    Nothing published for this version

  44. 0.73.1 03 Jun 2022

    Nothing published for this version

  45. 0.73.0 23 May 2022

    Nothing published for this version

  46. 0.72.0 13 May 2022

    Nothing published for this version

  47. 0.71.0 12 Apr 2022

    Nothing published for this version

  48. 0.70.0 20 Mar 2022

    Nothing published for this version

  49. 0.69.1 16 Feb 2022

    Nothing published for this version

  50. 0.69.0 14 Feb 2022

    Nothing published for this version

  51. 0.68.0 01 Feb 2022

    Nothing published for this version

  52. 0.67.0 25 Jan 2022

    Nothing published for this version

  53. 0.66.0 15 Jan 2022

    Nothing published for this version

  54. 0.65.0 10 Dec 2021

    Nothing published for this version

  55. 0.64.0 16 Nov 2021

    Nothing published for this version

  56. 0.63.2 28 Oct 2021

    Nothing published for this version

  57. 0.63.1 26 Oct 2021

    Nothing published for this version

  58. 0.63.0 26 Oct 2021

    Nothing published for this version

  59. 0.62.0 22 Oct 2021

    Nothing published for this version

  60. 0.61.0 09 Oct 2021

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive