-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kubernetes versionInfo returns null #1309
Comments
Strange, I tested this but it's working for me both with masterUrl and without masterUrl. Could you please share the Config object which you use to create client? |
I have the same problem,I found the root cause. private static boolean loadFromKubeconfig(Config config, String context, String kubeconfigContents, String kubeconfigPath) {
....
if (currentCluster != null) {
config.setMasterUrl(currentCluster.getServer());
config.setNamespace(currentContext.getNamespace()); private static Config autoConfigure(Config config, String context) {
...
if (!config.masterUrl.endsWith("/")) {
config.masterUrl = config.masterUrl + "/";
}
return config;
} maybe i can send a pr to fix this? ERROR is
|
@candyleer : Yeah, please create PR and we can discuss over there. |
@rohanKanojia I have create PR very simple ,#1329 |
The below always returns null because the implementation is not constructing the endpoint properly and is failing to complete the HTTP request correctly.
VersionInfo versionInfo = kubernetesClient.getVersion();
In the ClusterOperationsImpl#fetchVersion method, it should be
Builder requestBuilder = (new Builder()).get().url(this.config.getMasterUrl() + "/" + this.versionEndpoint);
The path separator is missing.
Line 43:
https://github.com/fabric8io/kubernetes-client/blob/59e5b9d0f318f4f78f417efaec34050ed8122b8f/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/ClusterOperationsImpl.java
The text was updated successfully, but these errors were encountered: