Installing Ant Media Server on K8s by Digital Ocean
In this article, I'm going to explain how to install Ant Media Server K8s on DigitalOcean with just one click.
You need to have the Kubernetes command line tool installed on your computer.
Step 1: Install Ant Media Server App
Login to Digital Ocean, click on the Marketplace tab.
Then enter "Ant Media Server Enterprise" in the search field and select it as shown in the screenshot.
Click "Install App" and then click "Install".
Step 2: Install the Kubernetes Cluster
Choose the location, NodePool, and other settings and start the cluster setup.
Step 3: Connect to Kubernetes
After the installation is complete, download the kubernetes configuration file from the Actions > Download Config menu and export it as follows.
export KUBECONFIG=~/Downloads/ant-media-k8s-1-26-3-do-0-fra1-1679679927785-kubeconfig.yaml
Let's check everything is working.
kubectl get pods -n antmedia
NAME READY STATUS RESTARTS AGE
ant-media-server-edge-6bc98b95d7-hrdlj 1/1 Running 0 6m49s
ant-media-server-origin-7d56c5f8d-sp2nl 1/1 Running 0 6m49s
antmedia-ingress-nginx-controller-755b7f6fb8-kmwrm 1/1 Running 0 6m49s
mongo-7946fc86ff-lzjnr 1/1 Running 0 6m49s
kubectl get ingress -n antmedia
NAME CLASS HOSTS ADDRESS PORTS AGE
ant-media-server-edge nginx origin.localhost x.x.x.x 80, 443 11m
ant-media-server-origin nginx edge.localhost x.x.x.x 80, 443 11m
Step 4: Configure Hostnames
Unfortunately, the domain/subdomain cannot be determined during the installation in DigitalOcean, so update your Edge and Origin HOSTS addresses as follows.
kubectl patch ing/ant-media-server-origin --type=json -p='[{"op": "replace", "host": "edge.antmedia.cloud", "value":"test"}]' -n antmedia
kubectl patch ing/ant-media-server-origin --type=json -p='[{"op": "replace", "host": "edge.antmedia.cloud", "value":"test"}]' -n antmedia
Make sure your own domains are updated when you run the kubectl get ingress -n antmedia
command again, then you can update your DNS.
You can now access your Ant Media Cluster over Ingress.
https://edge.{yourdomain}.com
http://origin.{yourdomain}.com
Step 5: Setup SSL
The Marketplace product comes with a self-signed certificate. If you want to use Let's Encrypt or your own certificate, follow the documentation to install an SSL certificate via Helm