Custom Domains
There are multiple ways to attach your Envoy proxies to your domains.
But what about TLS?
On the first request, Apoxy will concurrently create a TLS certificate for your domain. This can add a few seconds of latency, but subsequent requests will be very fast. We'll manage the certificates. All you have to do is make sure your proxy listens on port 443.
Simplest: A/AAAA Record
Running proxies will always have an associated IP address. You can simply use your current DNS provider and create an A/AAAA record for your domain with that address.
The quickest way to find a proxy's IP address is to run apoxy proxies list.
$ apoxy proxies list
NAME PROVIDER STATUS ADDRESS AGE
example cloud Running 137.66.53.123 4m2sBetter: CNAME Record
You can point a subdomain to Apoxy's DNS servers to automatically associate proxies with your domain by label, even as they are created and deleted.
Domains use the Kubernetes Labels and Selectors (opens in a new tab) concept to associate with proxies and keep records updated with their addresses.
Find your proxy label
$ apoxy proxy list --show-labels
NAME PROVIDER STATUS ADDRESS AGE LABELS
example cloud Running 137.66.53.123 4m2s edge=exampleWrite the domain YAML
Assuming your proxy object has the label edge=example, then you would associate the domain apoxy.example.com with that proxy by defining a domain like:
# example.yaml
apiVersion: core.apoxy.dev/v1alpha
kind: Domain
metadata:
name: example
spec:
hostnames:
- apoxy.example.com
selector:
matchLabels:
edge: exampleCreate the domain
apoxy domains create -f example.yamlWrite a CNAME record
In your DNS provider, create a CNAME record for apoxy.example.com pointing to apoxy.example.com.apoxydns.com. The template here is simply {domain}.apoxydns.com.
Next Steps
- Query the Logs generated by your Envoy.
- Add custom logging, security, and more with Extensions.