-
Dear kube-rs team, I am testing kube-rs and I am unable to authenticate against the kubeapi. This my code
This is how I run the app
And these are the logs
The config looks right and I tried to configure the authentication in the service using What am I doing it wrong? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You need to create a
It should look something like this (not tested): let connector = {
let mut http = HttpConnector::new();
http.enforce_http(false);
let proxy = hyper_socks2::SocksConnector {
proxy_addr: Uri::from_static("socks5://localhost:1080"),
auth: None,
connector: http,
};
let tls = tokio_native_tls::TlsConnector::from(config.native_tls_connector()?);
hyper_tls::HttpsConnector::from((proxy, tls))
}; |
Beta Was this translation helpful? Give feedback.
You need to create a
TlsConnector
based on your config to authenticate with client certificates. You can do that withconfig.native_tls_connector()
withnative-tls
feature enabled.auth_layer
is for adding token or basic auth (username+password) header, so it's not doing anything for your config.It should look something like this (not tested):