diff --git a/kube-client/src/client/builder.rs b/kube-client/src/client/builder.rs index 4dfd59255..bfaa945c5 100644 --- a/kube-client/src/client/builder.rs +++ b/kube-client/src/client/builder.rs @@ -88,8 +88,8 @@ impl TryFrom for ClientBuilder, Response #[cfg(all(not(feature = "rustls-tls"), feature = "openssl-tls"))] let connector = config.openssl_https_connector_with_connector(connector)?; #[cfg(all(not(feature = "rustls-tls"), not(feature = "openssl-tls")))] - if auth_layer.is_none() { - // no tls stack situation only works on anonymous auth + if auth_layer.is_none() || config.cluster_url.scheme() == Some(&http::uri::Scheme::HTTPS) { + // no tls stack situation only works on anonymous auth with http scheme return Err(Error::TlsRequired); }