FAQ
What does the development variable do?
It decides if a wildcard-certificate is being mounted at the gateway automatically. If set to true use to mount it and adjust the path to your certificate and key.
Which IP should I use?
Knative requires a load balancer to function. Which IP to use depends on your settings. If you are using a domain, the load balancer will need to fetch either the public IP on bare metal associated with the domain, or the private IP that the public IP translates to if you are in the cloud.
Option 1: External Load-Balancer
If you want to use an external load balancer, to avoid installing an additional load balancer, set load_balancer=false in the next command. The ip parameter will then be ignored and does not need to be set. Refer to your cloud provider's documentation. This must be pre-configured before issuing the next command, as the next command will wait and block until the load balancer receives an ip.
Option 2: Internal Load-Balancer
However, you do not need to use an external load balancer, and you can even use a metallb on a VM. Set load_balancer=true and specify an ip address for the load balancer to receive. As your cloud provider internally translates the public ip to the private ip of your VM, you should use the private ip of your VM here and use the public ip to reach the load balancer outside the cloud provider's network. (The domain should still be mapped to the public IP).
How can I deploy the example without using a domain?
Option 1: /etc/hosts
Edit your /etc/hosts file to map vault.{{your-domain }}, actix-sgx.default.{{your-domain }} and flask-sgx.default.{{your-domain }} to the ip you specified the load-balancer with. /etc/hosts does not support wildcard entries and must be edited for each deployed service.
Option 2: dnsmasq
The following steps should be done on the device that will be calling the web server.
3.1 Install dnsmasq. For Ubuntu use:
3.2 Edit /etc/resolv.conf to use the dnsmasq DNS server, then add nameserver 127.0.0.1 to the first line.
3.3 Choose a domain and replace it with example.com here: address=/example.com/0.0.0.0 Replace 0.0.0.0 with the IP address you configured in the Metallb Pool.
3.4 Restart dnsmasq
Knative always appends *.default as a prefix to the domain. If you enter example.com as the domain, Knative will create routes with the following format *.default.example.com, then you need to add a wildcard DNS entry for that exact format. For test.example.com this would be *.default.test.example.com.
Last updated