Skip to content

Kubernetes cluster creation fails - Dockerfile missing K8s templates #467

@poyrazK

Description

@poyrazK

Why is this an issue?

When creating a Kubernetes cluster, provisioning fails with "failed to render control plane template: open internal/repositories/k8s/templates/control_plane.yaml: no such file or directory". The Kubernetes templates are not included in the Docker image.

What is causing it?

The Dockerfile copies migrations and docs from the builder stage, but the K8s templates directory is not copied. The provisioner looks for templates at internal/repositories/k8s/templates/ but that path doesn't exist in the container.

How can it be solved?

Add to Dockerfile:

COPY --from=builder /app/internal/repositories/k8s/templates /app/templates

And update the provisioner to look for templates at the correct path in the container.

Category

  • Small
  • Medium
  • Large
  • Critical

Severity

  • Low
  • Medium
  • High
  • Critical

Steps to reproduce

# Build Docker image and start API
docker compose up -d api
cloud kubernetes create -n test-cluster -v <vpc-id> -w 1
# Cluster status: failed
# API log: "failed to render control plane template: open internal/repositories/k8s/templates/control_plane.yaml: no such file or directory"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions