Convert a gcp-starter index to serverless
This page shows you how to convert a free starter index in the gcp-starter
environment to a serverless index.
Before you begin
Make sure your starter index is in the gcp-starter
environment.
1. Pause traffic to the index
Converting your index to serverless can take up to 30 minutes. During that time, writes to the gcp-starter
index will not be reflected in the new serverless index, so it’s recommended to pause client traffic to the gcp-starter
index before starting conversion.
2. Update SDKs
If you are using an older version of the Python, Node.js, Java, or Go SDK, you must update the SDK to work with serverless indexes.
-
Check your SDK version:
-
If your SDK version is less than 3.0.0 for Python, 2.0.0 for Node.js, 1.0.0 for Java, or 1.0.0 for Go, upgrade the SDK as follows:
If you’re using the .NET SDK, add a package reference to your project file:
C#dotnet add package Pinecone.Client
3. Adapt existing code
You must make some minor code changes to work with serverless indexes.
-
Change how you import the Pinecone library and authenticate and initialize the client:
-
Listing indexes now fetches a complete description of each index. If you were relying on the output of this operation, you’ll need to adapt your code.
The
list_indexes
operation now returns a response like the following: -
Describing an index now returns a description of an index in a different format. It also returns the index endpoint needed to run data plane operations against the index. If you were relying on the output of this operation, you’ll need to adapt your code.
-
Serverless indexes do not support the following features. If you were relying on these features for your legacy starter index, you’ll need to adapt your code.
-
Migrating pod-based indexes to serverless indexes
-
Migration is limited to pod-based indexes with less than 25 million records and 20,000 namespaces.
This is a limitation of the current migration tool, not Pinecone’s serverless architecture, which provides virtually limitless data scalability.
-
The pod-based indexes must be hosted on AWS or GCP. It is not currently possible to migrate pod-based indexes on Azure.
-
The migration process creates serverless indexes on AWS only, regardless of the cloud where the pod-based indexes are hosted. This means that pod-based indexes on GCP will be migrated to serverless indexes on AWS.
-
-
- Instead, you can delete records by ID prefix.
-
- Because high-cardinality metadata in serverless indexes does not cause high memory utilization, this operation is not relevant.
-
- Because serverless indexes scale automatically based on usage, this operation is not relevant
-
- This feature is available on AWS only.
-
Depending on your usage of the SDK, there may be other changes to make. For a comprehensive list, see the Python SDK v3 migration guide, Node.js SDK v2 migration guide, or Java SDK v1 migration guide.
4. Convert the index
In the Pinecone console, go to your starter index and click Convert to serverless.
The process takes less than 5 minutes and does not involve creating or deleting any indexes; instead, this process transforms your starter index into a serverless index and moves it to the us-east-1
region of the AWS cloud.
5. Reinitialize clients
Once your index has been converted to serverless, your index will have a new DNS endpoint.
-
If you are using Pinecone SDKs, reinitialize your clients so they pick up the new index endpoint.
-
If you are using the REST API directly, get the new index endpoint and use it in all data plane requests:
curlPINECONE_API_KEY="YOUR_API_KEY" INDEX_HOST="INDEX_HOST" curl -X POST "https://$INDEX_HOST/describe_index_stats" \ -H "Api-Key: $PINECONE_API_KEY" \ -H "X-Pinecone-API-Version: 2024-07"
See also
Was this page helpful?