Este contenido no está disponible en el idioma seleccionado.
Chapter 2. Installing Developer Hub on GKE with the Helm chart
When you install the Developer Hub Helm chart in Google Kubernetes Engine (GKE), it orchestrates the deployment of a Developer Hub instance, which provides a robust developer platform within the GKE ecosystem.
Prerequisites
-
You have subscribed to
registry.redhat.io. For more information, see Red Hat Container Registry Authentication. -
You have installed
kubectl. For more information, see Install kubetl. - You have installed the Google Cloud CLI. For more information, see Install the gcloud CLI.
- You have logged in to your Google account and created a GKE Autopilot or GKE Standard cluster.
- You have configured a domain name for your Developer Hub instance.
- You have reserved a static external Premium IPv4 Global IP address that is not attached to any VM. For more information see Reserve a new static external IP address
You have configured the DNS records for your domain name to point to the IP address that has been reserved.
NoteYou need to create an
Arecord with the value equal to the IP address. This process can take up to one hour to propagate.- You have installed Helm 3 or the latest. For more information, see Installing Helm.
Procedure
Go to your terminal and run the following command to add the Helm chart repository containing the Developer Hub chart to your local Helm registry:
helm repo add openshift-helm-charts https://charts.openshift.io/Create a pull secret using the following command:
kubectl -n <your-namespace> create secret docker-registry rhdh-pull-secret \1 --docker-server=registry.redhat.io \ --docker-username=<user_name> \2 --docker-password=<password> \3 --docker-email=<email>4 The created pull secret is used to pull the Developer Hub images from the Red Hat Ecosystem.
Set up a Google-managed certificate by creating a
ManagedCertificateobject that you must attach to the ingress.Example of attaching a
ManagedCertificateobject to the ingressapiVersion: networking.gke.io/v1 kind: ManagedCertificate metadata: name: <rhdh_certificate_name> spec: domains: - <rhdh_domain_name>For more information about setting up a Google-managed certificate, see Setting up a Google-managed certificate.
Create a
FrontendConfigobject to set a policy for redirecting to HTTPS. You must attach this policy to the ingress.Example of attaching a
FrontendConfigobject to the ingressapiVersion: networking.gke.io/v1beta1 kind: FrontendConfig metadata: name: <ingress_security_config> spec: sslPolicy: gke-ingress-ssl-policy-https redirectToHttps: enabled: trueFor more information about setting a policy to redirect to HTTPS, see HTTP to HTTPS redirects.
Create a file named
values.yamlusing the following template:Example
values.yamlfileglobal: host: <rhdh_domain_name> route: enabled: false upstream: service: type: NodePort ingress: enabled: true annotations: kubernetes.io/ingress.class: gce kubernetes.io/ingress.global-static-ip-name: <ADDRESS_NAME> networking.gke.io/managed-certificates: <rhdh_certificate_name> networking.gke.io/v1beta1.FrontendConfig: <ingress_security_config> className: gce backstage: image: pullSecrets: - rhdh-pull-secret podSecurityContext: fsGroup: 2000 postgresql: image: pullSecrets: - rhdh-pull-secret primary: podSecurityContext: enabled: true fsGroup: 3000 volumePermissions: enabled: trueRun the following command in your terminal to deploy Developer Hub using the latest version of Helm Chart and using the
values.yamlfile:helm -n <your_namespace> install -f values.yaml <your_deploy_name> \ openshift-helm-charts/redhat-developer-hub \ --version 1.5.3For the latest Helm Chart version, see this Helm Charts repository.
Verification
Confirm that the deployment is complete.
kubectl get deploy <you_deploy_name>-developer-hub -n <your_namespace>Verify that the service and ingress were created.
kubectl get service -n <your_namespace> kubectl get ingress -n <your_namespace>NoteWait for the
ManagedCertificateto be provisioned. This process can take a couple of hours.-
Access RHDH with
https://<rhdh_domain_name> To upgrade your deployment, use the following command:
helm -n <your_namespace> upgrade -f values.yaml <your_deploy_name> openshift-helm-charts/redhat-developer-hub --version <UPGRADE_CHART_VERSION>To delete your deployment, use the following command:
helm -n <your_namespace> delete <your_deploy_name>