This is the full configuration from https://www.terraform.io/docs/providers/aws/guides/eks-getting-started.html
See that guide for additional information.
NOTE: This full configuration utilizes the Terraform Http provider to call out to icanhazip.com to determine your local workstation external IP for easily configuring EC2 Security Group access to the Kubernetes master servers. Feel free to replace this as necessary.
This is the full repo link https://github.com/executeautomation/kubernetes
- Make sure that you have installed the kubectl locally
-
Install the AWS CLI on local machine e.g. pip install awscli
-
Configure the AWS CLI (while configuration using AWS us-east-1 region as it is low cost) e.g. aws configure (provide the access key and the ID)
-
Install aws-iam-authenticator mentioned as below e.g. https://docs.aws.amazon.com/eks/latest/userguide/install-aws-iam-authenticator.html
-
git clone https://github.com/omkarkhatavkar/selenium-terraform-aws-kubernetes.git
-
cd terraform_iac
-
terraform apply (this creates the aws eks cluster)
-
terraform output kubeconfig > ~/.kube/config
-
kubectl cluster-info (this should work)
-
cd ..
-
kubectl create -f selenium_deployment.yml
-
kubectl create -f service.yml
-
kubectl create -f selenium_node.yml
-
kubectl create -f cluster-autoscaler.yml
-
kubectl get pods (this should show you the list of the pods)
- update the selenium hub url in tests/test.py and then run python /tests/parallel.py