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.
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
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