We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 39bb616 commit f8546d1Copy full SHA for f8546d1
util/src/main/java/io/kubernetes/client/util/Config.java
@@ -104,7 +104,15 @@ public static ApiClient fromConfig(Reader input) {
104
105
public static ApiClient fromConfig(KubeConfig config) {
106
ApiClient client = new ApiClient();
107
- client.setBasePath(config.getServer());
+ String server = config.getServer();
108
+ if (!server.startsWith("http://") && !server.startsWith("https://")) {
109
+ if (server.indexOf(":443") != -1) {
110
+ server = "https://" + server;
111
+ } else {
112
+ server = "http://" + server;
113
+ }
114
115
+ client.setBasePath(server);
116
117
try {
118
KeyManager[] mgrs = SSLUtils.keyManagers(
0 commit comments