From c2d115f9a2484ac8dab80c1f417ff0c62e215ec7 Mon Sep 17 00:00:00 2001 From: FAQ Bot Date: Thu, 17 Sep 2026 13:55:24 +0000 Subject: [PATCH] NEW: Why does my Kubernetes deployment work locally with kind but fail on Git --- ...kind-github-actions-control-plane-nodes.md | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 _questions/ai-dev-tools-zoomcamp/03-deployment/004_1dad6c9bfa_kubernetes-kind-github-actions-control-plane-nodes.md diff --git a/_questions/ai-dev-tools-zoomcamp/03-deployment/004_1dad6c9bfa_kubernetes-kind-github-actions-control-plane-nodes.md b/_questions/ai-dev-tools-zoomcamp/03-deployment/004_1dad6c9bfa_kubernetes-kind-github-actions-control-plane-nodes.md new file mode 100644 index 00000000..269f0c6d --- /dev/null +++ b/_questions/ai-dev-tools-zoomcamp/03-deployment/004_1dad6c9bfa_kubernetes-kind-github-actions-control-plane-nodes.md @@ -0,0 +1,24 @@ +--- +id: 1dad6c9bfa +question: Why does my Kubernetes deployment work locally with kind but fail on GitHub + Actions with “could not locate any control plane nodes for cluster named 'agent-relay'”? +sort_order: 4 +--- + +This usually happens because a GitHub-hosted runner starts from a clean environment and won’t have your local `kind` cluster already created. When your workflow tries to deploy to the `agent-relay` cluster, Kubernetes can’t find the control plane. + +A fix is to ensure the `kind` cluster exists before you load Docker images or apply manifests. For example: + +```bash +if ! kind get clusters | grep -qx "agent-relay"; then + kind create cluster --name agent-relay +fi +``` + +Then continue with the usual steps: +1. Load your Docker image into `kind`. +2. Apply your Kubernetes manifests. +3. Wait for the deployment rollout. +4. Verify the deployed API. + +This won’t necessarily show up locally when testing with `act`, because your machine may already have a `kind` cluster named `agent-relay` from a previous run. \ No newline at end of file