Yandex Cloud
Search
Discuss with expertTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
    • Cloud Interconnect
    • Cloud Backup
    • Cloud Registry
    • Yandex AI Studio
    • Compute Cloud
    • Object Storage
    • Managed Service for Kubernetes®
    • Yandex BareMetal
    • Smart Web Security
    • Security Deck
    • Managed Service for PostgreSQL
    • Managed Service for ClickHouse®
    • Monium
    • Cloud CDN
    • Network Load Balancer
    • Virtual Private Cloud
    • Cloud DNS
    • Application Load Balancer
    • Yandex Cloud Video
    • Stackland
    • Yandex Cloud Router
    • Yandex Managed Service for Trino
    • Managed Service for MySQL®
    • Managed Service for Valkey™
    • Managed Service for Apache Spark™
    • Yandex StoreDoc
    • Managed Service for OpenSearch
    • Managed Service for Apache Kafka®
    • Data Transfer
    • Yandex MPP Analytics Engine for PostgreSQL
    • Yandex Managed Service for Apache Airflow®
    • Data Processing
    • Yandex MetaData Hub
    • Managed Service for YDB
    • Managed Service for Sharded PostgreSQL
    • Managed Service for YTsaurus
    • Yandex WebSQL
    • DataLens
    • Yandex Search API
    • SpeechSense
    • SpeechKit
    • DataSphere
    • Vision OCR
    • Translate
    • Yandex Identity Hub
    • Key Management Service
    • Certificate Manager
    • Yandex Lockbox
    • Audit Trails
    • SmartCaptcha
    • Cloud Desktop
    • Yandex SIEM
    • SourceCraft Code Assistant
    • Container Registry
    • Managed Service for GitLab
    • Managed Service for Prometheus®
    • Cloud Functions
    • API Gateway
    • Yandex Cloud Postbox
    • Message Queue
    • Serverless Integrations
    • IoT Core
    • Data Streams
    • Serverless Containers
    • Cloud Notification Service
    • Yandex Query
    • Identity and Access Management
    • Yandex Cloud Console
    • Resource Manager
    • Yandex Cloud Billing
    • Yandex Cloud Quota Manager
    • Cloud Apps
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Yandex Managed Service for Apache Spark™
  • Getting started
    • All guides
      • Information about existing clusters
      • Creating a cluster
      • Connecting to a cluster
      • Updating a cluster
      • Apache Spark™ version upgrade
      • Maintenance
      • Stopping and restarting a cluster
      • Managing cluster access
      • Deleting a cluster
  • Access management
  • Pricing policy
  • Yandex Monitoring metrics
  • Audit Trails events
  • Terraform reference
  • Release notes

In this article:

  • Get a list of available versions
  • Before a version upgrade
  • Upgrading the version
  • Cluster uses manually added packages
  • Cluster uses an environment
  1. Step-by-step guides
  2. Clusters
  3. Apache Spark™ version upgrade

Apache Spark™ version update

Written by
Yandex Cloud
Updated at September 9, 2026
View in Markdown
  • Get a list of available versions
  • Before a version upgrade
  • Upgrading the version
    • Cluster uses manually added packages
    • Cluster uses an environment

You can change the Apache Spark™ version to any of the versions supported by Managed Service for Apache Spark™.

Updates and fixes within a version are installed automatically during maintenance.

Get a list of available versionsGet a list of available versions

Note

If you use environments to manage versions, the version is indicated in the base environment name.

Management console
  1. In the management console, select the folder.
  2. Navigate to Managed Service for Apache Spark™.
  3. Select a cluster and click Edit on the top panel. This will open the cluster editing page.

You can see the list of available versions in the Version field.

Before a version upgradeBefore a version upgrade

Make sure the upgrade will not disrupt your applications:

  1. Check the Apache Spark™ release notes to learn how upgrades may affect your applications.
  2. Try upgrading the Apache Spark™ version on a test cluster.

Upgrading the versionUpgrading the version

Apache Spark™ version upgrade method depends on how dependencies are configured in your cluster:

  • If the Packages manually value is selected in the Software configuration method field, change the version in the cluster settings.

    Warning

    This method is deprecated and will soon become unavailable. We recommend using environments to work with different Apache Spark™ versions.

  • If the Environment value is selected in the Software configuration method field, select the base environment (Apache Spark™ and Python version) or connect a custom environment with your required version to the cluster. The Apache Spark™ version is fixed within the environment and cannot be set separately in the cluster settings.

Cluster uses manually added packagesCluster uses manually added packages

Management console
CLI
Terraform
gRPC API
  1. In the management console, select the folder.
  2. Navigate to Managed Service for Apache Spark™.
  3. Select a cluster and click Edit on the top panel.
  4. Under Advanced settings, go to the Software configuration method → Packages manually and select an Apache Spark™ version.
  5. Click Save changes.

If you do not have the Yandex Cloud CLI yet, install and initialize it.

The folder used by default is the one specified when creating the CLI profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also specify a different folder for any command using --folder-name or --folder-id.

If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.

To change the Apache Spark™ version:

  1. View the description of the CLI command for updating a cluster:

    yc managed-spark cluster update --help
    
  2. Change the version by running this command:

    yc managed-spark cluster update <cluster_name_or_ID> \
      --spark-version <Apache_Spark_version>
    

    You can get the cluster name and ID with the list of clusters in the folder.

  1. Open the current Apache Spark™ configuration file with the infrastructure plan.

    Learn how to create this file in Creating a cluster.

  2. Edit the spark_version parameter in the cluster's description:

    resource "yandex_spark_cluster" "<cluster_name>" {
      ...
      config = {
        ...
        spark_version = "<Apache_Spark_version>"
        ...
      }
      ...
    }
    
  3. Make sure the settings are correct.

    1. In the command line, navigate to the directory that contains the current Terraform configuration files defining the infrastructure.

    2. Run this command:

      terraform validate
      

      Terraform will show any errors found in your configuration files.

  4. Confirm updating the resources.

    1. Run this command to view the planned changes:

      terraform plan
      

      If you described the configuration correctly, the terminal will display a list of the resources to update and their parameters. This is a verification step that does not apply changes to your resources.

    2. If everything looks correct, apply the changes:

      1. Run this command:

        terraform apply
        
      2. Confirm updating the resources.

      3. Wait for the operation to complete.

  1. Get an IAM token for API authentication and put it into an environment variable:

    export IAM_TOKEN="<IAM_token>"
    
  2. Clone the cloudapi repository:

    cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapi
    

    Below, we assume that the repository contents reside in the ~/cloudapi/ directory.

  3. Create a file named body.json and paste the following code into it:

    {
      "cluster_id": "<cluster_ID>",
      "update_mask": {
        "paths": [
          "config_spec.spark_version"
        ]
      },
      "config_spec": {
        "spark_version": "<Apache_Spark_version>"
      }
    }
    

    Where:

    • cluster_id: Cluster ID.

      You can get the cluster ID with the list of clusters in the folder.

    • update_mask: List of parameters to update as an array of strings (paths[]).

      Format for listing settings
      "update_mask": {
        "paths": [
          "<setting_1>",
          "<setting_2>",
          ...
          "<setting_N>"
        ]
      }
      

      Warning

      When you update a cluster, all parameters of the object you are modifying will be reset to their defaults unless explicitly provided in the request. To avoid this, list the settings you want to change in the update_mask parameter.

    • spark_version: Apache Spark™ version.

  4. Call the ClusterService.Update method, e.g., via the following gRPCurl request:

    grpcurl \
      -format json \
      -import-path ~/cloudapi/ \
      -import-path ~/cloudapi/third_party/googleapis/ \
      -proto ~/cloudapi/yandex/cloud/spark/v1/cluster_service.proto \
      -rpc-header "Authorization: Bearer $IAM_TOKEN" \
      -d @ \
      spark.api.cloud.yandex.net:443 \
      yandex.cloud.spark.v1.ClusterService.Update \
      < body.json
    
  5. Check the server response to make sure your request was successful.

Cluster uses an environmentCluster uses an environment

Your cluster can use either the base or a custom environment.

The base environment contains only the Apache Spark™ version and Python version. You can select it when creating or updating your cluster.

A custom environment contains the base environment and a list of required pip and deb packages enabling you to install additional libraries and applications in the cluster. You need to specify the list of packages manually. You cannot modify the list of packages and Apache Spark™ version in an existing custom environment. To update the Apache Spark™ version, set up a custom environment with the version you need and connect it to the cluster.

Management console
gRPC API
  1. Set up an environment with the Apache Spark™ you need using one of these methods:

    • Create a new environment.
    • Create a new environment based on an existing one.
  2. In the management console, select the folder containing the cluster.

  3. Navigate to Managed Service for Apache Spark™.

  4. Select the cluster and click Edit on the top panel.

  5. Under Advanced settings, in the Software configuration method → Environment field, select the environment you set up.

  6. Click Save changes.

  1. Set up an environment with the Apache Spark™ version you need.

  2. Get an IAM token for API authentication and put it into an environment variable:

    export IAM_TOKEN="<IAM_token>"
    
  3. Clone the cloudapi repository:

    cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapi
    

    Below, we assume that the repository contents reside in the ~/cloudapi/ directory.

  4. Create a file named body.json and paste the following code into it:

    {
      "cluster_id": "<cluster_ID>",
      "update_mask": {
        "paths": [
          "config_spec.environment_id"
        ]
      },
      "config_spec": {
        "environment_id": "<environment_ID>"
      }
    }
    

    Where:

    • cluster_id: Cluster ID. You can get it with the list of clusters in the folder.
    • environment_id: ID of the environment with the Apache Spark™ version you need. Call the EnvironmentService/List method to get the custom environment ID or EnvironmentService/ListBase to get the base environment ID.
  5. Call the ClusterService/Update method, e.g., via the following gRPCurl request:

    grpcurl \
      -format json \
      -import-path ~/cloudapi/ \
      -import-path ~/cloudapi/third_party/googleapis/ \
      -proto ~/cloudapi/yandex/cloud/spark/v1/cluster_service.proto \
      -rpc-header "Authorization: Bearer $IAM_TOKEN" \
      -d @ \
      spark.api.cloud.yandex.net:443 \
      yandex.cloud.spark.v1.ClusterService.Update \
      < body.json
    
  6. Check the server response to make sure your request was successful.

Was the article helpful?

Previous
Updating a cluster
Next
Maintenance
© 2026 Direct Cursus Technology L.L.C.