* Implement code changes to enhance functionality and improve performance * chore: update version to 18.0 in version.json * fix: correct initialization of opblackList in PluralHelper * chore: update SDK version to 18.0 in README.md * Fixdocfx (#82) * fix: update file references and clean up validation comments in models * chore: add symlink to CONTRIBUTING.md for easier access * fix: update documentation to include full type names for WebSocket and Predicate * fix: include CONTRIBUTING.md in docfx.json build content * refactor: update IKubernetes interface and template for consistency * feat: add Microsoft.CodeAnalysis.CSharp package and improve source normalization in generator context * chore: update package versions in Directory.Packages.props for compatibility and improvements * chore: update Microsoft.VisualStudio.SlnGen and Nerdbank.GitVersioning package versions for compatibility * Implement code changes to enhance functionality and improve performance * chore: update version to 18.0 in version.json * fix: correct initialization of opblackList in PluralHelper * chore: update SDK version to 18.0 in README.md * refactor: update IKubernetes interface and template for consistency * feat: add Microsoft.CodeAnalysis.CSharp package and improve source normalization in generator context * chore: update package versions in Directory.Packages.props for compatibility and improvements * chore: update Microsoft.VisualStudio.SlnGen and Nerdbank.GitVersioning package versions for compatibility * chore: downgrade xunit.runner.visualstudio and Xunit.StaFact package versions for compatibility * chore: update package versions in Directory.Packages.props for compatibility and improvements * style: format code for consistency and readability * feat: update certificate loading logic for .NET 9 compatibility * fix: update certificate loading method for .NET 9 compatibility
28 lines
857 B
C#
28 lines
857 B
C#
// See https://aka.ms/new-console-template for more information
|
|
using k8s;
|
|
using k8s.ClientSets;
|
|
using k8s.Models;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace clientset
|
|
{
|
|
internal class Program
|
|
{
|
|
private static async Task Main(string[] args)
|
|
{
|
|
var config = KubernetesClientConfiguration.BuildConfigFromConfigFile();
|
|
var client = new Kubernetes(config);
|
|
|
|
ClientSet clientSet = new ClientSet(client);
|
|
var list = await clientSet.CoreV1.Pod.ListAsync("default").ConfigureAwait(false);
|
|
foreach (var item in list)
|
|
{
|
|
System.Console.WriteLine(item.Metadata.Name);
|
|
}
|
|
|
|
var pod = await clientSet.CoreV1.Pod.GetAsync("test", "default").ConfigureAwait(false);
|
|
System.Console.WriteLine(pod?.Metadata?.Name);
|
|
}
|
|
}
|
|
}
|