https://github.com/romanow/terraform-aws-k8s
Terraform scripts to deploy k8s cluster AWS provider
https://github.com/romanow/terraform-aws-k8s
aws eks kubernetes terraform
Last synced: 3 months ago
JSON representation
Terraform scripts to deploy k8s cluster AWS provider
- Host: GitHub
- URL: https://github.com/romanow/terraform-aws-k8s
- Owner: Romanow
- Created: 2022-11-11T07:42:37.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-11-11T07:44:53.000Z (over 3 years ago)
- Last Synced: 2025-01-17T09:31:10.515Z (over 1 year ago)
- Topics: aws, eks, kubernetes, terraform
- Language: HCL
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Terraform scripts to create AWS EKS cluster
## Подготовка
##### Установка terraform с помощью [tgenv](https://github.com/tfutils/tfenv)
Устанавливаем версию terraform из файла ([.terraform-version](.terraform-version)).
```shell
$ tfenv install
```
##### Установка terragrunt с помощью [tgswitch](https://github.com/warrensbox/tgswitch)
Устанавливаем версию terraform из файла [tgswitch](https://github.com/warrensbox/tgswitch).
```shell
$ tgswith
```
##### Инициализация AWS cli
```shell
$ asw configure
AWS Access Key ID:
AWS Secret Access Key:
Default region name: eu-central-1
Default output format: yaml
```
Получение Access/Secret keys: go to [AWS console](https://console.aws.amazon.com/) -> `Security Credentials`
-> `Access keys (access key ID and secret access key)` -> `Create New Access Key`.
## Запуск кластера
```shell
$ terraform plan
$ terraform apply
$ aws eks --region $(terraform output -raw region) update-kubeconfig \
--name $(terraform output -raw cluster_name)
$ kubectl get nodes
```
## Ссылки
1. [terraform-docs](https://github.com/terraform-docs/terraform-docs)
2. [Provision Amazon EKS Cluster using Terraform](https://medium.com/devops-mojo/terraform-provision-amazon-eks-cluster-using-terraform-deploy-create-aws-eks-kubernetes-cluster-tf-4134ab22c594)
3. [AWS VPC Terraform module](https://registry.terraform.io/modules/terraform-aws-modules/vpc/aws/latest)
4. [AWS EKS Terraform module](https://registry.terraform.io/modules/terraform-aws-modules/eks/aws/latest)