Getting started with kOps on Scaleway
kOps is a tool that helps you set up and manage Kubernetes clusters for production use. It is like a version of kubectl specifically designed for managing clusters.
With kOps, you can easily create, upgrade, and maintain highly available clusters. The tool also takes care of setting up the required cloud infrastructure.
Before you start
To complete the following actions, you must have:
- A Scaleway account logged into the console (External link)
- Owner status or IAM permissions allowing you to perform actions in the intended Organization
- An SSH key
- Installed kOps (External link) version >= 1.26 on your local computer
- Installed
kubectl(External link) on your local computer - An Object Storage bucket and its credentials
Configuring environment variables
Before working on the tutorial, it is important to set the following environment variables (External link) on your local computer.
export SCW_ACCESS_KEY="my-access-key"
export SCW_SECRET_KEY="my-secret-key"
export SCW_DEFAULT_PROJECT_ID="my-project-id"
# Configure the bucket name to store kops state
export KOPS_STATE_STORE=scw://<bucket-name> # where <bucket-name> is the name of the bucket you set earlier
# Scaleway Object Storage is Amazon S3-compatible so we just override some configurations to talk to our bucket
export S3_REGION=fr-par # or another scaleway region providing Object Storage
export S3_ENDPOINT=s3.$S3_REGION.scw.cloud # define provider endpoint
export S3_ACCESS_KEY_ID="my-access-key" # where <my-access-key> is the API access key for your bucket
export S3_SECRET_ACCESS_KEY="my-secret-key" # where <my-secret-key> is the API secret key for your bucket
# this is required since Scaleway support is currently in alpha so it is feature gated
export KOPS_FEATURE_FLAGS="Scaleway"Creating a single master cluster using kOps
- Create a cluster in the
fr-par-1Availability Zone, by running the following command:Copykops create cluster --cloud=scaleway --name=mycluster.k8s.local --zones=fr-par-1 --yes
Editing a cluster using kOps
Update a cluster
- Run the following command to update your cluster using kOps:
Copy
kops update cluster mycluster.k8s.local --yes
Delete a cluster
- Run the following command to delete your cluster using kOps:
Copy
kops delete cluster mycluster.k8s.local --yes
Going further
Now that you have a working kops cluster, read through the recommendations for production setups guide (External link) to learn more about how to configure kOps for production workloads.
For more information about kOps, refer to the official kOps documentation (External link).
Visit our Help Center and find the answers to your most frequent questions.
Visit Help Center