502 Bad Gateway Errors on All CCS Endpoints in VCF Automation
search cancel

502 Bad Gateway Errors on All CCS Endpoints in VCF Automation

book

Article ID: 459886

calendar_today

Updated On:

Products

VCF Automation

Issue/Introduction

  • API calls or UI requests routed to any CCS (Cloud Configuration Service) endpoint fail, returning a 502 Bad Gateway HTTP error.

  • When inspecting the appliance, the ccs-k3s-app pod status shows as Running despite the endpoint failures.

  • Checking the logs for the ccs-k3s-app pod reveals that it is not writing any new logs, with the sole exception of the nginx container logging.

Environment

VCF Automation 9.1.0, 9.1.1, 9.1.2

Cause

The underlying k3s pod has silently stopped listening on port 6443. Because the configured pod health checks are still passing, the Kubernetes scheduler assumes the pod is healthy and does not automatically evict or restart the unresponsive pod, leading to the persistent 502 errors.

Resolution

To resolve this issue, you must manually restart the ccs-k3s deployment to force the environment to spin up a healthy pod that listens on the correct port.

  1. Open an SSH connection to the control plane node (VCF Automation) as the vmware-system-user using the APPLIANCE_ROOT_PASSWORD.
    To obtain administrative access to the control plane, enter the following commands:
    sudo -i
    export KUBECONFIG=/etc/kubernetes/admin.conf
  2. Execute the rollout restart command to gracefully restart the CCS deployment in the Prelude namespace:
    kubectl rollout restart deployment ccs-k3s-app -n prelude
  3. Monitor the pod restart process to ensure the new pod initializes correctly:
    kubectl get pods -n prelude -w | grep ccs-k3s
  4. Verify the resolution by checking the logs of the newly spun-up pod to ensure it is logging normally, and attempt a call to a CCS endpoint to confirm the 502 error has cleared.