Giter VIP home page Giter VIP logo

ionos's Introduction

# Kubernetes Cluster Deployment with Terraform for IONOS Public Cloud by Wassim Ben Jabria

## Overview

This Terraform template enables the deployment of a Kubernetes cluster on the IONOS cloud platform. It includes the setup of a sample Nginx deployment.

## Prerequisites

### For Kubernetes:
- Ensure you have `kubectl` installed on your local machine.
- Access to a Kubernetes cluster.

### For Terraform:
- Ensure you have Terraform installed on your local machine.

## Usage

### Deploy the Kubernetes Cluster:

1. Clone this repository to your local machine.
2. Set your credentials:
   - Replace the placeholder values in the `terraform-template-nginx.tf` file with your IONOS cloud credentials.
   - Update the username and password in the provider block.

3. Deploy the Kubernetes cluster:
   - Navigate to the directory containing the `terraform-template-nginx.tf` file.
   - Run `terraform init` to initialize the Terraform configuration.
   - Run `terraform plan` to check the Terraform plan.
   - Run `terraform apply` to create the resources.

### Verify Deployment:

- Use `kubectl` commands to verify that the Kubernetes resources have been created successfully.

### Access Kubernetes Cluster:

- Use `kubectl` commands to interact with your Kubernetes cluster.
- To get inside the Nginx pod:
  ```bash
  kubectl exec -it <nginx-pod-name> -- /bin/bash
  • Repository of the index.html:
    /usr/share/nginx/html
  • Copy your local index.html and change the one in the pod:
    kubectl cp index.html {your_pod_name}:/usr/share/nginx/html/index.html
  • Change the index.html:
    echo "<html><body><h1>Hello, world! It's Wassim Ben Jabria</h1></body></html>" > index.html
  • Command to map your pod port to your local machine port:
    kubectl port-forward service/nginx-service 6556:80

Useful Commands for Terraform:

  • Initialize Terraform:
    terraform init
  • Plan Terraform changes:
    terraform plan
  • Apply Terraform changes:
    terraform apply

Credentials

  • Username: Your IONOS cloud username
  • Password: Your IONOS cloud password

Author

Wassim Ben Jabria

ionos's People

Watchers

EdgeLaboratory avatar

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.