kcp icon indicating copy to clipboard operation
kcp copied to clipboard

feat: quickstart CLI plugin for API-land demos and feature development bootstrapping

Open mjudeikis-bot opened this issue 8 months ago • 8 comments

Problem

Getting started with kcp for demos, feature development, or showcasing functionality requires significant manual setup. There's no fast path from zero to a working kcp environment with APIs, workspaces, and sample bindings. This is a friction point for:

  • Contributors developing a new feature who need a fresh environment quickly
  • Maintainers preparing conference demos or showcases
  • Users evaluating kcp and wanting to see it in action without deep expertise

Proposed Solution

A dedicated quickstart CLI plugin (or kcp quickstart / kcp demo subcommand) that bootstraps a skeleton kcp environment in a few commands.

What it should do

# One-shot: spin up local kcp + bootstrap skeleton
kcp quickstart

# Or with a named scenario
kcp quickstart --scenario api-provider   # APIExport + sample CRD + workspace
kcp quickstart --scenario multi-tenant   # multiple workspaces, bindings, RBAC
kcp quickstart --scenario gitops         # kcp + flux/argocd integration skeleton

The bootstrap should:

  • Start a local kcp instance (or connect to existing)
  • Create a root workspace hierarchy
  • Install sample APIResourceSchemas / CRDs
  • Create APIExports and APIBindings
  • Set up RBAC / service accounts
  • Print next steps / useful kubeconfig contexts
  • Optionally tear everything down cleanly (kcp quickstart --cleanup)

Why a dedicated plugin / subcommand

  • Keeps the core binary lean
  • Can be versioned and distributed independently (e.g. via krew or homebrew)
  • Allows scenario-specific templates to evolve without touching core kcp

Inspiration / prior art

  • kind / kwok for fast local k8s clusters
  • helm create for scaffold
  • kubectl neat as an example krew plugin pattern
  • kcp's own hack/ scripts — these exist but are not user-facing or documented as a quickstart path

Related

  • Useful for KubeCon demos, Contribfest onboarding, and new contributor ramp-up
  • Could feed into improved docs / getting-started guide

/assign @mjudeikis

mjudeikis-bot avatar Mar 26 '26 14:03 mjudeikis-bot

/assign

nuromirg avatar Mar 26 '26 21:03 nuromirg

I found the kubecon 2025 demo a good interactive tutorial. Perhaps it can be used as baseline/model?

Also, as this feature aims to be interactive, it could be very interesting for new contributors to use a "shortcut" to generate a functional dataset that will be persisted for a session (bypassing interactivity eg. hack/).

rxinui avatar Mar 27 '26 10:03 rxinui

Checkpoint after first PR

What's done (merged PR)

  • kubectl kcp quickstart command -- cli plugin with Complete/Validate/Run pattern (kept similar approach like other commands)
  • api-provider scenario -- org -> provider (APIExport + sample CRD + workspace) -> consumer (APIBinding)
  • Flags: --name-prefix, --scenario, --with-samples, --enter, --cleanup, --timeout
  • Cleanup -- cascade deletion via org workspace (didn't check how good it works with https://github.com/kcp-dev/kcp/pull/4047 though)

What's left according to the issue ~~1. Starting a local kcp instance automatically -- right now the command assumes a running kcp. The "zero to working" experience still requires starting kcp separately~~ - done in https://github.com/kcp-dev/kcp/pull/4265 2. multi-tenant scenario (multiple workspaces, bindings, RBAC / service accounts) 3. gitops scenario (kcp + flux/argocd integration skeleton) 4. Named kubeconfig contexts, so after setup, print/create friendly context names instead of raw paths. this one is the most QoL improvement we could do in the next iterations, raw paths are not intuitive to use 5. RBAC / service account setup will be part of multi-tenant scenario

nuromirg avatar Apr 23 '26 08:04 nuromirg

Hello 👋 Is this issue still open / in progress ?

anwesha-palit-redhat avatar Aug 07 '26 11:08 anwesha-palit-redhat

Hey @anwesha-palit-redhat, perhaps you can continue with multi-tenant scenario on top of what was already built if you want

nuromirg avatar Aug 07 '26 12:08 nuromirg

Hi @nuromirg Yes! I would like to take that up, shall I create a new issue for it or raise a PR against this one ?

anwesha-palit-redhat avatar Aug 10 '26 04:08 anwesha-palit-redhat

Hi @nuromirg Yes! I would like to take that up, shall I create a new issue for it or raise a PR against this one ?

I'd say it's better to create a separate sub-issue, since kcp has automation on linked issues. We can ask to close this one after all "What's left" section will be covered

nuromirg avatar Aug 12 '26 07:08 nuromirg

Issues go stale after 90d of inactivity. After a furter 30 days, they will turn rotten. Mark the issue as fresh with /remove-lifecycle stale.

If this issue is safe to close now please do so with /close.

/lifecycle stale

kcp-ci-bot avatar Nov 11 '26 08:11 kcp-ci-bot