![]() |
VOOZH | about |
dotnet add package Archetypical.Software.K8s.Utilities --version 2.0.0
NuGet\Install-Package Archetypical.Software.K8s.Utilities -Version 2.0.0
<PackageReference Include="Archetypical.Software.K8s.Utilities" Version="2.0.0" />
<PackageVersion Include="Archetypical.Software.K8s.Utilities" Version="2.0.0" />Directory.Packages.props
<PackageReference Include="Archetypical.Software.K8s.Utilities" />Project file
paket add Archetypical.Software.K8s.Utilities --version 2.0.0
#r "nuget: Archetypical.Software.K8s.Utilities, 2.0.0"
#:package Archetypical.Software.K8s.Utilities@2.0.0
#addin nuget:?package=Archetypical.Software.K8s.Utilities&version=2.0.0Install as a Cake Addin
#tool nuget:?package=Archetypical.Software.K8s.Utilities&version=2.0.0Install as a Cake Tool
Utilities extending the KubeOps and IKubernetes Client. This package provides:
IKubernetesClientThis package multi-targets .NET 8, 9, and 10. Package dependencies are pinned per target framework to prevent cross-framework version mismatches.
| Target Framework | KubeOps.KubernetesClient | Microsoft.Extensions.Configuration |
|---|---|---|
| net8.0 | 8.0.0 | 8.0.0 |
| net9.0 | 9.0.2 | 9.0.0 |
| net10.0 | 10.0.4 | 10.0.0 |
dotnet add package Archetypical.Software.K8s.Utilities
Deletes a resource without throwing on 404. Returns a V1Status with the HTTP status code and message.
await client.DeleteProtected<MyCustomResource>("resource-name", "default");
Updates the status subresource and optionally handles resource version conflicts by reloading the latest metadata.
await client.UpdateStatusProtected(resource, force: true);
Creates or updates a resource depending on existence.
var saved = await client.Upsert(resource);
PodExecutor provides a serialized execution helper for NamespacedPodExecAsync with a configurable timeout.
var executor = new PodExecutor(configuration);
var output = await executor.ExecOnPod(client, pod, container, "ls", "-la");
Configuration key:
POD_EXECUTION_TIMEOUT_OVERRIDE (seconds, default: 30)K8SPortForward.ConnectAsync creates a local TCP listener that forwards to a pod port. This is intentionally single-threaded and intended for lightweight tooling.
using var forward = await K8SPortForward.ConnectAsync(k8sClient, pod, portOnPod: 8080, portOnMachine: 18080);
K8SPortForwardedHttpClient.Create builds a wrapper around an HttpClient that forwards traffic to a pod using the port-forwarding websocket. The returned object implements IDisposable and should be disposed when no longer needed.
using var httpClient = await K8SPortForwardedHttpClient.Create(k8sClient, pod, new[] { 8080 });
var response = await httpClient.GetAsync("http://localhost/");
This repository includes an xUnit test project targeting .NET 8.
dotnet test
The package is configured to generate a NuGet package on build.
dotnet build -c Release
UpdateStatusProtected conflicts, set force: true to reload the latest resource version before retrying.GPL-3.0-only. See .
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.