KUBERNETES(1) kubernetes KUBERNETES(1) (NAME) kubectl-set-env - (pod template) (SYNOPSIS) kubectl set env [OPTIONS] (DESCRIPTION) (pod template). . ( replication controller deployment). (wildcard) . "--env -" STDIN env . ( ): pod (po), replicationcontroller (rc), deployment (deploy), daemonset (ds), statefulset (sts), cronjob (cj), replicaset (rs) (OPTIONS) --all=false true (namespace) . --allow-missing-template-keys=true true (map key) . golang jsonpath . -c, --containers="*" (wildcards) . --dry-run="none" "none" "server" "client" . client . server . -e, --env=[] - . --field-manager="kubectl-set" . -f, --filename=[] URL . --from="" . --keys=[] (import) . -k, --kustomize="" kustomization. -f -R . --list=false true . kubectl view env . --local=false true set env api-server . -o, --output="" . : (json, yaml, kyaml, name, go-template, go-template- file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath- file). --overwrite=true true . --prefix="" . -R, --recursive=false -f --filename. . --resolve=false true secret configmap . -l, --selector="" ( ) '=' '==' '!=' 'in' 'notin' ( -l key1=value1,key2=value2,key3 in (value3)). . --show-managed-fields=false true managedFields JSON YAML . --template="" -o=go-template -o=go-template-file. golang [http://golang.org/pkg/text/template/#pkg-overview]. (OPTIONS INHERITED FROM PARENT COMMANDS) --as="" (impersonate) . (service account) . --as-group=[] . --as-uid="" UID . --as-user-extra=[] . --cache-dir="/home/username/.kube/cache" --certificate-authority="" (certificate authority) --client-certificate="" TLS --client-key="" TLS --cluster="" kubeconfig --context="" kubeconfig --disable-compression=false true --insecure-skip-tls-verify=false true . HTTPS --kubeconfig="" kubeconfig CLI. --kuberc="" kuberc (preferences). export feature gate KUBECTL_KUBERC=false KUBERC=off . --match-server-version=false -n, --namespace="" (namespace) CLI --password="" (basic authentication) API --profile="none" . (none|cpu|heap|goroutine|threadcreate|block|mutex|trace) --profile-output="profile.pprof" --request-timeout="0" . ( 1s 2m 3h). ( timeout). -s, --server="" Kubernetes API --tls-server-name="" . hostname --token="" Bearer API --user="" kubeconfig --username="" API --version=false --version --version=raw --version=vX.Y.Z... --warnings-as-errors=false (EXAMPLES) # deployment 'registry' kubectl set env deployment/registry STORAGE_DIR=/local # deployment 'sample-build' kubectl set env deployment/sample-build --list # kubectl set env pods --all --list # deployment YAML kubectl set env deployment/sample-build STORAGE_DIR=/data -o yaml # replication controller ENV=prod kubectl set env rc --all ENV=prod # secret kubectl set env --from=secret/mysecret deployment/myapp # config map kubectl set env --from=configmap/myconfigmap --prefix=MYSQL_ deployment/myapp # config map kubectl set env --keys=my-example-key --from=configmap/myconfigmap deployment/myapp # ENV 'c1' deployment kubectl set env deployments --all --containers="c1" ENV- # ENV deployment deployment kubectl set env -f deploy.json ENV- # deployment env | grep RAILS_ | kubectl set env -e - deployment/registry (SEE ALSO) kubectl-set(1) (HISTORY) Eric Paris (eparis at redhat dot com) kubernetes ! Eric Paris Jan 2015 KUBERNETES(1)