You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This operator creates a rabbitmq service, and puts the credentials in a secret.
This secret will then be used in the deployment to allow our script to access
the instances.
Rabbitmq
This example is split into 2 parts, sender and receiver, and works as follows:
Skaffold allows us to easily develop an application that will run on kubernetes.
As we will be running a sender and receiver, we will need to describe both.
For our example, 5 files are needed:
skaffold.yaml
k8s-deploy-{receiver,sender}.yaml
docker/Dockerfile.{receiver,sender}
skaffold.yaml
Skaffold configuration, describes the two images we will have to build, and the
kubernetes maniifest to deploy them.
When run with
skaffold dev
skaffold will watch the files in the repo and redeploy when necessary. It is
advised to run this in a separate terminal.
k8s-deploy-{receiver,sender}.yaml
K8s deployment, will launch our image with the credentials stored in the secret
generated by the rabbitmq-operator.
docker/Dockerfile.{receiver,sender}
Dockerfile to run our script.
Usage
For development:
NAMESPACE="test-rabbitmq"kubectl -n $NAMESPACE apply -f ./simple.yamlskaffold -n $NAMESPACE dev
For deployment:
NAMESPACE="test-rabbitmq"kubectl -n $NAMESPACE apply -f ./simple.yamlskaffold -n $NAMESPACE run