Skip to content

Cloudstack API end point getting failed while deploying nginx as loadbalancer on kubernetes #8936

Description

@vishnuvs369

I have an issue with cloudstack.. i'm deploying nginx service as loadbalancer on kubernetes getting an error given below...
image

Events:
  Type     Reason                  Age                  From                Message
  ----     ------                  ----                 ----                -------
  Warning  SyncLoadBalancerFailed  4s (x1027 over 17h)  service-controller  Error syncing load balancer: failed to check if load balancer exists before cleanup: error retrieving load balancer rules: Get http://192.168.10.120:8080/client/api?apiKey=5yQj6eY6hAoNFrHFFNK1RFvMsioFwpcruIkBk09-GhUDcA6CO_jO1-K_Gyyoqa0l7DBxmseK70GsrGfe2opabA&command=listLoadBalancerRules&keyword=ad715cbd81ac64c079be9a71f46a7c0c&listall=true&response=json&signature=WIJuc9uYnkd5XGXmtiUcRiGWzuw%3D: net/http: request canceled (Client.Timeout exceeded while awaiting headers)

i configured Endpoint url (endpoint.url) in Global settings using LAN IP...can anyone help me on this

Activity

  1. boring-cyborg commented on Apr 18, 2024

    @boring-cyborg

    Thanks for opening your first issue here! Be sure to follow the issue template!

  2. weizhouapache commented on Apr 18, 2024

    @weizhouapache
    Member

    @vishnuvs369
    the endpoint URL should be reachable from the k8s pods.

    If you can fix the URL, you can re-deploy the k8s secret by script /opt/bin/deploy-cloudstack-secret in the control node.
    if not, you have to configure the load balancing rules manually.

  3. vishnuvs369 commented on Apr 20, 2024

    @vishnuvs369
    Author

    @weizhouapache
    Thanks for the update, We can either add a public ip interface to the management server and configure that IP on the endpoint url or do a NAT route on 192.168.10.120 IP and configure public ip on the endpoint url. Our concern is that we need our management ui to be accessed only internally. So configuring public IP on management network we will have to take care of additional security... What is your advice for best practice...

  4. weizhouapache commented on Apr 20, 2024

    @weizhouapache
    Member

    @weizhouapache
    Thanks for the update, We can either add a public ip interface to the management server and configure that IP on the endpoint url or do a NAT route on 192.168.10.120 IP and configure public ip on the endpoint url. Our concern is that we need our management ui to be accessed only internally. So configuring public IP on management network we will have to take care of additional security... What is your advice for best practice...

    However, user vms should be unable to access the management network, otherwise it is a more severe security issue.

    You can add some firewall rules for the public ip of the management IP.

  5. PaX101 commented on Apr 22, 2024

    @PaX101

    We are experiensing the same issue, it looks to be the same issue as 4.18 where the pages would take a very long time to load where they were pulling all data instead of what was needed. The command causing this slowness on our one:

    https://my.url.com/client/api?apiKey=myapikeyhere&command=listVirtualMachines&listall=true&response=json&signature=mysignature

    If i run this command in a browser the API takes around 5-10 minutes to load it, however is i try to run normal commands on the API such as listVirtualMachinesMetrics it is instant.

  6. DaanHoogland commented on Apr 24, 2024

    @DaanHoogland
    Contributor

    We are experiensing the same issue, it looks to be the same issue as 4.18 where the pages would take a very long time to load where they were pulling all data instead of what was needed. The command causing this slowness on our one:

    https://my.url.com/client/api?apiKey=myapikeyhere&command=listVirtualMachines&listall=true&response=json&signature=mysignature

    If i run this command in a browser the API takes around 5-10 minutes to load it, however is i try to run normal commands on the API such as listVirtualMachinesMetrics it is instant.

    @PaX101 , your comment seems to relate to a totally different issue, does it? Did you plane to add it to another issue?

  7. Noelantogerorge commented on Apr 25, 2024

    @Noelantogerorge

    Hi Guys,
    It is not best practice to have a public interface on the management server and open port 8080 to public access. management server should have only local network access. So when configuring Kubernetes, it checks for the endpoint URL, and that URL should be accessible from the Kubernetes cluster. In such case, kubernetes VR is only has public nic and a local NIC, which will not be available to management server local network. So how is it possible to communicate a Kubernetes cluster with the management server?
    Any advice will be great and helpful.

  8. DaanHoogland commented on Apr 25, 2024

    @DaanHoogland
    Contributor

    @Noelantogerorge , In your scenario I would say you need a proxy with firewall to allow your cluster to call back. And then configure the endpoint.url to be the proxy.

  9. added this to the 4.19.1.0 milestone on Apr 30, 2024
  10. modified the milestones: 4.19.1.0, 4.19.2 on Jun 18, 2024
  11. locked and limited conversation to collaborators on Jun 18, 2024
  12. converted this issue into a discussion #9267 on Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions