This is a draft document that was built and uploaded automatically. It may document beta software and be incomplete or even incorrect. Use this document at your own risk.
SUSE Cloud Application Platform supports CredHub integration. You should already have a working CredHub instance, a CredHub service on your cluster, then apply the steps in this chapter to connect SUSE Cloud Application Platform.
Start by creating a new directory for the CredHub client on your local workstation, then download and unpack the CredHub client. The following example is for the 2.2.0 Linux release. For other platforms and current releases, see the cloudfoundry-incubator/credhub-cli at https://github.com/cloudfoundry-incubator/credhub-cli/releases
tux >mkdir chclienttux >cd chclienttux >wget https://github.com/cloudfoundry-incubator/credhub-cli/releases/download/2.2.0/credhub-linux-2.2.0.tgztux >tar zxf credhub-linux-2.2.0.tgz
CredHub is enabled by default. To disable it, add the following the following
block to your kubecf-config-values.yaml file.
features:
credhub:
enabled: false
To enable CredHub again, update the above block in your kubecf-config-values.yaml so that
enabled is set to true.
After making the change above, and any other configuration changes, apply the update by doing the following:
For an initial deployment, continue to the deployment steps for your platform:
For SUSE CaaS Platform, see Section 4.13, “Deploying SUSE Cloud Application Platform”.
For Microsoft AKS, see Section 5.13, “Deploying SUSE Cloud Application Platform”.
For Amazon EKS, see Section 6.13, “Deploying SUSE Cloud Application Platform”.
For Google GKE, see Section 7.14, “Deploying SUSE Cloud Application Platform”.
For an existing deployment, use helm upgrade to apply
the change.
tux > helm upgrade kubecf suse/kubecf \
--namespace kubecf \
--values kubecf-config-values.yaml \
--version 2.7.13
On occasion, the credhub pod may fail to start due to
database migration failures; this has been spotted intermittently on
Microsoft Azure Kubernetes Service and to a lesser extent, other public clouds.
In these situations, manual intervention is required to track the last
completed transaction in credhub_user database and
update the flyway schema history table with the record of the last
completed transaction. Please contact support for further instructions.
Set environment variables for the CredHub client, your CredHub service
location, and Cloud Application Platform namespace. In these guides the example namespace is
kubecf:
tux >CH_CLI=~/chclient/credhubtux >CH_SERVICE=https://credhub.example.comtux >NAMESPACE=kubecf
Set up the CredHub service location:
tux >SECRET="$(kubectl get secrets --namespace "${NAMESPACE}" | awk '/^secrets-/ { print $1 }')"tux >CH_SECRET="$(kubectl get secrets --namespace "${NAMESPACE}" "${SECRET}" --output jsonpath="{.data['uaa-clients-credhub-user-cli-secret']}"|base64 --decode)"tux >CH_CLIENT=credhub_user_clitux >echo Service ......@ $CH_SERVICEtux >echo CH cli Secret @ $CH_SECRET
Set the CredHub target through its Kubernetes service, then log into CredHub:
tux >"${CH_CLI}" api --skip-tls-validation --server "${CH_SERVICE}"tux >"${CH_CLI}" login --client-name="${CH_CLIENT}" --client-secret="${CH_SECRET}"
Test your new connection by inserting and retrieving some fake credentials:
tux >"${CH_CLI}" set --name FOX --type value --value 'fox over lazy dog'tux >"${CH_CLI}" set --name DOG --type user --username dog --password foxtux >"${CH_CLI}" get --name FOXtux >"${CH_CLI}" get --name DOG