You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I am following a simple example for listing pods, using Client::try_default() to instantiate the client, then listing pods in a namespace. The code is:
use k8s_openapi::api::core::v1::Pod;
use kube::{Client, api::{Api, ListParams}};
use simple_result::SimpleResult;
#[tokio::main]
async fn main() -> SimpleResult<()> {
let namespace = "kubeflow";
let client = Client::try_default().await?;
let api = Api::<Pod>::namespaced(client.clone(), &namespace);
let pods = api.list(&ListParams::default()).await?;
for pod in pods {
let new_pod = pod.clone();
println!("{}, {:?}", new_pod.metadata.name.unwrap(), pod);
}
Ok(())
}
There is a kubernetes configuration file at ~/.kube/config.
When reaching api.list the following error message is printed to terminal, and program crashes:
Closing as a duplicate of #153 (same error message). But if you would like to test a potential fix, you could try the branch at #597 (or switch back to openssl, because this is a rustls limitation atm).
Closing as a duplicate of #153 (same error message). But if you would like to test a potential fix, you could try the branch at #597 (or switch back to openssl, because this is a rustls limitation atm).
Hi! I am following a simple example for listing pods, using
Client::try_default()
to instantiate the client, then listing pods in a namespace. The code is:use k8s_openapi::api::core::v1::Pod;
use kube::{Client, api::{Api, ListParams}};
use simple_result::SimpleResult;
There is a kubernetes configuration file at
~/.kube/config
.When reaching
api.list
the following error message is printed to terminal, and program crashes:My
Cargo.toml
follows the example:The text was updated successfully, but these errors were encountered: