Skip to content

Latest commit

 

History

History
36 lines (31 loc) · 968 Bytes

Set_KubernetesSecrets.md

File metadata and controls

36 lines (31 loc) · 968 Bytes
  1. Log in to your IBM Cloud account.
ibmcloud login -a cloud.ibm.com -r jp-tok -g Default
  1. Set the Kubernetes context to your cluster for this terminal session.
ibmcloud ks cluster config --cluster <clusterID>
  1. Verify that you can connect to your cluster.
kubectl config current-context
  1. create Secret using kubectl command
kubectl.exe create secret --help

Example: Create a folder by name couchdb and create files within it for each of the secrets:

$ mkdir couchdb
$ cd couchdb
$ echo "xxxxxxxxxx-bluemix.cloudantnosqldb.appdomain.cloud" >> couchDbHost
$ echo "apikey-v2-yyyyyy" >> couchDbAdminUsername
$ echo "zzzzzzz" >> couchDbAdminPassword
$ echo "IBM_CLOUDANT" >> couchDbProvider

Use kubectl create secret to create the Kubernete secrets

$ cd ..
$ kubectl create secret generic couchdb-secret --from-file=./couchdb