A small example app, showing the power of Kamus. Before running this demo, make sure Kamus is up and running, and the CLI is installed.
Start by encrypting a secret using the CLI:
kamus-cli encrypt super-secret kamus-example-sa default --kamus-url <Kamus URL>
You might have to pass aditional arguments, based on your installation.
After encrypting the secret, open deployment-kamus\configmap.yaml.
Modify the value of key to the encrypted value returned from the CLI.
Now, run
kubectl apply -f deployment-kamus/
To deploy the example app. Check deployment status using
kubectl get pods
Notice the kamus-example pods. Wait for the pod to be in Completed state, and check the logs using
kubectl logs -l app=kamus-example
You should see the following output
{"key":"super-secret"}
The example using an init container to decrypt the encrypted values. Checkout the documentation for additional details.
To complete the example, reffer to deployment-secret.
This example shows the alternative to Kamus - using Kubernetes native secrets.
Run the demo using
kubectl apply -f deployment-kamus/
Notice the kamus-example pods. Wait for the pod to be in Completed state, and check the logs using
kubectl logs -l app=kamus-example
You should see the following output
{"key":"super-secret"}
Editing the secrets:
secret.yamlconfig.json using base64 decoderconfig.jsonContent type
Image
Digest
Size
128.5 MB
Last updated
over 7 years ago
docker pull soluto/kamus-example-app