Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/angudadevops/k8s-on-cloud

Kubernetes with Kubeadm Cluster on Cloud
https://github.com/angudadevops/k8s-on-cloud

aws-terraform azure-kubernetes-cluster azure-terraform googlecloud-kubernetes-terraform googlecloud-terraform k8s-ansible-aws k8s-aws k8s-azure k8s-cloud k8s-gcp k8s-terraform kubeadm-cluster kubernetes-aws-kubeadm kubernetes-azure-kubeadm kubernetes-cloud-examples kubernetes-cluster kubernetes-terraform-ansible

Last synced: 9 days ago
JSON representation

Kubernetes with Kubeadm Cluster on Cloud

Awesome Lists containing this project

README

        

Kubernetes on Cloud with Terraform and Ansible

This repository helps to spin up cloud environment and create kubernetes cluster on top of that using kubeadm

- Prerequisites
- Linux machine or Mac Os Machine
- AWS/Azure/GCP Account

### Usage

#### AWS
Update the aws account details in terrform varaiable file, then run the below command to install kubernetes cluster on

```
bash k8scluster.sh aws
```

To clean up the AWS environment with kubernetes, run the below command

```
cd terrform/aws
terraform destroy -auto-approve
```

#### Azure
Make sure you have azure account setup, as below command will open to login to your azure account. Once succesful login it will provision k8s cluster on Azure Virtual Machines

`NOTE:` Azure authentication happened in your default web browser. So this will work only Desktop versions
```
bash k8scluster.sh azure
```

To clean up the AWS environment with kubernetes, run the below command

```
cd terrform/azure
terraform destroy -auto-approve
```

#### Google Cloud
Make sure you have Google cloud account setup, as below command will open to login to your Google account. Once succesful login it will provision k8s cluster on Google Compute Engines

`NOTE:` Google authentication happened in your default web browser and when script is running, it will ask some google cloud recommended settings, please provide as default.

```
bash k8scluster.sh gcp
```

To clean up the AWS environment with kubernetes, run the below command

```
cd terrform/gcp
terraform destroy -auto-approve
```

### Troubleshooting

If you see any error with terraform apply, it could be issue with values from varaiables.tf like ami id. Please update and try to re run. To enable Terraform trace logs, please run below command before running k8scluster.sh
```
export TF_LOG=TRACE
```

To disable logs, run below command
```
export TF_LOG=
```