Skip to main content
Skip table of contents

Project Secrets

These pages refer to DKP Enterprise and DKP Gov Advanced products.

Project Secrets can be created to make sure a Kubernetes Secrets are automatically created on all the Kubernetes clusters associated with the Project, in the corresponding namespace.

Configure Project Secrets - UI Method

  1. Select the workspace your project was created in from the workspace selection dropdown in the header.

  2. In the sidebar menu, select Projects.

  3. Select the project you want to configure from the table.

  4. Select the Secrets tab, and then select the Create Secret button.

  5. Complete the form and select the Create button.

Configure Project Secrets - CLI Method

A Project Secret is simply a Kubernetes FederatedConfigSecret and can also be created using kubectl:

cat << EOF | kubectl create -f -
kind: FederatedSecret
  generateName: secret1-
  namespace: ${projectns}
    clusterSelector: {}
      key: dmFsdWU=

Ensure the projectns variable is set before executing the command.

projectns=$(kubectl -n ${workspacens} get -o jsonpath='{.items[?(@.metadata.generateName=="project1-")]}')

The value of the key is base64 encoded.

If you run the following command on a Kubernetes cluster associated with the Project, you see a Kubernetes Secret Object, in the corresponding namespace:

kubectl -n ${projectns} get secret secret1-r9vk2 -o yaml
apiVersion: v1
  key: dmFsdWU=
kind: Secret
  creationTimestamp: "2020-06-04T16:51:59Z"
  labels: "true"
  name: secret1-r9vk2
  namespace: project1-5ljs9-lhvjl
  resourceVersion: "137215"
  selfLink: /api/v1/namespaces/project1-5ljs9-lhvjl/secrets/secret1-r9vk2
  uid: e5c6fc1d-93e7-47fe-ae1e-f418f8e35d72
type: Opaque

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.