I've created a secret okay by doing this...kubectl create secret generic <namespace> <secret-name> --from-literal=value1=xxxx --from-literal=value2=xxxx --from-literal=value3=xxxx
When I do a get command I get
apiVersion: v1
data:
value1: xxxx
value2: xxxx
value3: xxxx
kind: Secret
metadata:
creationTimestamp: <time>
name: <secret-name>
namespace: <namespace>
resourceVersion: <version number>
uid: <alpha-numeric>
type: Opaque
...the thing is...I was expecting to automatically include an annotations section below where it says metadata so that it should looks more like
apiVersion: v1
data:
value1: xxxx
value2: xxxx
value3: xxxx
kind: Secret
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"v1","data":{"value1":<api>,"value2":<portalid> ,"value3" <reporting-
id>},"kind":"Secret","metadata":{"annotations":{},"name":"<secret-name>","namespace":"
<namespace>"},"type":"Opaque"}
creationTimestamp: <time>
name: <secret-name>
namespace: <namespace>
resourceVersion: <version number>
uid: <alpha-numeric>
type: Opaque
Is this ONLY possible if you add the secret from a file or is there away you can add this annotation information via the string literal..I've been searching the internet but the only solution I can find is via a file...not through a string as such....can anybody help?