2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

KubernetesのSecretの値をデコードして確認する

Posted at

はじめに

KubernetesのSecretの値はエンコードされているだけなので、デコードすれば値が確認できる。
その確認方法。

確認方法

kubectl describeでkey-valueのkeyの値がわかる(ここではpassword)

$ kubectl describe secrets secret1
Name:         secret1
Namespace:    default
Labels:       <none>
Annotations:  <none>

Type:  Opaque

Data
====
password:  6 bytes

keyの値を指定して、valueの値をデコードする。

$ kubectl get secret secret1 -o jsonpath="{.data.password}" | base64 -d
123456
2
3
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?