*Step by step approach to create kubernetes clusters in Digital Ocean *
Step 1 : Using Digital Ocean Cloud
Use the Referral code to register in Digital Ocean - https://m.do.co/c/d71c3ad04039 and you will get 200 dollar credits for creating clusters and practice, this credits are valid for 2 months and it will be sufficient to learn kubernetes with practice.
If you have credits you can use the choice of your cloud provider.
Step 2 : Login to Digital Ocean and Go to projects in the left top corner and then click on New Project
- Enter the mandatory fields and then click on create project
Step 3 : Creating Cluster
Step 3.1 :
- Choose the Region - Selected London for demo
Step 3.2 : Left the default values for VPC and version
Step 3.3 : Select the scaling type as Fixed Size
Step 3.4 : Enter new node details
- Node pool name : srini-node-1-k8s
- Node plan : $12/month
- Machine Type :Basic nodes (its cheaper one, select other based on your needs)
- Nodes : 1 ( By default it comes with 3 , change to 1 for practice, if you want can have more nodes)
Step 3.5: Finalize and create the cluster
- Name of the cluster
- Project
- Tags
It will take couple of minutes to create cluster
Step 4 : Configuration of Kubernetes cluster in Windows System
Step 4.1 : Download config file
Step 4.2 : Copy the config file in the same folder where kubectl.exe exists
- kubectl --kubeconfig "srini-k8s-kubeconfig.yaml" get nodes
- srini-k8s-kubeconfig.yaml -> Is the config file name downloaded from digital ocean cluster
- Every time we need to mention the config file to get nodes
- To avoid this ,we need to copy the config file under the .kube folder and more details mentioned in step 4.3
Step 4.3: Go to C:\Users\ Select the user based on your login
Check if any folder with .kube folder exists , if not create one
Step 4.4 : Copy the config file downloaded to the folder .kube
Step 4.5:** Change the file name to config and remove the yaml extension type and finally it should be file type.
step 4.6: With out mentioning config file and will get the list of nodes using the below command.
kubectl get nodes
Wrapup
Step by step approach of creation of kubernetes cluster using Digital Ocean and please let me know the comments for this article.
LinkedIn : https://www.linkedin.com/in/srinivasuluparanduru/
Top comments (0)