Creating the green deployment

Let's perform the following steps to deploy the new version of the application as our green deployment. We will switch the service to green, take a snapshot of blue's persistent volume, and deploy the green workload in a new pod:

  1. Let's create a snapshot of the data from the blue application's PVC and use it to deploy the green application:
$ kubectl create -f snapshot.yaml
volumesnapshot.volumesnapshot.external-storage.k8s.io "snapshot-blue" created
  1. Review the content of the green-percona.yaml file and use that to create the green version of your application:
$ kubectl create -f green-percona.yaml
pod "green" created
persistentvolumeclaim "demo-snap-vol-claim" created

This pod will use a snapshot of the PVC from the blue application as its original PVC.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.253.31