Skip to content

[FAQ] #407

Description

@chakirou18

Course

ai-dev-tools-zoomcamp

Question

Why does my Kubernetes deployment work locally with act but fail on GitHub Actions with "could not locate any control plane nodes for cluster named 'agent-relay'"?

Answer

A GitHub-hosted runner starts with a fresh environment and does not contain the local kind cluster that may already exist on your development machine.

This can cause the workflow to fail with:

ERROR: could not locate any control plane nodes for cluster named 'agent-relay'.

Before loading the Docker image into kind or deploying the Kubernetes manifests, make sure the cluster exists.

For example:

if ! kind get clusters | grep -qx "agent-relay"; then
kind create cluster --name agent-relay
fi

After the cluster is created, the workflow can continue with:

  1. Loading the Docker image into kind.
  2. Applying the Kubernetes manifests.
  3. Waiting for the deployment rollout.
  4. Verifying the deployed API.

This issue may not appear when testing locally with act if a kind cluster named "agent-relay" already exists on the local machine.

Checklist

  • I have searched existing FAQs and this question is not already answered
  • The answer provides accurate, helpful information
  • I have included any relevant code examples or links

Activity

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

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions