<p>I created a secret in kubernetes using the command below - </p>

<pre><code>kubectl create secret generic -n mynamespace test --from-file=a.txt
</code></pre>

<p>Now I try to view it using below commands but am unsuccessful - </p>

<pre><code>kubectl describe secrets/test
kubectl get secret test -o json
</code></pre>

<p>This is the error I get in either case -</p>

<pre><code>Error from server (NotFound): secrets "test" not found
</code></pre>

<p>What can be the cause? I am using GCP for the kubernetes setup. Can the trial version of GCP be the cause for it?</p>

<p>Try to access the secret in the namespace where it was created in:</p>

<pre><code>kubectl -n mynamespace describe secrets/test
kubectl -n mynamespace get secret test -o json
</code></pre>
