From 6ce8d8e475235dc4471a0d383752be18acb1f35a Mon Sep 17 00:00:00 2001 From: Elliot Anderson Date: Wed, 14 Jun 2017 15:26:47 +0100 Subject: [PATCH] Use native patch functionality instead of JQ --- .../configure-pod-container/configure-service-account.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/docs/tasks/configure-pod-container/configure-service-account.md b/docs/tasks/configure-pod-container/configure-service-account.md index 1dd92774e6..4c8aecf290 100644 --- a/docs/tasks/configure-pod-container/configure-service-account.md +++ b/docs/tasks/configure-pod-container/configure-service-account.md @@ -175,14 +175,10 @@ NAME TYPE DATA AGE myregistrykey   kubernetes.io/.dockerconfigjson   1       1d ``` -Next, read/modify/write the service account for the namespace to use this secret as an imagePullSecret. +Next, modify the default service account for the namespace to use this secret as an imagePullSecret. -Automated version using json and the jq utility: ```shell -kubectl get serviceaccounts default -o json | - jq 'del(.metadata.resourceVersion)'| - jq 'setpath(["imagePullSecrets"];[{"name":"myregistrykey"}])' | - kubectl replace serviceaccount default -f - +kubectl patch serviceaccount default -p '{"imagePullSecrets": [{"name": "myregistrykey"}]}' ```