K8s-with-Cloud9

Kubernetes Basics with AWS Cloud9

1. Create an AWS Cloud9 Environment

AWS Cloud9

2. Choose a right way to build Kubernetes environment

1. Attach role to Cloud9 instance

2. Change Cloud9 credentials settings

3. Choose a right way to build Kubernetes environment

1. Launch local Kubernetes with minikube

2. Launch Amazon EKS cluster with eksctl

3. Create Amazon EKS cluster with AWS CloudFormation

4. Configure Kubernetes

1. Install kubectl (Kubernetes command line utility)

  1. Refer to AWS Guide to install kubectl

    Set <kubectl version>, <release date> according to Kubernetes version

     KUBECTL_VERSION=<kubectl version>
     RELEASE_DATE=<release date>
     echo $KUBECTL_VERSION
     echo $RELEASE_DATE
    
     mspuser:~/environment $ KUBECTL_VERSION=1.22.6
     mspuser:~/environment $ RELEASE_DATE=2022-03-09
     mspuser:~/environment $ echo $KUBECTL_VERSION
     1.22.6
     mspuser:~/environment $ echo $RELEASE_DATE
     2022-03-09
     mspuser:~/environment $ 
    
  2. Download the Amazon EKS vended kubectl binary

     curl -o kubectl https://s3.us-west-2.amazonaws.com/amazon-eks/$KUBECTL_VERSION/$RELEASE_DATE/bin/linux/amd64/kubectl
    
  3. Apply execute permissions to the binary
     chmod +x ./kubectl
    
  4. Copy the binary to a folder in PATH
     mkdir -p $HOME/bin && cp ./kubectl $HOME/bin/kubectl && export PATH=$PATH:$HOME/bin
    
  5. Verify kubectl version
     kubectl version --short --client
    
     mspuser:~/environment $ kubectl version --short --client
     Client Version: v1.22.6-eks-7d68063
     mspuser:~/environment $