Note: If you're following the example from the previous step, then continue to use the
conference-registrationnamespace in all the YAML files and steps listed below (i.e. no changes required). Otherwise, change all references ofconference-registrationnamespace and use your namespace instead.
For the first step, there are three options and you can choose one of them as per your preference.
-
Option 1: Register your domain through Cloudflare.
-
Option 2: Transfer your domain to Cloudflare.
-
Option 3: Register your domain through another domain name registrar and then add your domain to Cloudflare.
Note: Cloudflare also offers a free plan with CDN and Unmetered DDoS Protection for Layers 3-7 for personal or hobby projects that aren’t business-critical.
Your nameserver change may take up to 48 hours to propagate. Therefore, it would be best to wait for 48 hours before proceeding with the next step.
-
Log into the Cloudflare Dashboard and go to
User Profile->API Tokensor simply click here. From the API Token home screen selectCreate Token. Then, underCustom token, selectGet Started.Note: You need to generate an API token and not an API key.
-
To generate the token, make sure the token has
Zone: ReadandDNS: Editpermissions for all zones. Optionally you can exclude certain zones. Then selectContinue to summary.Note: You need to Include
All zonesin theZone Resourcessection. SettingSpecific zonewon't work. However, you can still add one or more Excludes. -
In the next screen, select
Create Token. -
The generated token is displayed in the next screen as shown below. Copy and keep it safe as it won't be shown again.
-
Then, Base64 encode the token using the echo command shown below. For example, if the generated token is
1234567890123456, then the Base64 encoded value of it would beMTIzNDU2Nzg5MDEyMzQ1Njc4OQ==.echo -n '1234567890123456789' | base64
-
Use the Base64 encoded token from the above step to update the value of the resource with
data.CLOUDFLARE_API_TOKENin the./cloudflare/k8s/secret.yamlfile. -
Create the
cloudflare-credentialsKubernetes Secret in theconference-registrationnamespace.kubectl apply -f ./cloudflare/k8s/secret.yaml
Note: Fore more details, refer to the Cloudflare DNS Provider documentation.
If you get a permission error communicating with Cloudflare, ensure that the domain name being registered does not exceed the limits of your plan. Hierarchical domains are not supported on the free plan as of this writing.
-
Replace
app.your-domain.comin the./cloudflare/k8s/dns-provider.yamlfile with your desired domain. -
Create the
cloudflareDNS Provider resource in theconference-registrationnamespace.kubectl apply -f ./cloudflare/k8s/dns-provider.yaml
In the Kyma console, select the conference-registration namespace. Then, go to Configuration -> DNS Providers and enter the following values. Select your namespace and for Secret Name select the Secret that you created in the previous step. For Include Domains use your domain instead of app.your-domain.com. Then, click Create.
Wait for the status of the DNS Provider to change to READY before proceeding with the next step.
In the Kyma console, select the conference-registration namespace. Then, go to Configuration -> DNS Entries. Use your domain instead of app.your-domain.com. Under Targets, select both the options from the dropdown to add both the istio-ingressgateway and vpn-shoot records as the Targets. Then, click Create.
Wait for the status of the DNS Entry to change to READY before proceeding with the next step.
- Check to ensure that the
DNS Providercreated in the previous step has aREADYstatus. - Confirm that the API Token added to the Kubernetes Secret created in the
Create a Kubernetes Secretstep above has the required access to add DNS records to your domain name registrar's account. - Log into the Cloudflare Dashboard and go to
Websites-> Select your account and domain ->DNSand verify that the common records of your domain name are displayed there. If there are no records there, then your nameserver change may not have propagated and you would need to wait for up to 48 hours for them to be displayed.
Create an Issuer in the istio-system namespace.
Note: This example uses Let's Encrypt. You can use any other ACME server to create the Issuer. You can also use a Certificate Authority (CA) instead.
-
Replace
your-email@domain.comandapp.your-domain.comin the./cloudflare/k8s/issuer.yamlfile with your desired email and domain, which will be used for registration to the Issuer. -
Create the
Issuerresource in theconference-registrationnamespace.kubectl apply -f ./cloudflare/k8s/issuer.yaml
-
Select
Preferencesfrom the top-right corner of the Kyma console. -
Select
Clustersand enableShow hidden Namespaces. -
Select the
istio-systemnamespace in the top-right corner of the Kyma console. -
Go to
Configuration->Issuers. SelectCreate Issuerand enter the following values. Use your email instead ofyour-email@domain.comand use your domain instead ofapp.your-domain.com. Then, selectCreate.
After the Issuer has been created, you can use it to create a Certificate in the istio-system namespace.
-
Replace
app.your-domain.comin the./cloudflare/k8s/certificate.yamlfile with your desired domain. -
Create the
Certificateresource in theistio-systemnamespace.kubectl apply -f ./cloudflare/k8s/certificate.yaml
-
Select the
istio-systemnamespace in the top-right corner of the Kyma console. -
Go to
Configuration->Certificates. SelectCreate Certificateand select theAdvancedtab. Then, enter the following values. ForCommon Nameenter your primary domain name instead ofapp.your-domain.com. ForIssuer Namespaceselectistio-systemand forIssuer Nameselect the Issuer created in the previous step. Then, clickCreate. -
Wait for the status of the Certificate to change to
ready, after which you can create an Istio Gateway using the Certificate.
After the Certificate has been created, you can use it to create the Istio Ingress Gateway in the conference-registration namespace.
-
Replace
letsencrypt-cert-9t54fin the./cloudflare/k8s/ingressgateway.yamlfile with theSecretthat was generated in theistio-systemnamespace for theletsencrypt-certCertificate created in the previous step.Note: The name of the Secret starts with
letsencrypt-cert-and end with a random text. -
Replace all instances of
app.your-domain.comwith your domain name in the./cloudflare/k8s/ingressgateway.yamlfile. -
Create the
Istio Ingress Gatewayresource in theconference-registrationnamespace.kubectl apply -f ./cloudflare/k8s/ingressgateway.yaml
-
Select the
conference-registrationnamespace in the top-right corner of the Kyma console. -
Go to
Istio->Gatewaysand SelectCreate Gateway. Click on theAdvancedtab. Then, selectAdd Serverand expand theServerssection. -
Select
Server 1. -
Select its protocol as
HTTPSand give it a name as shown below. -
Select the
TLS ModeasSIMPLE. ForCredential Nameselect theSecretthat was generated in theistio-systemnamespace for theletsencrypt-certCertificate created in the previous step. Then, add your domain to theHostsfield.Note: The name of the Secret starts with
letsencrypt-cert-and end with a random text. -
Under the other
Serversection, select theProtocolasHTTPand give it a name as shown below. Then, add your domain to theHostsfield. -
Then, click on the
YAMLtab at the top, and enterhttpsRedirect: trueundertlswithin the server withHTTPprotocol as shown below. Then, selectCreate.tls: httpsRedirect: true
Create an API Rule to expose your web app running on Kyma Runtime.
After the Istio Gateway has been created, you can use it to create the API Rule in the conference-registration namespace.
-
Make the following changes in the
./cloudflare/k8s/api-rule.yamlfile:-
Change the value of the host from
app.your-domain.comto your domain. -
Then, change all instances of
app-your-domain-comto any desired name.
-
-
Create the
API Ruleresource in theconference-registrationnamespace.kubectl apply -f ./cloudflare/k8s/api-rule.yaml
-
Select the
conference-registrationnamespace in the top-right corner of the Kyma console. -
Go to
Discovery and Network->API Rulesand SelectCreate API Rule. Then, enter the following values. Use your domain instead ofapp.your-domain.comand use any desired name instead ofapp-your-domain-com. Then, selectCreate.
-
Go to your Cloudflare dashboard.
-
Select your domain and go to
SSL/TLS->Overview. Then, selectFull (strict). -
Next, go to
SSL/TLS->Edge Certificates. Then, enableAlways Use HTTPSif you want all visitors to go to the secure version of your site.
| 🏠 |
|---|




















