Configure portal settings
Create a PortalEmailConfig, PortalTeam, and PortalCustomDomain that reference your Portal.
Prerequisites
Series Prerequisites
This page is part of the Get started with Kong Operator and Dev Portal CRDs series.
Complete the previous page, Create a Dev Portal and publish content before completing this page.
Custom domain
You need a domain that you control for two purposes:
- Email sending: the domain is registered with the portal’s email service so it can send notification emails to developers.
- Custom portal URL: the hostname is mapped to your portal so developers can access it at a predictable address.
Export the following environment variables before running the steps in this guide:
export PORTAL_EMAIL_DOMAIN='YOUR_DOMAIN'
export PORTAL_FROM_EMAIL="noreply@${PORTAL_EMAIL_DOMAIN}"
export PORTAL_REPLY_TO_EMAIL="support@${PORTAL_EMAIL_DOMAIN}"
export PORTAL_HOSTNAME="portal.${PORTAL_EMAIL_DOMAIN}"For more information, see Dev Portal custom domains.
Create a PortalTeam
PortalTeam creates a developer team and controls whether that team can own applications. For more background, see Dev Portal RBAC.
-
Create the
PortalTeamresource:echo ' apiVersion: konnect.konghq.com/v1alpha1 kind: PortalTeam metadata: name: operator-dev-portal-team namespace: kong spec: portalRef: type: namespacedRef namespacedRef: name: operator-dev-portal apiSpec: name: platform-team description: Team managed by Kong Operator canOwnApplications: Enabled ' | kubectl apply -f -Copied! -
Wait for the resource to be ready:
kubectl wait portalteam/operator-dev-portal-team -n kong \ --for=condition=Programmed=True \ --timeout=10mCopied!
Create a PortalCustomDomain
PortalCustomDomain attaches a public hostname to the portal.
-
Create the
PortalCustomDomainresource:echo ' apiVersion: konnect.konghq.com/v1alpha1 kind: PortalCustomDomain metadata: name: operator-dev-portal-domain namespace: kong spec: portalRef: type: namespacedRef namespacedRef: name: operator-dev-portal apiSpec: enabled: Enabled hostname: '"$PORTAL_HOSTNAME"' ssl: type: standard standard: domainVerificationMethod: http ' | kubectl apply -f -Copied! -
Create a CNAME record in your DNS configuration that points to the automatically generated Dev Portal URL/. For more information, see Custom domains.
-
Wait for the resource to be ready. This resource becomes
Programmedonly after HTTP domain ownership verification completes. Once the hostname is publicly reachable, run the following command:kubectl wait portalcustomdomain/operator-dev-portal-domain -n kong \ --for=condition=Programmed=True \ --timeout=10mCopied!
Create a PortalEmailConfig
PortalEmailConfig configures the sender information used by the portal.
-
Create the
PortalEmailConfigresource:echo ' apiVersion: konnect.konghq.com/v1alpha1 kind: PortalEmailConfig metadata: name: operator-dev-portal-email namespace: kong spec: portalRef: type: namespacedRef namespacedRef: name: operator-dev-portal apiSpec: domainName: '"$PORTAL_EMAIL_DOMAIN"' fromEmail: '"$PORTAL_FROM_EMAIL"' fromName: Operator Dev Portal replyToEmail: '"$PORTAL_REPLY_TO_EMAIL"' ' | kubectl apply -f -Copied! -
Wait for the resource to be ready:
kubectl wait portalemailconfig/operator-dev-portal-email -n kong \ --for=condition=Programmed=True \ --timeout=10mCopied!