github.com/pachyderm/pachyderm@v1.13.4/doc/docs/1.9.x/deploy-manage/manage/upgrades.md (about)

     1  # Upgrade Pachyderm
     2  
     3  If you need to upgrade Pachyderm from one major version
     4  to another, such as from `1.8.x` to `1.9.x`, follow the
     5  instructions in the [Migrate between major versions](./migrations.md).
     6  
     7  Upgrades from one minor version to another, such as from version `1.9.0` to
     8  version `1.9.2` do not introduce breaking changes. Therefore, the upgrade
     9  procedure is simple and requires little to no downtime.
    10  
    11  !!! warning
    12      Do not use these steps to upgrade between major versions because
    13      it might result in data corruption.
    14  
    15  To upgrade Pachyderm to a minor version, complete the following steps:
    16  
    17  1. Back up your cluster as described in the [Backup and Restore](../backup_restore/#general-backup-procedure)
    18  section.
    19  
    20  1. Destroy your Pachyderm cluster:
    21  
    22     ```
    23     pachctl undeploy
    24     ```
    25  
    26  1. Upgrade `pachctl` by using `brew` for macOS or `apt` for Linux:
    27  
    28     **Example:**
    29  
    30     ```shell
    31     $ brew upgrade pachyderm/tap/pachctl@1.10
    32     ==> Upgrading 1 outdated package:
    33     pachyderm/tap/pachctl@1.10
    34     ==> Upgrading pachyderm/tap/pachctl@1.10
    35     ...
    36     ```
    37  
    38     **Note:** You need to specify the version of `pachctl` to which
    39     you want to upgrade. For example, if you want to upgrade `1.9.0` to
    40     `1.9.2`, add `@1.9` at the end of the upgrade path.
    41  
    42  1. Confirm that the new version has been successfully installed by running
    43  the following command:
    44  
    45     ```shell
    46     $ pachctl version --client-only
    47     COMPONENT           VERSION
    48     pachctl             1.9.2
    49     ```
    50  
    51  1. Redeploy Pachyderm by running the `pachctl deploy` command
    52  with the same arguments, fields, and storage resources
    53  that you specified when you deployed the previous version
    54  of Pachyderm:
    55  
    56     ```shell
    57     $ pachctl deploy <args>
    58     serviceaccount "pachyderm" created
    59     storageclass "etcd-storage-class" created
    60     service "etcd-headless" created
    61     statefulset "etcd" created
    62     service "etcd" created
    63     service "pachd" created
    64     deployment "pachd" created
    65     service "dash" created
    66     deployment "dash" created
    67     secret "pachyderm-storage-secret" created
    68  
    69     Pachyderm is launching. Check its status with "kubectl get all"
    70     Once launched, access the dashboard by running "pachctl port-forward"
    71     ```
    72  
    73     The deployment takes some time. You can run `kubectl get pods` periodically
    74     to check the status of the deployment. When Pachyderm is deployed, the command
    75     shows all pods as `READY`:
    76  
    77  
    78     ```shell
    79     $ kubectl get pods
    80     NAME                     READY     STATUS    RESTARTS   AGE
    81     dash-482120938-np8cc     2/2       Running   0          4m
    82     etcd-0                   1/1       Running   0          4m
    83     pachd-3677268306-9sqm0   1/1       Running   0          4m
    84     ```
    85  
    86  1. Verify that the new version has been deployed:
    87  
    88     ```shell
    89     pachctl version
    90     COMPONENT           VERSION
    91     pachctl             1.9.2
    92     pachd               1.9.2
    93     ```
    94  
    95     The `pachd` and `pachctl` versions must both match the new version.
    96  
    97  ## Troubleshooting Minor Upgrades
    98  
    99  <!-- We might want to move this section to Troubleshooting -->
   100  
   101  This section describes issues that you might run into when
   102  upgrading Pachyderm and provides guidelines on how to resolve
   103  them.
   104  
   105  ### StatefulSets vs static persistent volumes
   106  
   107  [StatefulSets](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/) are a mechanism provided in Kubernetes 1.9 and newer to manage the deployment and scaling of applications. 
   108  It can use Persistent Volume Provisioning or pre-provisioned PV’s,
   109  both of which are dynamically allocated from Pachyderm's point of view.
   110  Thus, the `--dynamic-etcd-nodes` flag to `pachctl deploy` is used to deploy Pachyderm using StatefulSets.
   111  
   112  It is recommended that you deploy Pachyderm using StatefulSets when possible. 
   113  All of the instructions for cloud provider deployments do this by default.
   114  We also provide [instructions for on-premises deployments using StatefulSets](../../deploy/on_premises/#statefulsets).
   115  
   116  If you have deployed Pachyderm using StatefulSets, 
   117  you can still use the *same* deploy command to re-deploy Pachyderm. 
   118  Kubernetes is smart enough to see the previously utilized volumes and re-use them.
   119  
   120  ### `etcd` re-deploy problems
   121  
   122  Depending on the cloud you are deploying to and the previous deployment configuration, 
   123  we have seen certain cases in which volumes don't get attached to the right nodes on re-deploy (especially when using AWS). 
   124  In these scenarios, you may see the `etcd` pod stuck in a `Pending`, `CrashLoopBackoff`, or other failed state. 
   125  Most often, deleting the corresponding `etcd` pod(s) or nodes to redeploy them 
   126  or re-deploying all of Pachyderm again will fix the issue. 
   127  
   128  ### `AlreadyExists` errors on re-deploy
   129  
   130  Occasionally, you might see errors similar to the following:
   131  
   132  ```
   133  Error from server (AlreadyExists): error when creating "STDIN": secrets "pachyderm-storage-secret" already exists
   134  ```
   135  
   136  This might happen when re-deploying the enterprise dashboard, for example. These warning are benign.
   137  
   138  ### `pachctl` connnection problems
   139  
   140  When you upgrade Pachyderm versions, you may lose your local `port-forward` to connect `pachctl` to your cluster. 
   141  If you are not using `port-forward` and you are instead setting pachd address config value to connect `pachctl` to your cluster, 
   142  the IP address for Pachyderm may have changed. 
   143  
   144  To fix problems with connections to `pachd` after upgrading, you can perform the appropriate remedy for your situation:
   145  
   146  - Re-run `pachctl port-forward &`, or
   147  - Set the pachd address config value to the updated value, e.g.: ```pachctl config update context `pachctl config get active-context` --pachd-address=<cluster ip>:30650```
   148  
   149  
   150  
   151  
   152  
   153  
   154  
   155  
   156