If you are working with multiple cluster hosting clients, you may need to switch cluster context for your deployment. See the below commands:
kubectl config get-contexts
kubectl config use-context <context-name>
For the Kubernetes deployment to work as expected, we need to ensure we have minikube
installed on our local machine running the deployment. Follow these steps to install minikube
Once installed, we can start the minikube service be executing the below command:
minikube start --cpus 4 --memory 8192 --disk-size 8g
This also updates the VM settings to make use of 4 CPU's and 8GB of RAM, instead of the default 2 CPU's and 4GB of RAM. Also the disk space is reduced from the default 20GB to 8GB to save space.
Useful links:
Some prerequisites are required before we can continue to deploy our Kubernetes infrastructure to an AWS cluster.
- You have created all the various users and permissions as required.
- You have given the users the relevant access to the AWS services
- You have generated an access token for your AWS user
- You have installed all the relevant CLI tools
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
aws configure
curl --silent --location "https://github.com/weaveworks/eksctl/releases/download/latest_release/eksctl_$(uname -s)_amd64.tar.gz" | tar xz -C /tmp
sudo mv /tmp/eksctl /usr/local/bin
eksctl version
curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt` /bin/linux/amd64/kubectl
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
kubectl version --client
Before we can deploy our Kubernetes infrastructure we need to make sure we have created a cluster for us to deploy to. Execute the below command to create the cluster within AWS EKS
yarn eks:cluster:create
Once this completes you may execute a Kubernetes deployment, kubectl should already be configured to point to the newly created cluster. E.g.
yarn docker:instant init -t k8s
-
See the available clusters
eksctl get clusters
-
Create config file locally to reference existing cluster
eksctl utils write-kubeconfig --cluster <cluster-name>
-
Check current cluster context
kubectl config get-contexts
yarn eks:cluster:destroy
Useful Links:
Useful Links:
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
az login
Useful Links:
curl -OL https://github.com/digitalocean/doctl/releases/download/v<version>/doctl-<version>-linux-amd64.tar.gz
sudo mv ./doctl /usr/local/bin