Skip to content

mikebryant/random-secret-operator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Random Secret Operator

The random secret operator creates Secrets containing random data.

This is useful for frameworks like Django, that need a SECRET_KEY to initialise cryptography, and needs to be the same across multiple instances.

Install metacontroller

Follow the upstream guide

Start the Operator

# Create the operator
$ kubectl apply -k deploy

# Wait for the pod status to be Running
$ kubectl --namespace randomsecret get pod
NAME                                     READY     STATUS        RESTARTS   AGE
randomsecret-operator-6db7d8c7cf-l8vr4   1/1       Running       0          3s


# View the random secret CRD
$ kubectl get crd randomsecrets.randomsecrets.mikebryant.me.uk
NAME                                           AGE
randomsecrets.randomsecrets.mikebryant.me.uk   32s

Create the example RandomSecret Resource

# Create the example
$ kubectl apply -f examples/resource.yaml

# See the example resource
$ kubectl -n default get randomsecrets
NAME      AGE
minimal   12s

Cleanup

$ kubectl delete -f examples
$ kubectl delete -f deploy