Installing the Kubernetes Resources Permissions Backend Plugin#
This guide will help you install and set up the kubernetes resources Permissions backend plugin in your Backstage instance.
Prerequisites#
Before installing the backend plugin, ensure you have:
- A working Backstage instance
- Node.js and npm/yarn installed
- Access to your Backstage backend configuration
- Deployed the required agent in the target kubernetes cluster following the docs here
Installation Steps#
1. Add the Package#
Install the backend plugin package using your package manager:
2. Add to Backend#
Modify your backend entry point (typically packages/backend/src/index.ts
):
// In your backend initialization
backend.add(import('@terasky/backstage-plugin-kubernetes-resources-permissions-backend'));
3. Configure Permissions#
Add the following to your app-config.yaml
:
permission:
enabled: true # Enable Backstage permission framework
kubernetesResources:
enablePermissions: true # Enable Kubernetes permission checks
proxy:
'/kubernetes-resources/<CLUSTER NAME>':
target: 'http://<THE INGRESS URL OF THE DEPLOYED AGENT>'
changeOrigin: true
headers:
Authorization: 'Bearer <SAME TOKEN AS IS USED IN THE K8S PLUGIN CONFIGURATION>
Verification#
After installation, verify that:
- The plugin appears in your package.json dependencies
- The backend starts without errors
- Permission endpoints are accessible
- Integration with the frontend plugin works correctly
Testing the Installation#
-
Check Backend Health
-
Test Frontend Integration
- Open a kubernetes resource in the frontend
- Verify permission checks are working
- Check access control behavior
Troubleshooting#
Common issues and solutions:
1. Backend Startup Issues#
2. Permission Framework Issues#
- Verify permission framework is enabled
- Check permission policy configuration
- Review backend plugin configuration
3. Integration Problems#
- Ensure frontend and backend versions match
- Check network connectivity
- Verify API endpoint configuration
Next Steps#
After successful installation:
- Configure permission policies
- Set up role-based access control
- Test with different user roles
- Monitor permission enforcement
Proceed to the Configuration Guide for detailed setup instructions.