* Refactor examples to streamline code structure and improve readability * Update LangVersion to 13.0 for improved compatibility
18 lines
377 B
C#
Executable File
18 lines
377 B
C#
Executable File
using k8s;
|
|
using System;
|
|
|
|
var config = KubernetesClientConfiguration.BuildDefaultConfig();
|
|
IKubernetes client = new Kubernetes(config);
|
|
Console.WriteLine("Starting Request!");
|
|
|
|
var list = client.CoreV1.ListNamespacedPod("default");
|
|
foreach (var item in list.Items)
|
|
{
|
|
Console.WriteLine(item.Metadata.Name);
|
|
}
|
|
|
|
if (list.Items.Count == 0)
|
|
{
|
|
Console.WriteLine("Empty!");
|
|
}
|