Skip to content

Upgrading#

You can upgrade kube and it's sibling crate k8s-openapi using normal Rust methods to upgrade.

kube and k8s-openapi are siblings

kube depends on k8s-openapi, but users need to select the Kubernetes version on k8s-openapi. Whenever k8s-openapi releases a new version, kube releases a new version shortly after.

We recommend you bump both kube and k8s-openapi crates at the same time to avoid build issues.

Consider bumping the kubernetes-version feature pin on k8s-openapi unless you are using its latest feature.

Command Line#

Using cargo upgrade via cargo-edit:

cargo upgrade -p kube -p k8s-openapi -i

Dependabot#

Configure the cargo ecosystem on dependabot and group kube and k8s-openapi upgrades together:

  - package-ecosystem: "cargo"
    directory: "/"
    schedule:
      interval: "weekly"
    groups:
      kube:
        patterns:
          - kube
          - k8s-openapi

Renovate#

Add package rules for Kubernetes crates that match on prefixes:

packageRules: [
        {
            matchPackagePrefixes: [
                "kube",
                "k8s",
            ],
            groupName: "kubernetes crates",
            matchManagers: [
                "cargo"
            ],
        }
]