Closed
Description
What would you like to be added:
- Many users in OpenYurt community have requested that support InClusterConfig for pods to access kube-apiserver through yurt-hub on edge nodes. so pods on cloud can move to edge cluster smoothly.
- And based on InClusterConfig, pods will use address
https://${KUBERNETES_SERVICE_HOST}:${KUBERNETES_SERVICE_PORT}
to access kube-apiserver.
so we need to add the following sub features.
- sub feature1: yurthub supports https serve.
- sub feature2: env
KUBERNETES_SERVICE_HOST and
KUBERNETES_SERVICE_PORTshould be the address that yurt-hub listening, like
169.254.2.1:10261`
Why is this needed:
-
In native kubernetes cluster, Pods usually use
InClusterConfig
setting to access kube-apiserver.- The detail description is here: https://kubernetes.io/docs/tasks/access-application-cluster/access-cluster/#accessing-the-api-from-a-pod
-
If
InClusterConfig
for pods is supported in OpenYurt, pods in native kubernetes cluster can be moved into OpenYurt cluster smoothly and no modification.
others
- sub feature1 is handled by @luckymrwang in this pull request: #368