Skip to content

Kubernetes.DotNet.Client.ApiException: Error calling ListNamespacedPod: The request was aborted: Could not create SSL/TLS secure channel. #22

@eugen-nw

Description

@eugen-nw

I cannot get this to work using the code below and I'm wondering if anyone could help me. The contents of the filePath file is a copy & paste of the contents of my own ...\.kube\config file.

var k8Client = new KubeConfigClientConfiguration(filePath).CreateClient(AuthType.SSLAuth);
var podsList = k8Client.CoreApi.ListNamespacedPod("default");

The exception call stack is:

Kubernetes.DotNet.Client.ApiException: Error calling ListNamespacedPod: The request was aborted: Could not create SSL/TLS secure channel.
   at Kubernetes.DotNet.Api.Core_v1Api.ListNamespacedPodWithHttpInfo(String _namespace, String pretty, String fieldSelector, Nullable`1 includeUninitialized, String labelSelector, String resourceVersion, Nullable`1 timeoutSeconds, Nullable`1 watch)
   at Kubernetes.DotNet.Api.Core_v1Api.ListNamespacedPod(String _namespace, String pretty, String fieldSelector, Nullable`1 includeUninitialized, String labelSelector, String resourceVersion, Nullable`1 timeoutSeconds, Nullable`1 watch)
   at ScaleoutService.ScaleoutService._GetCurrentInstancesCount() in C:\Users\edaroczy\OneDrive - BoldIQ, Inc\Documents\projects\NetJets\ScaleoutService\ScaleoutService.IScaleoutService.cs:line 229

I'm making this call to an Azure Kubernetes Service instance from a .Net 4.5.2 microservice running within Service Fabric.

The assemblies that I'm using are:

  <package id="BouncyCastle" version="1.8.5" targetFramework="net452" />
  <package id="Kubernetes.DotNet" version="1.0.62" targetFramework="net452" />
  <package id="Newtonsoft.Json" version="10.0.1" targetFramework="net452" />
  <package id="RestSharp" version="105.1.0" targetFramework="net452" />
  <package id="YamlDotNet" version="4.2.2" targetFramework="net452" />

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions