Show/hide folder structure
.
├── .github
│ ├── scripts
│ └── workflows
├── Devantler.K9sCLI
│ └── runtimes
│ ├── linux-arm64
│ │ └── native
│ ├── linux-x64
│ │ └── native
│ ├── osx-arm64
│ │ └── native
│ ├── osx-x64
│ │ └── native
│ ├── win-arm64
│ │ └── native
│ └── win-x64
│ └── native
└── Devantler.K9sCLI.Tests
├── K9sTests
└── assets
20 directories
A simple .NET library that embeds the K9s CLI.
To get started, you can install the package from NuGet.
dotnet add package Devantler.K9sCLI
You can execute the K9s CLI commands using the K9s
class.
using Devantler.K9sCLI;
// Run K9s on with your user profile kubeconfig and the default context
_ = await K9s.RunAsync(cancellationToken: cancellationToken);
// Run K9s on with a specific kubeconfig and context
_ = await K9s.RunAsync("path/to/kubeconfig", "context", cancellationToken);
// Run K9s with a specific editor
_ = await K9s.RunAsync(Editor.Vim, cancellationToken: cancellationToken);