public async Task LocateTest() { Kubernetes kubernetes = new Kubernetes(TestConfiguration.Configure()); TillerLocator locator = new TillerLocator(kubernetes); var endPoint = await locator.Locate().ConfigureAwait(false); Assert.NotNull(endPoint); }
public static async Task <IPEndPoint> GetEndPoint() { if (endPoint == null) { var configuration = Configure(); var kubernetes = new Kubernetes(configuration); TillerLocator locator = new TillerLocator(kubernetes); endPoint = await locator.Locate(); } return(endPoint); }
private static async Task <TillerClient> GetClient() { var kubeconfig = System.IO.File.ReadAllText("admin.conf"); var config = KubernetesClientConfiguration.BuildConfigFromConfigFile(kubeconfig: kubeconfig); var kubernetes = new Kubernetes(config); var locator = new TillerLocator(kubernetes); var endPoint = await locator.Locate(); var client = new TillerClient(endPoint.ToString()); return(client); }