Skip to content

Rapid fire version of the Terraforming Kubernetes course and blog post.

Notifications You must be signed in to change notification settings

codingforentrepreneurs/terraforming-kubernetes-rapid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rapid-fire Terraforming Kubernetes

This repository is a rapid-fire version of our in-depth tutorial for Terraforming Kubernetes on Linode with this post.

To get started:

Requirements

1. Clone this repo

git clone https://github.com/codingforentrepreneurs/terraforming-kubernetes-rapid
cd terraforming-kubernetes-rapid

Create an account on Linode and get an API Key in your linode account here.

Once you have a key, do the following:

echo "linode_api_token=\"YOUR_API_KEY\"" >> terraform.tfvars

2. Initialize Terraform

terraform init

3. Terraform your Kubernetes Cluster

terraform apply

Use terraform apply -auto-approve if you're really in a hurry.

4. Set your KUBECONFIG Environment Variable

export KUBECONFIG="./.kube/kubeconfig.yaml"

If you are using VSCode, the KUBECONFIG variable is set in tf-k8s.code-workspace settings.

Verify your KUBECONFIG is set correctly:

kubectl get nodes

5. Deploy your first app

kubectl apply -f k8s.yaml

6. Get your app's IP address

kubectl get service cfe-nginx-service -o "jsonpath={.status.loadBalancer.ingress[0].ip}"

Or

export IP_ADDRESS=$(kubectl get service cfe-nginx-service -o "jsonpath={.status.loadBalancer.ingress[0].ip}")
open http://$IP_ADDRESS

7. Celebrate

P.S. Destroy everything with terraform apply -destroy -auto-approve to avoid incurring any charges.

About

Rapid fire version of the Terraforming Kubernetes course and blog post.

Topics

Resources

Stars

Watchers

Forks

Languages