public class KubeConfigUtils extends Object
~/.kube/config
which is updated when you use commands
like osc login
and osc project myproject
Constructor and Description |
---|
KubeConfigUtils() |
Modifier and Type | Method and Description |
---|---|
static io.fabric8.kubernetes.api.model.Cluster |
getCluster(io.fabric8.kubernetes.api.model.Config config,
io.fabric8.kubernetes.api.model.Context context)
Returns the current
Cluster for the current context |
static io.fabric8.kubernetes.api.model.Context |
getCurrentContext(io.fabric8.kubernetes.api.model.Config config)
Returns the current context in the given config
|
static io.fabric8.kubernetes.api.model.AuthInfo |
getUserAuthInfo(io.fabric8.kubernetes.api.model.Config config,
io.fabric8.kubernetes.api.model.Context context)
Returns the current
AuthInfo for the current context and user |
static String |
getUserToken(io.fabric8.kubernetes.api.model.Config config,
io.fabric8.kubernetes.api.model.Context context)
Returns the current user token for the config and current context
|
static io.fabric8.kubernetes.api.model.Config |
parseConfig(File file) |
public static io.fabric8.kubernetes.api.model.Config parseConfig(File file) throws IOException
IOException
public static io.fabric8.kubernetes.api.model.Context getCurrentContext(io.fabric8.kubernetes.api.model.Config config)
public static String getUserToken(io.fabric8.kubernetes.api.model.Config config, io.fabric8.kubernetes.api.model.Context context)
public static io.fabric8.kubernetes.api.model.AuthInfo getUserAuthInfo(io.fabric8.kubernetes.api.model.Config config, io.fabric8.kubernetes.api.model.Context context)
AuthInfo
for the current context and userpublic static io.fabric8.kubernetes.api.model.Cluster getCluster(io.fabric8.kubernetes.api.model.Config config, io.fabric8.kubernetes.api.model.Context context)
Cluster
for the current contextCopyright © 2015 Red Hat. All rights reserved.