diff --git a/Sources/SwiftkubeClient/Client/KubernetesClient.swift b/Sources/SwiftkubeClient/Client/KubernetesClient.swift index 167ff4c..f14394d 100644 --- a/Sources/SwiftkubeClient/Client/KubernetesClient.swift +++ b/Sources/SwiftkubeClient/Client/KubernetesClient.swift @@ -142,8 +142,13 @@ public class KubernetesClient { self.logger = logger ?? SwiftkubeClient.loggingDisabled var tlsConfiguration = TLSConfiguration.makeClientConfiguration() - tlsConfiguration.minimumTLSVersion = .tlsv12 - tlsConfiguration.trustRoots = config.trustRoots + + if config.insecureSkipTLSVerify { + tlsConfiguration.certificateVerification = .none + } else { + tlsConfiguration.minimumTLSVersion = .tlsv12 + tlsConfiguration.trustRoots = config.trustRoots + } if case let KubernetesClientAuthentication.x509(clientCertificate, clientKey) = config.authentication { tlsConfiguration.certificateChain = [.certificate(clientCertificate)]