Kubespec Logo kubespec.dev

v1

Namespaced Resource

Secret

        Secret holds secret data of a certain type. The total bytes of the values in the Data field must be less than MaxSecretSize bytes.
      

Click on Property Name to show the description, and Pink Types to expand schema.

Required properties are marked with *

Change History

Kubernetes v1.32

Kubernetes v1.31

Kubernetes v1.30

Kubernetes v1.29

Kubernetes v1.28

Kubernetes v1.27

~7

Kubernetes v1.26

Kubernetes v1.25

-1

Kubernetes v1.24

~5

Kubernetes v1.23

~1

Kubernetes v1.22

+1

Kubernetes v1.21

~2

Kubernetes v1.20

Kubernetes v1.19

~2

Kubernetes v1.18

+1

Kubernetes v1.17

~1

Kubernetes v1.16

+2-2~3

Kubernetes v1.15

+1

Kubernetes v1.14

+1~1

Kubernetes v1.13

Kubernetes v1.12

~1

Kubernetes v1.11

Examples

There are 2 examples of Secret that you can use as a starting point to create your own.

kind: Secret
apiVersion: v1
metadata:
  name: database-connection
data:
  # this value is base64 encoded, actual content is postgres://postgres:123456@127.0.0.1:5432/dummy
  DATABASE_URL: cG9zdGdyZXM6Ly9wb3N0Z3JlczoxMjM0NTZAMTI3LjAuMC4xOjU0MzIvZHVtbXk=

Other useful resources