Skip to content

Latest commit

 

History

History
60 lines (43 loc) · 2.21 KB

README.md

File metadata and controls

60 lines (43 loc) · 2.21 KB

First in class complex post-AI blockchain-less nextgen advanced opensource end-to-end scalable multicloud SaaS smart product for high-loaded secure high performance computing systems

globohomo art style

Powered with cutting edge Foretold Termination™ technology (saves time on container unload), famous "less than 10 seconds" calculator on kubernetes.

Prerequisites

Installation and usage

kind cluster with ingress preparation:

# cluster creation with `kind`
kind create cluster --config=./kind.yaml

# ingress NGINX controller
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml

# wait until is ready to process requests running
kubectl wait --namespace ingress-nginx \
  --for=condition=ready pod \
  --selector=app.kubernetes.io/component=controller \
  --timeout=90s

k8-calc installation:

# installation
helm install k8-calc k8-calc/

# verification -- should output "69"
curl localhost/k8_calc

For different calculation you have two options:

  1. re-deploy with new expression argument
    • helm install k8-calc k8-calc/ --set expression=%your_expression%
    • check localhost/k8_calc
  2. change ConfigMap inside current deployment
    • run kubectl edit configmap calculateme-configmap
    • change calculateme: 60+9 line, save and exit text editor
    • check localhost/k8_calc

To remove everything:

  • run kind delete cluster

How it works

  • There is env string variable calculateme defined in the ConfigMap
  • A busybox pod runs it through bc, writes an answer to a file in the mounted volume and dies
  • A nginx pod mounts this file as index.html, so it is accessible via an HTTP request
  • The Reloader watches ConfigMap and restarts busybox pod if it changed