Skip to content

Commit 3cb9efd

Browse files
committed
[hi] add example policy secret part 1
1 parent 5162171 commit 3cb9efd

File tree

5 files changed

+54
-0
lines changed

5 files changed

+54
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apiVersion: v1
2+
kind: Secret
3+
metadata:
4+
name: secret-basic-auth
5+
type: kubernetes.io/basic-auth
6+
stringData:
7+
username: admin # required field for kubernetes.io/basic-auth
8+
password: t0p-Secret # required field for kubernetes.io/basic-auth
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: v1
2+
kind: Secret
3+
metadata:
4+
name: bootstrap-token-5emitj
5+
namespace: kube-system
6+
type: bootstrap.kubernetes.io/token
7+
data:
8+
auth-extra-groups: c3lzdGVtOmJvb3RzdHJhcHBlcnM6a3ViZWFkbTpkZWZhdWx0LW5vZGUtdG9rZW4=
9+
expiration: MjAyMC0wOS0xM1QwNDozOToxMFo=
10+
token-id: NWVtaXRq
11+
token-secret: a3E0Z2lodnN6emduMXAwcg==
12+
usage-bootstrap-authentication: dHJ1ZQ==
13+
usage-bootstrap-signing: dHJ1ZQ==
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
apiVersion: v1
2+
kind: Secret
3+
metadata:
4+
# Note how the Secret is named
5+
name: bootstrap-token-5emitj
6+
# A bootstrap token Secret usually resides in the kube-system namespace
7+
namespace: kube-system
8+
type: bootstrap.kubernetes.io/token
9+
stringData:
10+
auth-extra-groups: "system:bootstrappers:kubeadm:default-node-token"
11+
expiration: "2020-09-13T04:39:10Z"
12+
# This token ID is used in the name
13+
token-id: "5emitj"
14+
token-secret: "kq4gihvszzgn1p0r"
15+
# This token can be used for authentication
16+
usage-bootstrap-authentication: "true"
17+
# and it can be used for signing
18+
usage-bootstrap-signing: "true"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apiVersion: v1
2+
kind: Secret
3+
metadata:
4+
name: secret-dockercfg
5+
type: kubernetes.io/dockercfg
6+
data:
7+
.dockercfg: |
8+
eyJhdXRocyI6eyJodHRwczovL2V4YW1wbGUvdjEvIjp7ImF1dGgiOiJvcGVuc2VzYW1lIn19fQo=
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
apiVersion: v1
2+
kind: Secret
3+
type: kubernetes.io/service-account-token
4+
metadata:
5+
name: mysecretname
6+
annotations:
7+
kubernetes.io/service-account.name: myserviceaccount

0 commit comments

Comments
 (0)