How To Create A Kubernetes (K8s) CPU or GPU Cluster On DigitalOcean
In this video, you will learn how to make a Kubernetes (K8) Cluster using DigitalOceans managed Kubernetes service known as DigitalOcean Kubernetes or DOKS for short. I will then show you how to generate a personal access token with no expiration date with full read and write access to your K8 using DigitalOceans API service. To access the K8 cluster I will show you how to install doctl on a DigitalOcean cloud server known as a Droplet, you can also optionally install the kubernetes official client called kubectl instead of doctl. The droplet will act as a controller to connect, authenticate using the API token to grant doctl access to your DigitalOcean K8s cluster, and finally to verify connectivity to your cluster. K8s is an open-source and extensible platform for managing containerized applications in a cluster. It automates the deployment, scaling, and management of these containerized services and workloads ensuring no downtime in a production environment, If one container goes down, another container in that K8 cluster will start preventing downtime of the app(s)
🔵 Free $200 DigitalOcean cloud credits using my referral link: https://digitalocean.pxf.io/c/1245219/1377287/15890
How To Get $200 In Free DigitalOcean Cloud Credits • How To Get $200 In Free DigitalOcean Cloud...
How To Install WordPress App On An Existing Kubernetes (K8s) Cluster On DigitalOcean & Add A Domain • How To Install WordPress App On An Existin...
Create A New Personal Access Token https://cloud.digitalocean.com/account/api/tokens
Download PuTTY And PuTTYgen https://www.putty.org/
How To Install PuTTY on Windows 11 And Windows 10 • How To Install PuTTY On Windows 10 Or Wind...
Install doctl Locally For Windows, Mac, Ubuntu Linux (GitHub CLI Installer) https://github.com/digitalocean/doctl/releases
Install doctl Locally on Mac And Ubuntu Linux (Snap Package) https://docs.digitalocean.com/reference/doctl/how-to/install/
Kubernetes official client (kubectl) https://kubernetes.io/docs/tasks/tools/
Steps To Make A CPU or GPU K8s Cluster Using DOKS:
1. Navigate to https://digitalocean.pxf.io/c/1245219/1377287/15890 and create a free DigitalOcean account. This is my referral link and will grant you $200 in free cloud credit for 60 days as a new user
2. Once you have created your DigitalOcean account, you will be taken to your DigitalOcean dashboard. Click Create.
3. Click Kubernetes
4. Configure your K8s cluster by picking the DOKS version, datacenter region, Size pod and service networks, and cluster capacity.
5. Set node pool to autoscale and choose the number of minimum nodes and maximum nodes
6. Give node pool a name and click Create Cluster
7. Navigate to the DigitalOceans API page https://cloud.digitalocean.com/account/api/tokens and create a personal access token that no expiration and full read and write access
8. Copy and save your secret personal access token. It should look similar to the example below:
dop_v1_1d44bca133627fev3cbf805a10152c3f2ffe7c06695p6f08e3df6ee4ae867048
Note: Keep in mind this access token will not be shown again for your security.
9. You will now need a controller to install doctl and manage your K8s cluster if you want to keep everything managed in the cloud (this is optional but demonstrated in this video). To do this create a cloud server by clicking on the green Create button and selecting the Droplet service. Configure as necessary, and click Create Droplet. If you want to manage your K8s cluster locally you can install the doctl client for your operating system or kubetl. See above links for installing doctl for your appropriate OS.
10. If you created a droplet controller, log in to your droplet using an SSH client such as PuTTY
11.Now run the following commands in the correct order below:
snap install doctl
mkdir /root/.config
doctl auth init
Paste in your access token into the terminal, e.g. dop_v1_1d44bca133627fev3cbf805a10152c3f2ffe7c06695p6f08e3df6ee4ae867048
mkdir /root/.kube
snap connect doctl:kube-config
To authenticate and automatically renew cluster certificate:
doctl kubernetes cluster kubeconfig save [Cluster ID]
e.g. doctl kubernetes cluster kubeconfig save 34cc660c-487f-4f9c-p623-03c674d4c16u
Verify cluster connectivity using Doctl commands:
doctl kubernetes
doctl kubernetes cluster kubeconfig show [Cluster ID]
doctl kubernetes cluster kubeconfig show 34cc660c-487f-4f9c-p623-03c674d4c16u
doctl kubernetes cluster
doctl kubernetes cluster list
Timestamps:
0:00 - Intro & Context
0:41 - Create K8s Cluster (DOKS cluster)
5:56 - Generate Personal Access Token With DigitalOcean API service
7:42 - Create A Controller or Install either Doctl or Kubectl locally
9:18 - Connect, authenticate using token & verify your K8s cluster
16:47 - Closing & Outro
DigitalOcean Kubernetes (DOKS), K8s Cluster, doctl & kubectl (Playlist) • DigitalOcean Kubernetes (DOKS), K8s Cluste...
More DigitalOcean Server Guides (Playlist) • DigitalOcean Cloud Computing Guides
#Kubernetes #K8s #Doctl