Coder Social home page Coder Social logo

openfun / kubic Goto Github PK

View Code? Open in Web Editor NEW
31.0 9.0 2.0 584 KB

A Kubernetes deployment as code to OVH or Scaleway, with Prometheus, ArgoCD and Hashicorp Vault

Home Page: https://openfun.github.io/kubic/

License: MIT License

HCL 70.80% Shell 29.20%
argocd hashicorp-vault kubernetes ovh prometheus scaleway terraform

kubic's Introduction

Kubic - Kubernetes Infrastructure as Code

Kubernetes NGINX ArgoCD Vault Terraform

Available on:

Scaleway OVH

Overview

Kubic is a cutting edge, ready for production and multi cloud provider Kubernetes infrastructure as code. It integates an ingress controller, a certificate manager, a monitoring stack, a GitOps tool with complete secret management and a backup tool.

This Terraform aims at creating a managed k8s cluster setup with :

  • NGINX Ingress Controller
  • Cert-manager
  • Prometheus / Grafana
  • ArgoCD
  • Hashicorp Vault if needed
  • ArgoCD Vault Plugin if Vault is deployed
  • Velero for backuping the cluster

The cluster can be deployed either on OVHCloud or on Scaleway. New provider can be added by creating a new folder in the root of the repository, and by following the same architecture as the existing providers.

Repository architecture

.
├── docs                  # Folder containing the documentation
├── state_bucket          # Folder containing the Terraform to create a S3 bucket for the Terraform state
├── vault                 # Folder containing the Terraform to configure Hashicorp Vault
├── common                # Folder containing the Terraform which is common to all the providers
├── ovh                   # Folder declaring Terraform to deploy a cluster on OVHCloud
├── scaleway              # Folder declaring Terraform to deploy a cluster on Scaleway
├── examples              # Folder containing examples of applications to deploy with ArgoCD
├── .gitignore
├── LICENSE
└── README.md

All files contained in the folder common are symbolicaly linked in the folders ovh and scaleway to avoid code duplication.

Getting started

Contributing

Currently, only OVH and Scaleway are supported as providers. Here are the guidelines to add a new provider:

  • Create a new folder in the root of the repository, with the name of the provider;
  • Create a symlink for all files in common to your new folder;
  • Create a terraform.tf file containing:
    • Terraform configuration with a s3 backend;
    • The helm, kubernetes and kubectl providers along with the provider(s) you need, correctly configured;
  • A kubernetes.tf file creating the cluster, with an output named kubeconfig that contains the actual kubeconfig for the cluster;
  • A ingress-nginx.tf file, deploying the ingress-nginx ingress controller and configuring it with an external IP (you may need to create a load balancer on your provider). The ingress IP should be a Terraform output named ingress_ip;
    • This must also create a null_resource named ingress-nginx that will depends_on on the node pool of your cluster (this is to get a consistent dependency chain for Terraform)
    • The controller must have at least the following configuration:
controller:
  metrics:
    enabled: true
    serviceMonitor:
      additionalLabels:
        release: prometheus
      enabled: true
  extraArgs:
    enable-ssl-passthrough: true
  admissionWebhooks:
    timeoutSeconds: 30
  • Edit the docker-compose.yaml and create a service (adapt merely the code) for your provider.

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.