kuadrant development setup¶
development environment for kuadrant plugins in rhdh.
quick start¶
visit http://localhost:3000/kuadrant
what gets installed¶
kubernetes cluster (kind):
- kind cluster named
local-cluster - kuadrant operator (from
main) - gateway api crds v1.2.0
- istio service mesh (base + istiod)
kuadrant components:
- custom crds: APIProduct, APIKey
- kuadrant instance in
kuadrant-systemnamespace
demo resources (toystore):
- toystore namespace
- gateway with httproute
- authpolicy for api key authentication
- planpolicy for rate limiting
- sample api products
- example secrets
rbac:
- rhdh service account with cluster access
- permissions for kuadrant crds and secrets
directory structure¶
kuadrant-dev-setup/
├── Makefile # cluster and kuadrant setup
├── README.md # this file
├── crds/ # custom resource definitions
│ ├── devportal.kuadrant.io_apiproduct.yaml
│ └── devportal.kuadrant.io_apikey.yaml
├── demo/ # demo resources
│ └── toystore-demo.yaml # toystore api with policies
├── rbac/ # rbac configs
│ └── rhdh-rbac.yaml # rhdh service account permissions
└── scripts/ # helper scripts
└── kind-cluster.yaml # kind cluster configuration
commands¶
cluster management¶
make kind-create # create cluster + install kuadrant + demo
make kind-delete # delete cluster
make clean # delete cluster + cleanup bin/
kuadrant¶
make kuadrant-install [KUADRANT_VERSION=v1.3.0] # install kuadrant. Version defaults to main branch
make demo-install # install toystore demo
make demo-uninstall # remove toystore demo
verify installation¶
# check kuadrant pods
kubectl get pods -n kuadrant-system
# check demo resources
kubectl get pods -n toystore
kubectl get apiproducts -n toystore
kubectl get gateway -n toystore
kubectl get httproute -n toystore
kubectl get authpolicies -n toystore
kubectl get planpolicies -n toystore
# check api keys
kubectl get secrets -n toystore
development workflow¶
-
create cluster (once):
-
develop plugins (with hot reload):
changes to plugin code automatically rebuild -
test in browser:
- main page: http://localhost:3000/kuadrant
- catalog: http://localhost:3000/catalog
-
api entity: http://localhost:3000/catalog/default/api/toystore-api
-
cleanup (when done):
troubleshooting¶
cluster won't start¶
kuadrant not installing¶
demo resources missing¶
rhdh can't connect to cluster¶
# verify service account
kubectl get sa rhdh-service-account -n rhdh
# check rbac
kubectl get clusterrole rhdh-kuadrant
kubectl get clusterrolebinding rhdh-kuadrant
# check kubeconfig (rhdh uses local ~/.kube/config in dev mode)
kubectl config current-context
dependencies¶
the makefile automatically downloads:
- kind v0.20.0 (to
bin/kind-v0.20.0) - helm v3.13.0 (to
bin/helm-v3.13.0)
no manual installation needed.
differences from kuadrant-backstage-plugin repo¶
this setup is simplified for rhdh development:
what we kept:
- kind cluster creation
- kuadrant installation
- toystore demo resources
- custom crds
what we simplified:
- single makefile (no complex includes)
- no rhdh-local submodule (uses rhdh's yarn dev)
- no dynamic plugin export (direct imports)
- no rbac user switching (uses guest auth)
- no separate backstage mode (only hot reload mode)
result: cleaner development experience with hot reload and full catalog integration.