Code Monkey home page Code Monkey logo

web-app-https-deployment's Introduction

Manage Kubernetes Cluster with Terraform and Web APP Example

In this project I'm demonstrating you how to use Terraform together to create and manage the Kubernetes cluster on Kind.

Prerequisites

  1. Terraform CLI installed
  2. Docker

Getting Started

These commands will get a Cluster with 3 nodes

First, clone the repo:

$ git clone https://github.com/mateusclira/challenge-cloud-engineer.git
$ cd challenge-cloud-engineer

Then initialize Terraform config:

terraform init

Review the actions plan:

terraform plan

Run the Terraform actions:

terraform apply

https://artifacthub.io/packages/helm/ingress-nginx/ingress-nginx

You have to install the ingress-nginx controler

kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.9.4/deploy/static/provider/cloud/deploy.yaml

Run this to install the cert-manager

https://artifacthub.io/packages/helm/cert-manager/cert-manager

First install the CRDs:

kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.13.2/cert-manager.crds.yaml

Add the helm repo

helm repo add jetstack https://charts.jetstack.io

Then install the cert-manager:

helm install cert-manager jetstack/cert-manager --namespace cert-manager --create-namespace --version v1.13.2 --set prometheus.enabled=false --set webhook.timeoutSeconds=4

You are going to need to indicate that the your cluster's IP is addressed to your Hostname. To do so, you are going to need a DNS Provider service

Now, apply the Issuer, so it can provide the environment for the Certificate

kubectl apply -f .\kubernetes\issuer.yaml 

Deploy the application and the service

kubectl apply -f .\kubernetes\deployment.yaml 
kubectl apply -f .\kubernetes\service.yaml

We can now create our Certificate, which will be the last requisite for the Ingress

kubectl apply -f .\kubernetes\certificate.yaml

Make sure your certificate ran correctly and created the tls. You should be able to see a recently created kubernetes.io/tls's TYPE

kubectl get secrets

Finally, create the ingress, and the HTTPS will be available.

kubectl apply -f .\kubernetes\ingress.yaml

Uses on this Github include:

  1. Terraform Kind Cluster Creation
  2. Deploy of a Web Application
  3. Ingress to deploy HTTPS on a Kubernetes Cluster

Guides for study

  1. Kubernetes
  1. Kind
  1. SSL/TLS
  1. Network on Cluster
  1. Configuring Ingress

web-app-https-deployment's People

Contributors

mateusclira avatar

Stargazers

islam mohamed drissi avatar Scott Wey avatar

Watchers

 avatar

web-app-https-deployment's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.