This guide will walk you through the installation of Backstage, an open source Internal Developer Platform, on a local Kubernetes cluster managed by Kind. We will use the official Helm chart to simplify the deployment and customize the installation using environment variables.
- Kind: Make sure Kind is installed and configured on your system.
- Helm: Install Helm to manage charts.
- kubectl: The Kubernetes client to interact with your cluster.
- Create a Kind Cluster with Ingress Support
cat <<EOF | kind create cluster --name backstage --config=-
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
kubeadmConfigPatches:
- |
kind: InitConfiguration
nodeRegistration:
kubeletExtraArgs:
node-labels: "ingress-ready=true"
extraPortMappings:
- containerPort: 80
hostPort: 80
protocol: TCP
- containerPort: 443
hostPort: 443
protocol: TCP
EOF
- Install nginx-ingress
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml
- Add the Backstage Helm Repository
helm repo add backstage https://artifacthub.io/packages/helm/backstage
helm repo update
- Create the Configuration File
values.yaml
Create a values.yaml file to customize the installation. Here's an example with some key environment variables:
ingress:
enabled: true
host: "backstage.local"
backstage:
extraEnvVars:
- name: NODE_ENV
value: "development"
# NODE_ENV variable is set to development in this example. It is required for the Guest Provider plugin to work.
- name: APP_CONFIG_app_baseUrl
value: "http://backstage.local"
- name: APP_CONFIG_backend_baseUrl
value: "http://backstage.local"
- name: APP_CONFIG_backend_cors_origin
value: "http://backstage.local"
Variable | Description |
---|---|
NODE_ENV | Specifies the execution environment. |
APP_CONFIG_app_baseUrl | Overrive app.baseUrl param, the base URL of your Backstage instance. |
APP_CONFIG_backend_baseUrl | Overrive backend.baseUrl param, the base URL of your Backstage instance. |
APP_CONFIG_backend_cors_origin | Overrive backend.cors.origin param, specifies the origin URL for CORS. |
- Install Backstage
kubectl create namespace backstage
helm upgrade --install backstage -n backstage backstage/backstage -f values.yaml
- Accessing Backstage
Add the following entry to your /etc/hosts
file to map the hostname to your local IP address:
echo "127.0.0.1 backstage.local" | sudo tee -a /etc/hosts
Once the installation is complete, you can access your Backstage instance by visiting the URL specified in values.yaml, typically htts://backstage.local.
Note: This guide provides a solid foundation for installing Backstage. For more advanced configuration and specific customizations, refer to the official Backstage documentation.
Additional Resources:
- Official Backstage Documentation: https://backstage.io
- Backstage Helm Chart: https://artifacthub.io/packages/helm/backstage/backstage
- https://github.com/backstage/backstage/blob/master/plugins/auth-backend-module-guest-provider
- https://backstage.io/docs/conf/writing/#environment-variable-overrides