KubeOps.Cli
9.7.0
See the version list below for details.
dotnet tool install --global KubeOps.Cli --version 9.7.0
dotnet new tool-manifest
dotnet tool install --local KubeOps.Cli --version 9.7.0
#tool dotnet:?package=KubeOps.Cli&version=9.7.0
nuke :add-package KubeOps.Cli --version 9.7.0
KubeOps CLI
The KubeOps CLI (dotnet kubeops
) is a .NET Tool designed to streamline common development tasks when building Kubernetes operators with KubeOps. It helps with generating Custom Resource Definition (CRD) manifests, installing/uninstalling those CRDs in a cluster, generating deployment manifests, and inspecting your cluster.
Installation
The KubeOps CLI can be installed either locally within a specific repository or globally on your machine.
Local Installation (Recommended for Projects):
First, ensure you have a tool manifest file (usually .config/dotnet-tools.json
). If not, create one:
dotnet new tool-manifest
Then install the CLI:
dotnet tool install KubeOps.Cli
This installs and pins the tool version for the current repository. Invoke it using dotnet kubeops <command>
.
Global Installation (Convenient for General Use):
dotnet tool install --global KubeOps.Cli
This makes the dotnet kubeops
command available anywhere on your system. Use dotnet tool update --global KubeOps.Cli
to get the latest version.
Available Commands
Below is an overview of the available commands. For detailed options and descriptions for any command, use the -h
or --help
flag (e.g., dotnet kubeops generate --help
).
Cluster Interaction
api-version
(aliasav
): Displays version information about the Kubernetes cluster API server that your currentkubeconfig
context points to.dotnet kubeops api-version
install
(aliasi
): Installs Custom Resource Definitions (CRDs) into the connected cluster. It scans the specified solution or project file (-s <path>
) for types decorated with[KubernetesEntity]
, generates the corresponding CRD manifests using the transpiler logic, and applies them to the cluster.# Install CRDs defined in MyOperator.csproj into the current cluster dotnet kubeops install -s ./MyOperator.csproj
uninstall
(aliasu
): Uninstalls CRDs from the connected cluster. Likeinstall
, it scans the specified project/solution (-s <path>
) to identify the CRDs managed by KubeOps and deletes them from the cluster.# Uninstall CRDs defined in MyOperator.csproj dotnet kubeops uninstall -s ./MyOperator.csproj
Code & Manifest Generation
new
: Scaffolds new KubeOps projects.new operator
: Creates a new operator project from a template, including a basic custom resource, controller, and finalizer.# Create a new operator project in a directory named 'MyNewOperator' dotnet kubeops new operator MyNewOperator
generate
(aliasesgen
,g
): Parent command for various generation tasks.generate crd
: Generates CRD YAML manifests for entities found in the specified solution/project (-s <path>
) and outputs them to a specified directory (-o <path>
). This does not apply them to the cluster; it only creates the files.- If
-o
is omitted, output defaults to the current directory. - This command uses the KubeOps.Transpiler package to convert C# entity definitions to CRDs.
# Generate CRD files for MyOperator.csproj into the './deploy' directory dotnet kubeops generate crd -s ./MyOperator.csproj -o ./deploy
- If
generate operator
(aliasop
): Generates a set of Kubernetes deployment manifests (e.g., Deployment, ServiceAccount, RBAC Roles/Bindings) necessary to deploy your operator. It inspects your operator project (-s <path>
) and outputs the YAML files to a specified directory (-o <path>
). This often includes manifests for any webhooks defined.- If
-o
is omitted, output defaults to the current directory. - This command inspects
[EntityRbac]
attributes on controllers/webhooks to generateRole
andClusterRole
resources. - It also finds webhook implementations (
[ValidationWebhook]
,[MutationWebhook]
,[ConversionWebhook]
) to generate correspondingValidatingWebhookConfiguration
,MutatingWebhookConfiguration
, and CRDconversion
settings. - It utilizes the KubeOps.Transpiler package for analyzing attributes.
# Generate deployment manifests for MyOperator.csproj into './deploy' dotnet kubeops generate operator -s ./MyOperator.csproj -o ./deploy
- If
For more detailed usage examples and explanations, please refer to the main KubeOps CLI Documentation.
Example
When running dotnet kubeops api-version
, your output may look like this:
> dotnet kubeops api-version
Kubernetes API Version
┌─────────────┬─────────────┐
│ Git-Version │ v1.29.1 │
│ Major │ 1 │
│ Minor │ 29 │
│ Platform │ linux/amd64 │
└─────────────┴─────────────┘
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.
Version | Downloads | Last Updated |
---|---|---|
9.11.4 | 293 | 9/16/2025 |
9.11.4-prerelease.1 | 122 | 9/10/2025 |
9.11.3 | 242 | 9/9/2025 |
9.11.3-prerelease.1 | 94 | 9/7/2025 |
9.11.2 | 873 | 8/19/2025 |
9.11.2-prerelease.2 | 123 | 8/17/2025 |
9.11.2-prerelease.1 | 124 | 8/12/2025 |
9.11.1 | 521 | 7/29/2025 |
9.11.1-prerelease.3 | 107 | 7/27/2025 |
9.11.1-prerelease.2 | 462 | 7/24/2025 |
9.11.1-prerelease.1 | 514 | 7/22/2025 |
9.11.0 | 602 | 7/22/2025 |
9.11.0-prerelease.7 | 121 | 7/17/2025 |
9.11.0-prerelease.6 | 120 | 7/17/2025 |
9.11.0-prerelease.5 | 116 | 7/17/2025 |
9.11.0-prerelease.4 | 120 | 7/17/2025 |
9.11.0-prerelease.3 | 118 | 7/17/2025 |
9.11.0-prerelease.2 | 118 | 7/16/2025 |
9.11.0-prerelease.1 | 119 | 7/16/2025 |
9.10.0 | 843 | 7/3/2025 |
9.9.0 | 316 | 6/30/2025 |
9.8.2 | 434 | 6/20/2025 |
9.8.1 | 485 | 6/13/2025 |
9.8.0 | 460 | 6/10/2025 |
9.7.0 | 218 | 6/6/2025 |
9.6.0 | 488 | 5/23/2025 |
9.5.0 | 3,938 | 5/8/2025 |
9.4.1 | 716 | 4/29/2025 |
9.4.0 | 528 | 4/28/2025 |
9.3.0 | 4,377 | 3/26/2025 |
9.2.0 | 3,080 | 1/24/2025 |
9.1.5 | 6,734 | 9/10/2024 |
9.1.4 | 1,801 | 8/26/2024 |
9.1.3 | 22,731 | 6/28/2024 |
9.1.2 | 3,101 | 6/20/2024 |
9.1.1 | 1,039 | 5/22/2024 |
9.1.0 | 1,271 | 5/15/2024 |
9.0.2 | 274 | 5/13/2024 |
9.0.0 | 6,138 | 3/13/2024 |
9.0.0-pre.4 | 138 | 4/19/2024 |
9.0.0-pre.3 | 140 | 3/21/2024 |
9.0.0-pre.2 | 142 | 3/13/2024 |
9.0.0-pre.1 | 143 | 3/7/2024 |
8.0.2-pre.2 | 202 | 2/21/2024 |
8.0.2-pre.1 | 147 | 2/19/2024 |
8.0.1 | 2,776 | 2/13/2024 |
8.0.1-pre.7 | 118 | 2/12/2024 |
8.0.1-pre.6 | 102 | 2/7/2024 |
8.0.1-pre.5 | 142 | 2/5/2024 |
8.0.1-pre.4 | 102 | 1/31/2024 |
8.0.1-pre.3 | 117 | 1/26/2024 |
8.0.1-pre.2 | 107 | 1/25/2024 |
8.0.1-pre.1 | 108 | 1/18/2024 |
8.0.0 | 801 | 1/17/2024 |
8.0.0-pre.45 | 100 | 1/17/2024 |
8.0.0-pre.44 | 115 | 1/16/2024 |
8.0.0-pre.43 | 89 | 1/16/2024 |
8.0.0-pre.42 | 128 | 1/10/2024 |
8.0.0-pre.41 | 198 | 1/2/2024 |
8.0.0-pre.40 | 168 | 12/27/2023 |
8.0.0-pre.39 | 128 | 12/21/2023 |
8.0.0-pre.38 | 173 | 12/6/2023 |
8.0.0-pre.37 | 135 | 12/6/2023 |
8.0.0-pre.36 | 112 | 12/3/2023 |
8.0.0-pre.35 | 142 | 11/28/2023 |
8.0.0-pre.34 | 139 | 11/24/2023 |
8.0.0-pre.33 | 114 | 11/24/2023 |
8.0.0-pre.32 | 123 | 11/23/2023 |
8.0.0-pre.31 | 109 | 11/23/2023 |
8.0.0-pre.30 | 111 | 11/23/2023 |
8.0.0-pre.29 | 119 | 11/11/2023 |
8.0.0-pre.28 | 109 | 11/8/2023 |
8.0.0-pre.27 | 204 | 10/23/2023 |
8.0.0-pre.26 | 137 | 10/19/2023 |
8.0.0-pre.25 | 123 | 10/18/2023 |
8.0.0-pre.24 | 157 | 10/13/2023 |
8.0.0-pre.23 | 125 | 10/13/2023 |
8.0.0-pre.22 | 143 | 10/13/2023 |
8.0.0-pre.21 | 135 | 10/12/2023 |
8.0.0-pre.20 | 116 | 10/11/2023 |
8.0.0-pre.19 | 137 | 10/9/2023 |
8.0.0-pre.18 | 117 | 10/9/2023 |
8.0.0-pre.17 | 120 | 10/7/2023 |
8.0.0-pre.16 | 134 | 10/6/2023 |
8.0.0-pre.15 | 137 | 10/6/2023 |
8.0.0-pre.14 | 113 | 10/5/2023 |
8.0.0-pre.13 | 122 | 10/5/2023 |
8.0.0-pre.12 | 116 | 10/4/2023 |
8.0.0-pre.11 | 119 | 10/3/2023 |
8.0.0-pre.10 | 141 | 10/3/2023 |
8.0.0-pre.9 | 133 | 10/3/2023 |
8.0.0-pre.8 | 120 | 10/2/2023 |
8.0.0-pre.7 | 126 | 10/2/2023 |
8.0.0-pre.6 | 136 | 9/29/2023 |
8.0.0-pre.5 | 118 | 9/28/2023 |
8.0.0-pre.4 | 117 | 9/28/2023 |
8.0.0-pre.3 | 131 | 9/27/2023 |
8.0.0-pre.2 | 99 | 9/26/2023 |
8.0.0-pre.1 | 111 | 9/22/2023 |
'# [9.7.0](https://github.com/buehler/dotnet-operator-sdk/compare/v9.6.0...v9.7.0) (2025-06-06)
### Features
* (re)add KubeObs.Templates for easy creating operators ([#894](https://github.com/buehler/dotnet-operator-sdk/issues/894)) ([57422ad](https://github.com/buehler/dotnet-operator-sdk/commit/57422adbe4c1a2d10baca0b868c8509b3b904e96))
* introduce `EntityLoggingScope` to support scopes as key-value pairs inside custom properties of application insights ([#893](https://github.com/buehler/dotnet-operator-sdk/issues/893)) ([d9caf6e](https://github.com/buehler/dotnet-operator-sdk/commit/d9caf6eec5c1e744bc7da4afcae47f00ee41daa3))
'