Skip to content

Latest commit

 

History

History
executable file
·
53 lines (42 loc) · 1.13 KB

Readme.md

File metadata and controls

executable file
·
53 lines (42 loc) · 1.13 KB

Spinkube demo

Deploy

cd deployment/terraform
terraform init
terraform apply -auto-approve

Then wait a bit for the cluster to be ready and for flux to deploy the applications.

Test the deployment

Test the queue scaling

From the rabbitmq pod: Create a queue

curl -u user:password -XPUT -H "content-type:application/json" \
    http://localhost:15672/api/queues/%2F/testqueue \
    -d'{"durable":true}'

Send a message

curl -u user:password -XPOST -H "content-type:application/json" \
    http://localhost:15672/api/exchanges/%2F/amq.default/publish \
    -d'{"properties":{},"routing_key":"testqueue","payload":"Hello, World!","payload_encoding":"string"}'

Empty the queue

curl -u user:password -XDELETE -H "content-type:application/json" \
    http://localhost:15672/api/queues/%2F/testqueue/contents

Test the http scaling

From localhost: Get the external ip of the service

kubectl get svc --namespace traefik

put cluster ip in /etc/hosts

echo "<EXTERNAL_IP> whoami.example.com" | sudo tee -a /etc/hosts

Test the service

curl whoami.example.com