You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To update your service credentials without experiencing app downtime:
258
+
To update your service credentials without experiencing app downtime you can either employ a blue-green update scheme or use the new service credential binding rotation feature.
1. Start a blue-green update of the app. For more information, see [Using blue-green deployment to reduce downtime and risk](../deploy-apps/blue-green.html). Push the "Green" version of the app with the `--no-start` parameter to prevent the app from starting right away:
261
263
@@ -281,6 +283,35 @@ To update your service credentials without experiencing app downtime:
The service credential binding rotation feature allows you to rotate credentials for a service instance without unbinding and rebinding the service instance. This feature requires the following prerequisites:
289
+
290
+
- The Cloud Foundry platform must support at least 2 bindings per service instance. This is configured by the platform operator with the `cc.max_service_credential_bindings_per_app_service_instance` property in the Cloud Controller configuration.
291
+
- The service broker must support multiple bindings for the service offering.
292
+
- You must use at least CF CLI v8.18.0.
293
+
294
+
To rotate credentials for an already bound service instance with no downtime:
295
+
296
+
1. Create an additional service binding to your service instance by running:
1. Trigger a rolling update of your application. The updated application instances will only see the new credentials:
303
+
304
+
<preclass="terminal">
305
+
$ cf restage YOUR-APP --strategy rolling
306
+
</pre>
307
+
308
+
1. Once the update has been completed, you can delete the old service bindings with the `cleanup-outdated-service-bindings` command. It only keeps the newest binding and deletes the old bindings:
309
+
310
+
<preclass="terminal">
311
+
$ cf cleanup-outdated-service-bindings YOUR-APP
312
+
</pre>
313
+
314
+
284
315
## <aid='unbind'></a>Unbind a service instance
285
316
286
317
Unbinding a service removes the credentials created for your app from the [VCAP_SERVICES](../deploy-apps/environment-variable.html) environment variable.
@@ -293,3 +324,6 @@ OK
293
324
294
325
<pclass="note important">
295
326
You must restart or in some cases re-push your app for changes to be applied to the <ahref="../deploy-apps/environment-variable.html">VCAP_SERVICES</a> environment variable and for the app to recognize these changes.</p>
327
+
328
+
<pclass="note important">
329
+
If there are multiple service bindings as described in [Service credential binding rotation](#service-credential-binding-rotation), make sure to use CF CLI v8.18.0 or later to unbind all service bindings.</p>
0 commit comments