Failed to watch a portal resource
Troubleshoot how to resolve issues with the portal server watching for other resources.
When you create a portal, the portal watches several custom resources such as ApiDocs and PortalConfigs.
What’s happening
After creating a Portal custom resource, you still cannot access the Gloo Platform Portal APIs, such as to list API products or review usage plans.
You do not have any PortalConfig internal resources in the same namespace as your Portal custom resources.
You might see error messages in the portal server logs such as the following messages.
Why it’s happening
The Portal custom resource requires that several components are set up. Some of these components you manually configure, such as a route table that bundles your APIs into API products or policies that create usage plans. Other components are automatically configured for you by installing portal or configuring resources, such as Kubernetes RBAC roles, ApiDocs, and an internal PortalConfig. If any of these resources are misconfigured or missing, your portal might not work.
How to fix it
Confirm that the Kubernetes CRDs and API resources for Gloo Platform Portal are installed in your cluster. If not, upgrade to reinstall the Gloo Platform CRD Helm chart.
Confirm that the portal cluster role has permissions to list the custom resources. If not, add the permissions. If the cluster role does not exist, you can create it or upgrade Gloo Platform with Portal enabled.
Example output of a correct cluster role:
Confirm that the portal cluster role binding for the cluster role refers to the correct service account of the portal server. If the cluster role binding refers to a service account that does not exist or in a different namespace than the portal server, upgrade to reinstall the Gloo Platform CRD Helm chart.
Example output:
Review your Portal configuration.
Confirm the selected domains, portal backend selectors, usage plans, and APIs. Some common errors include the following:
- Domains: The route table with the domain does not exist, or does not include any of the selected APIs.
- Portal backend: The portal backend is in a different namespace than the portal custom resource you configured. Create the portal in the same namespace as the backend. To check where the portal backend is deployed, run
kubectl get pods -A -l app=gloo-mesh-portal-server
. - Usage Plans: Not every selected API has a usage plan. Make sure to apply external auth and rate limiting policies to every API that you want to expose through the portal.
- APIs: Not every selected API has the label you use. Make sure that each route (not just the route table) has the label.