Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nicor88/aws-k8s
Run kubernetes(k8s) inside AWS
https://github.com/nicor88/aws-k8s
aws cloudformation eks k8s k8s-monitoring terraform
Last synced: 18 days ago
JSON representation
Run kubernetes(k8s) inside AWS
- Host: GitHub
- URL: https://github.com/nicor88/aws-k8s
- Owner: nicor88
- License: mit
- Created: 2018-09-01T15:03:51.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-05-23T10:31:09.000Z (over 5 years ago)
- Last Synced: 2024-11-18T07:05:15.608Z (about 1 month ago)
- Topics: aws, cloudformation, eks, k8s, k8s-monitoring, terraform
- Language: HCL
- Size: 49.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# aws-k8s
Run kubernetes(k8s) inside AWSThere are multiple ways to run Kubernetes on AWS, one of this based on using [EKS](https://aws.amazon.com/eks/).
In this repository you can find multiple ways how deploy K8S based on EKS
## Requirements
* [awscli](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html)
* [kubectl](https://docs.aws.amazon.com/eks/latest/userguide/configure-kubectl.html)
* [heptio-authenticator-aws](https://docs.aws.amazon.com/eks/latest/userguide/configure-kubectl.html) (check the section **To install heptio-authenticator-aws for Amazon EKS**)## Deployment with Cloudformation
Create all needed resources running
cd cloudformation
bash setup_all.shThis command will setup:
* the Master Cloudformation stack containing EKS and all the needed Network resources
* the Worker Cloudformation stack containing an autoscaling group
* create a kubectl config file
* apply the node authentication to enable the EC2 machines to join K8S## Deployment with Terraform
export AWS_PROFILE=your_profile
cd terraform
make init
make plan
make applyAfter the deployment is done, you need to apply the `k8s/config_map.dist.yml`.
Run the following:
cp k8s/config_map.dist.yml k8s/config_map.ymlBe sure to replace `REPLACE_WITH_ARN_INSTANCE_PROFILE_ROLE` with the right role ARN.
Before applying the following yml file to the cluster, be sure to have `kubectl` installed and configured to the just created cluster.## Setup Local config
* Install [awscli](https://docs.aws.amazon.com/cli/latest/userguide/install-macos.html)
* Run the following command:
export AWS_PROFILE=your_profile
aws eks update-kubeconfig --name nicor88-dev-k8s-cluster --kubeconfig ~/.kube/config_nicor88-dev-k8s-cluster
export KUBECONFIG=~/.kube/config_nicor88-dev-k8s-cluster## Plugins
The folder **monitoring** includes all the needed configuration files to deploy a nice K8S Dashboard to check containers status.
kube apply -f plugins/monitoring/ --recursive## Notes
* All the following resources are based on the official AWS Documentation.
* [K8S cheatsheet](https://kubernetes.io/docs/reference/kubectl/cheatsheet/)