Skip to content

Kind cluster created at build time instead of runtime #7

@alanops

Description

@alanops

Problem

The Kubernetes scenario setup script runs during Docker image build, but kind clusters are ephemeral and don't persist in the built image.

Current Behavior

  • setup.sh is executed in the Dockerfile with RUN /home/devops/setup.sh
  • This creates a kind cluster during image build
  • When the container starts from this image, the kind cluster doesn't exist

Expected Behavior

  • The kind cluster should be created when the container starts
  • Users should see the cluster being created as part of the scenario initialization

Root Cause

In scenarios/kubernetes/keycloak-crashloop/Dockerfile:

# This runs at build time
RUN /home/devops/setup.sh

Solution

  1. Remove the RUN /home/devops/setup.sh from Dockerfile
  2. Create an entrypoint script that runs setup.sh at container start
  3. Use ENTRYPOINT or CMD to execute the setup when container starts

Impact

  • Kubernetes scenarios appear broken as no cluster exists when users connect
  • The "Creating kind cluster..." message never appears to users

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