liqo: Unable to connect to Kubernetes API server, after namesapce offloading

What happened:

We are unable to connect to the Kubernetes API server of the host cluster from the member cluster using the kubernetesClient java API. getting the read timeout error. Error : Kubernetes error during API access check, io.fabric8.kubernetes.client.KubernetesClientException: An error has occurred.. Caused by: io.fabric8.kubernetes.client.KubernetesClientException: An error has occurred.. Caused by: java.net.SocketTimeoutException: Read timed out.

To test this we are using the curl command curl https://${KUBERNETES_SERVICE_HOST}:${KUBERNETES_SERVICE_PORT}/openapi/v2 --header "Authorization: Bearer $(cat /var/run/secrets/[kubernetes.io/serviceaccount/token](http://kubernetes.io/serviceaccount/token))" --cacert /var/run/secrets/[kubernetes.io/serviceaccount/ca.crt](http://kubernetes.io/serviceaccount/ca.crt)

This was working earlier but had stopped with the latest version, had tried on v0.5.4 and had same issue

What you expected to happen:

Able to connect to Kubernetes API server of host cluster from member cluster

How to reproduce it (as minimally and precisely as possible):

  1. Create 2 AKS cluster (host and member)
  2. Offload 2 namespaces from host to member cluster. namespace1 with podoffloadingStrategy as Local and namespace2 with podoffloadingStrategy as Remote
  3. Deploy a pod on host cluster on namespace2
  4. Pod tries to connect to kubernetes API server of host cluster, which causes the issue.

Anything else we need to know?:

This works without the namespace offloading if pod is deployed on another namespace, other than the offloaded namespace.

Environment:

  • Liqo version: v.0.6.0, v0.5.4
  • Kubernetes version (use kubectl version): v1.23
  • Cloud provider or hardware configuration: Azure
  • Network plugin and version: Kubenet
  • Install tools: liqoctl
  • Others:

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Reactions: 2
  • Comments: 17 (8 by maintainers)

Most upvoted comments

@giorio94 Thank you, please keep us posted