Goal
Retrieve the Octopus master key from a Kubernetes deployment.
Prerequisites
- kubectl binary installed and authenticated against the cluster.
- create permission on the pods/exec subresource (and get on pods) in the Octopus Deploy namespace, granted via an RBAC Role/ClusterRole binding.
Steps
- Run the following command against the cluster and namespace where your Octopus Deploy Server is installed, replace with your namespace, commonly it is octopus-deploy:\
kubectl exec sts/octopus-deploy -n <Namespace> -- /Octopus/Octopus.Server show-master-key
Verify
The master key is 256-bit, base64-encoded - so a valid key decodes to exactly 32 bytes.