Написать в техподдержку Позвонить нам
Admin Panel Logout

In this article:

    Cluster version upgrade

    Before updating

    It is recommended to save important data and applications, make a backup, and also perform an update operation on the cluster copies to prevent possible problems and data loss.

    Important

    You can only upgrade a cluster to a newer version. Reverse operation or downgrade is not possible.

    Upgrading a cluster from version v1.15 to version v1.16 and higher is possible only through the operation of creating a new cluster. To perform this operation, it is recommended to use Velero's cluster backup software and then restore to a newer version.

    Update in MCS Panel

    Cluster version updates are made in the "Containers" section of the MCS Panel. To do this, select the appropriate "Update version" option in the context menu of the required cluster:

    In the pop-up window, you need to select the desired new version and confirm the change of version with the button "Change version".

    After performing the update operation, the cluster will be rebooted and ready to work.

    Updating via the console

    Step 1. Update application version

    List deployments with the command:

     kubectl get deployments

    List running pods:

     kubectl get pods

    View the current version of the application image:

     kubectl describe pods

    To update an application image (for example) to version 2, use the set image command followed by the deployment name and the new version of the image:

     kubectl set image deployments / kubernetes-bootcamp kubernetes-bootcamp = jocatalin / kubernetes-bootcamp: v2

    The team notified the deployment to use a different image for the application and initiated a continuous update.

    Next, you need to run the command again:

     kubectl get pods

    Step 2. Confirm update

    First of all, you should make sure that the application is running. To find out the public IP address and port, you can use the description service:

     kubectl describe services / kubernetes-bootcamp

    Create an environment variable named NODE_PORT with the node port value assigned:

     export NODE_PORT = $ (kubectl get services / kubernetes-bootcamp -o go-template = '{{(index .spec.ports 0) .nodePort}}')
    echo NODE_PORT = $ NODE_PORT

    Get public IP address and port:

     curl $ <cluster_ip_address>: $ NODE_PORT

    Referring to different pods with each request, we see that all pods are working with the latest version (v2).

    The update can also be confirmed by running the deployment status command:

     kubectl rollout status deployments / kubernetes-bootcamp

    Check the current version of the application with the pod description command:

     kubectl describe pods


    Was this article helpful?