Load in-cluster config in tf.distribute.cluster_resolver.KubernetesClusterResolver #50449
Labels
comp:dist-strat
Distribution Strategy related issues
stat:awaiting tensorflower
Status - Awaiting response from tensorflower
TF 2.5
Issues related to TF 2.5
type:bug
Bug
System information
2.5.0
Describe the current behavior
Currently the
KubernetesClusterResolver
class can only load configs from kube-config file:https://github.com/tensorflow/tensorflow/blob/v2.5.0/tensorflow/python/distribute/cluster_resolver/kubernetes_cluster_resolver.py#L97
Describe the expected behavior
When running in worker pods in cluster, we want to be able to load configs using
.load_incluster_config()
(example)We can't use the
override_client
arg withkubernetes
package either, because once installed theImportError
does not happenContributing
Do you want to contribute a PR? (yes/no):
Yes
Briefly describe your candidate solution(if contributing):
Try to do
k8sconfig.load_incluster_config()
first, if failed then dok8sconfig.load_kube_config()
The text was updated successfully, but these errors were encountered: