Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ilhaan/kubeCDN
Self-hosted CDN based on Kubernetes
https://github.com/ilhaan/kubeCDN
cdn kubernetes multi-region terraform
Last synced: about 1 month ago
JSON representation
Self-hosted CDN based on Kubernetes
- Host: GitHub
- URL: https://github.com/ilhaan/kubeCDN
- Owner: ilhaan
- License: apache-2.0
- Created: 2019-01-16T18:34:31.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-03-27T00:15:32.000Z (over 5 years ago)
- Last Synced: 2024-11-08T23:52:09.903Z (about 1 month ago)
- Topics: cdn, kubernetes, multi-region, terraform
- Language: HCL
- Homepage:
- Size: 622 KB
- Stars: 417
- Watchers: 13
- Forks: 46
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-list - kubeCDN - hosted CDN based on Kubernetes | ilhaan | 351 | (HCL)
README
# kubeCDN
A self-hosted content delivery network based on Kubernetes. Easily setup Kubernetes clusters in multiple AWS regions and deploy resilient and reliable services to a global user base within minutes.This project was developed by [Ilhaan Rasheed](https://www.ilhaan.com) during his tenure as a DevOps Engineering Fellow at [Insight](https://www.insightdevops.com/). The capabilities of this project have been demonstrated using video streaming as an example. Ilhaan's presentation slides with a short demo is available [here](https://www.ilhaan.com/slides).
[Here](https://blog.insightdatascience.com/how-to-build-your-own-cdn-with-kubernetes-5cab00d5c258) is a detailed blog post about kubeCDN.
----
# Instructions
## Getting Started
Before deploying your self-hosted CDN using kubeCDN, you will need the following:* AWS account and credentials with appropriate permissions to setup EC2 instances, VPCs and EKS clusters. All documentation and software components of this project assumes that [`awscli`](https://aws.amazon.com/cli/) is being used to manage AWS credentials.
* Install Terraform. This project was developed using Terraform v0.11.11.
* Install `kubectl` v1.13.2 or higher.
* Install `helm` v2.12.3 or higher. On macOS, you can install helm using `brew install kubernetes-helm`.
* Install [`aws-iam-authenticator`](https://github.com/kubernetes-sigs/aws-iam-authenticator)After the components above have been installed, clone this repo and proceed to the next section.
## Deploy Clusters & Service
1. Deploy Clusters
* To deploy EKS clusters in multiple regions, follow instructions from [here](./terraform/readme.md).
2. Setup Route53
* Instructions to setup Route53 can be found [here](./route53/readme.md).
3. Install ExternalDNS
* Follow instructions [here](./externalDNS/readme.md).
4. Install Monitoring tools
* Install Prometheus and Grafana by following instructions [here](./monitoring/readme.md).
5. Deploy Demo Video Server
* To demonstrate kubeCDN, a simple Nginx based RTMP streaming server was created. Follow instructions [here](./video-server/readme.md) for more information on this server and for deploy instructions.## Teardown
Follow these instructions to teardown all deployed services and infrastructure.1. First, all services that have been deployed need to be removed. There is a script in the root directory of this repo that performs this task. Run it using:
```
./services_teardown.sh
```2. The second teardown step is to remove all infrastructure that was setup in step 1 of the section above. This can be done by navigating to the `terraform` directory and running the following:
```
terraform destroy -auto-approve
```
This process takes about 10 minutes to complete with two regions.3. After successful run of the previous step, all infrastructure associated with kubeCDN should have been torn down. Verify this on AWS Console in order to avoid accidental charges on your account.