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
public KubernetesClient getObject() throws Exception {
return new DefaultKubernetesClient();
}
// finally invoke below codes(transfer content to k8s Config)
public static Config parseConfigFromString(String contents) throws IOException {
ObjectMapper mapper = Serialization.yamlMapper();
// below is jackjson method
return mapper.readValue(contents, Config.class); <----------this line throws below exception
}
exception info:
com.fasterxml.jackson.databind.JsonMappingException: No resource type found for:xxx.xxx.com/v1beta1#ClusterMetadata
at [Source: java.io.StringReader@43de88f3; line: 16, column: 7] (through reference chain: io.fabric8.kubernetes.api.model.Config["clusters"]->java.util.ArrayList[0]->io.fabric8.kubernetes.api.model.NamedCluster["cluster"]->io.fabric8.kubernetes.api.model.Cluster["extensions"]->java.util.ArrayList[0]->io.fabric8.kubernetes.api.model.NamedExtension["extension"])
Below is the example of the k8s config located in ~/.kube/config
################ below part is new added(begin)
extensions:
- extension:
DetailAPI: https://xxx.xxx.com/#/promote/detail?corporateName=xxx&containerSeq=
ImageResultAPI: ""
Profile: real
PromoteAPI: https://xxx.xxx.xxx.com/api/docker/info
Type: default
apiVersion: xxx.xxx.com/v1beta1
kind: ClusterMetadata
metadata:
creationTimestamp: null
name: metadata
################ above part is new added(end)
Can load k8s configuration successfully using jackjson.
The text was updated successfully, but these errors were encountered:
When load k8s configuration by below codes
exception info:
Below is the example of the k8s config located in
~/.kube/config
Btw, if i removed below content
Can load k8s configuration successfully using jackjson.
The text was updated successfully, but these errors were encountered: