Hi,
The F8 kubernetes client recuperates the currentContext of the $home/.kube/config file using this method
Context currentContext = KubeConfigUtils.getCurrentContext(kubeConfig);
which is declared within the class Config under "private boolean tryKubeConfig(Config config)"
Is it possible to set this context programmatically which is equivalent to ("oc oc config set-context <context_nickname> [--cluster=<cluster_nickname>] [--user=<user_nickname>] [--namespace=<namespace>]") ?
As I know the user & has its Oauth token
Config config = new ConfigBuilder()
.withUsername("admin")
.withOauthToken("zWKpiRNfMxfk8r4GRx12kNA4PrnAQugDcUSIbYi3fGE")
.build();
try (final KubernetesClient client = new DefaultKubernetesClient(config)) {,
I would like to access its namespace (= default") and not what is defined within the currentContext (by example --> myproject/192-168-64-25:8443/developer)
Regards,
Charles