All Projects → daxio → k8s-lemp

daxio / k8s-lemp

Licence: GPL-3.0 License
LEMP stack in a Kubernetes cluster

Programming Languages

HTML
75241 projects

Projects that are alternatives of or similar to k8s-lemp

Azure-AKS-ApplicationGateway-WAF
No description or website provided.
Stars: ✭ 16 (-78.38%)
Mutual labels:  cluster, waf, kubernetes-cluster
ansible-role-pacemaker
Ansible role to deploy Pacemaker HA clusters
Stars: ✭ 19 (-74.32%)
Mutual labels:  cluster, high-availability
LaraSible
A complete ansible playbook for create a hosting envorinment with Nginx, PHP-FPM, Redis and MariaDB for Laravel Framework on Linux
Stars: ✭ 15 (-79.73%)
Mutual labels:  mariadb, fastcgi
slock
High-performance distributed sync service and atomic DB
Stars: ✭ 50 (-32.43%)
Mutual labels:  cluster, distributed
WatsonCluster
A simple C# class using Watson TCP to enable a one-to-one high availability cluster.
Stars: ✭ 18 (-75.68%)
Mutual labels:  cluster, high-availability
ansible-role-etcd
Ansible role for installing etcd cluster
Stars: ✭ 38 (-48.65%)
Mutual labels:  cluster, high-availability
manager
The API endpoint that manages nebula orchestrator clusters
Stars: ✭ 28 (-62.16%)
Mutual labels:  cluster, distributed
Multi-Node-TimescaleDB
The multi-node setup of TimescaleDB 🐯🐯🐯 🐘 🐯🐯🐯
Stars: ✭ 42 (-43.24%)
Mutual labels:  cluster, distributed
moosefs-csi
Container Storage Interface (CSI) for MooseFS
Stars: ✭ 44 (-40.54%)
Mutual labels:  cluster, kubernetes-cluster
docs
Documentation repo of nebula orchestration system
Stars: ✭ 16 (-78.38%)
Mutual labels:  cluster, distributed
pg-dock
pg-dock cluster managment
Stars: ✭ 19 (-74.32%)
Mutual labels:  cluster, high-availability
LEMPer
LEMPer Stack is terminal-based LEMP / LNMP installer and manager for Debian & Ubuntu cloud or virtual server (vps) and on-premise (bare metal).
Stars: ✭ 171 (+131.08%)
Mutual labels:  mariadb, lemp
k0s-ansible
Create a Kubernetes Cluster using Ansible and the vanilla upstream Kubernetes distro k0s.
Stars: ✭ 56 (-24.32%)
Mutual labels:  kubernetes-cluster, high-availability
k8s-istio-demo
Demo showing the capabilities of Istio
Stars: ✭ 22 (-70.27%)
Mutual labels:  cluster, kubernetes-cluster
ha cluster exporter
Prometheus exporter for Pacemaker based Linux HA clusters
Stars: ✭ 63 (-14.86%)
Mutual labels:  cluster, high-availability
kube-watch
Simple tool to get webhooks on Kubernetes cluster events
Stars: ✭ 21 (-71.62%)
Mutual labels:  cluster, kubernetes-cluster
ddrt
An elixir implementation of Rtree, optimized for fast updates.
Stars: ✭ 38 (-48.65%)
Mutual labels:  cluster, distributed
Coerce Rs
Coerce - an asynchronous (async/await) Actor runtime and cluster framework for Rust
Stars: ✭ 231 (+212.16%)
Mutual labels:  cluster, distributed
Mosquitto Cluster
a built-in, autonomous Mosquitto Cluster implementation. MQTT集群.
Stars: ✭ 238 (+221.62%)
Mutual labels:  cluster, high-availability
kubernetes the easy way
Automating Kubernetes the hard way with Vagrant and scripts
Stars: ✭ 22 (-70.27%)
Mutual labels:  cluster, kubernetes-cluster

Kubernetes LEMP Stack

Kubernetes LEMP Stack is a distributed LEMP stack built on top of a Kubernetes cluster. It enables anyone to deploy multiple CMSs (currently WordPress) for any number of websites. We built it to be secure and very fast by default.

Currently this supports Google Compute Engine as a cloud provider. Other providers haven't been tested (things like PersistentVolume and Ingress depend on your cloud provider).

There are already stable turn-key deployments for various CMSs via Kubernetes Helm Charts, but Kubernetes LEMP Stack is designed more or less in the traditional LEMP fashion where you get a bucket for all of your HTML at /var/www/html and you may or may not use a CMS.

Actually, k8s LEMP Stack should be able to serve as your own personal web server farm! Use it as a backend to your own cloud hosting company! We also want extra customisation in terms of our web server and security hardening measures. In addition, future improvements aim to make this software scalable and highly-available.

How It Works

  • WordPress

    • Each WordPress CMS is based on the wordpress:php7.3-fpm image with extra required PHP extensions such as redis. WordPress is contained in one Deployment controller along with an NGINX container with FastCGI caching and the NAXSI web application firewall.
    • Each WordPress Deployment gets it's own PersistentVolume as well as Secret objects for storing sensitive information such as passwords for their DBs.
    • ConfigMaps are used to inject various php.ini settings for PHP 7.3.
  • NGINX

    • The NGINX container has multiple handy configurations for multi-site and caching, all easily deployed using ConfigMap objects.
    • We build NGINX with the nginx-naxsi image, which comes with:
      • NBS System's NAXSI module. NAXSI means NGINX Anti-XSS & SQL Injection.
      • Handy configurations for NGINX and the NAXSI web application firewall are also included via ConfigMaps.
  • MariaDB

    • Initially, the WordPress pods all interface with one mariadb StatefulSet. This is so anyone can start off with a full-fledged web farm and bring up any number of websites using one mariadb instance with a databse for each site. Future improvements will allow for HA and scalable clustered RDBMSs.
    • mariadb also gets a PersistentVolume and Secret objects.
    • Updating StatefulSet objects in Kubernetes is currently a manual process, meaning we have to execute MySQL commands in the mariadb pod to add new databases and users.
  • Redis

    • To reduce hits to the DB we build the WP image with the redis PHP extension and include a Redis Deployment.
    • WP must be configured to use Redis upon initialising a new WP site by installing and configuring the WP Redis Object Cache plugin.
  • Ingress/Kube Lego

    • Websites are reached externally via an nginx Ingress controller. See Kubernetes documentation regarding Ingress in the official docs and on GitHub.
    • All TLS is terminated at Ingress via free Let's Encrypt certificates good for all domains on your cluster. Better yet, certificate issuance is handled automatically with the awesome cert-manager.
  • See Installation and Usage for instructions on getting up and running.

Kubernetes LEMP Stack Architecture

TODO

  • Add diagram detailing the general structure of the cluster
  • High availability
  • PHP socket
  • New annotation kubernetes.io/ingress.global-static-ip-name: "wpclust-ingress"
  • Migrate to certmanager (with Helm installation)

Installation and Usage

Visit USAGE.md.

Acknowledgements

This project was inspired by the official Kubernetes WordPress + MySQL sample and builds on it with the various other official Docker images and Kubernetes applications mentioned previously.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].