You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run OpenShift.OpenAPITransform project to generate the hot-fixed OpenAPI specification document.
Create .NET Framework Class Library Project with Visual Studio.
Add REST API Client in the project context menu.
Specify the json file path generated by step 1.
(optional) If you want this clinet library as a .NET Core, create a placehoolder .NET Core project and copy the folder to .NET Core project.
How to use
Add the generated proejct reference to your project.
Add Microsoft.Rest.ClientRuntim package reference to your projct.
Write a code!
//if your master URL has an invalid SSLvarhandler=new HttpClientHandler
{ServerCertificateCustomValidationCallback= HttpClientHandler.DangerousAcceptAnyServerCertificateValidator
};varclient=new OpenShiftAPIwithKubernetes(new Uri("https://<master_host>:8443/"),new TokenCredentials("<token>"), handler);varpods=await client.ListCoreV1NamespacedPodAsync("development");foreach(var pod in pods.Items){
Console.WriteLine(pod.Metadata.Name +"="+ pod.Status.Phase);}