Skip to content

Latest commit

 

History

History
82 lines (54 loc) · 2.39 KB

README.md

File metadata and controls

82 lines (54 loc) · 2.39 KB

How to run Coolbeans in Kubernetes

This repository provides a sample setup and examples to run coolbeans queue service on kubernetes.

Quick setup

Prior to running this setup, ensure you have the following pre-requisites.

  • A running kubernetes cluster.

  • Ensure kubectl's context is pointed to the appropriate cluster by running kubectl config get-contexts.

Run setup.sh

./setup.sh

The above script applies k8s yaml files to create

  • A namespace called coolbeans. All the kubernetes entities will be created within this namespace

  • A three pod stateful set that provides a replicated coolbeans queue.

  • A beanstalkd proxy service, with two replica pods, that proxies your request to the coolbeans queue.

  • A prometheus service which captures running metrics

Verify that all pods are up & running

kubectl -n coolbeans get pods --watch
    NAME                          READY   STATUS              RESTARTS   AGE
    beanstalkd-7565987d88-f7qs6   1/1     Running             0          18s
    beanstalkd-7565987d88-wlbpb   1/1     Running             0          18s
    coolbeans-0                   1/1     Running             0          19s
    coolbeans-1                   1/1     Running             0          19s
    coolbeans-2                   1/1     Running             0          24s

If you prefer to see a detailed step by step review check out guide.

Next steps

Shutdown this setup

To shutdown

./shutdown.sh

Verify that all resources are removed

kubectl get namespace coolbeans
Error from server (NotFound): namespaces "coolbeans" not found

Ensure that the cloud provider has removed the storage that backs the persistent volume.