Authenticating with the DigitalOcean API
Introduction
This section will show you how to authenticate with the DigitalOcean API. To use the API, you’ll first generate a personal access token.
A personal access token allows you to use automation tools such as doctl to create and manage various DigitalOcean cloud resources, such as Kubernetes Clusters, Droplets, Container Registries, etc.
Prerequisites
To complete this section, you will need:
- A DigitalOcean account for accessing the
DigitalOcean
platform. - A DigitalOcean personal access token for using the
DigitalOcean
API. - Doctl utility already installed as explained in the Installing Required Tools -> Doctl section.
Authenticating with the DigitalOcean API
First you will need to initialze doctl
by running the following command:
After entering your token doctl
should be able to validate your token.
Test to ensure that your account is configured for doctl
to use:
You should see a line containing your account and the "current"
string next to it.
For more info on this topic please see this Kubernetes Starter Kit Authentication Section.
Next, you will learn how to create a DigitalOcean Container Registry to store all microservices Docker images used in this guide for demonstration.