Create EKS Clusters
Create Development (dev) EKS Cluster using EKS Blueprints
In order to create an EKS cluster, you just have to define a few parameters like Cluster name and select the components which you need to be enabled in the EKS cluster. You can also define the environment the EKS cluster will be part of (dev/qa/stg/prd)
- Download the sample payload file which defines the EKS Blueprint parameters in json format for creating the EKS Cluster. Click here to download the sample file or create a new json file with the same content. The sample looks like below screenshot.
-
Open your github dev repository URL and click on “creating a new file” and add the file updated with the required settings. In that settings, add environment as ‘dev’ and unique name, gitops_repo_url, ssh_key_secret_name values and save this file to the dev repository with dev-eks-blueprint.json name.
-
Execute the below command to start creating the cluster
# Execute the following commands
Run the following command to Login to the Omnideq portal
Syntax: chctl login --username <user_email_address> --secret <onmideq_login_password> --server <omnideq_portal_url>
Run the following command to create EKS cluster
Syntax: chctl eks create --awsVaultName <aws_vaultname_created_in_omnideq> --sshVaultName <ssh_vaultname_created_in_omnideq> --eksGitRepositoryUrl "<ssh_url_of_github_repository>” --blueprint <json_path_in_github>
Example: chctl eks create --awsVaultName aws-proserv --sshVaultName ssh-key-proserv --eksGitRepositoryUrl "git@github.com:Cloudhedge/eksblueprint-demo-dev.git" --blueprint dev-eks-blueprint.json
-
You will see the output as below. The initial status of the blueprint will be ‘isCreating’.
-
This is a long running operation and may take 15-30 minutes for the EKS cluster to get created. You can keep querying OmniDeq with the ‘chctl eks get’ command as below. Once the EKS Cluster is created, the status will change to ‘isDeployed’.
Create Staging/Production (stg/prd) EKS Cluster using EKS Blueprints
- Use the same example payload file as mentioned in above step.
- Click here to download the sample file
-
Open your github stage repository URL and click on “creating a new file” and add the file updated with the required settings. In that settings, add environment as ‘stg’ and unique name, gitops_repo_url, ssh_key_secret_name values and save this file to the dev repository with stg-eks-blueprint.json name.
-
Execute the below command to start creating the cluster
# Execute the following command
Run the following command to create EKS cluster
Syntax: chctl eks create --awsVaultName <aws_vaultname_created_in_omnideq> --sshVaultName <ssh_vaultname_created_in_omnideq> --eksGitRepositoryUrl <ssh_url_of_github_repository>” --blueprint <json_path_in_github>
Example: chctl eks create --awsVaultName aws-proserv --sshVaultName ssh-key-proserv --eksGitRepositoryUrl "git@github.com:Cloudhedge/eksblueprint-demo-stage.git" --blueprint stage-eks-blueprint.json
- The initial status of the blueprint will be ‘isCreating’.
- This is a long running operation and may take 15-30 minutes for the EKS cluster to get created. You can keep querying OmniDeq with the ‘chctl eks get’ command. Once the EKS Cluster is created, the status will change to ‘isDeployed’.
Accessing the EKS Clusters
- Download the kubeconfig file using aws cli using the following command
# Execute the following command
AWS_PROFILE=your-aws-account aws eks --region us-west-2 update-kubeconfig --name od-eks-dev-01
- ArgoCD server service is configured with ClusterIP and hence it is not directly accessible outside the cluster. In order to access ArgoCD, you need to port-forward and access it.
# Execute the following command
kubectl -n argocd port-forward svc/argo-cd-argocd-server 8443:443 (Ensure there is no space at the end of 443 while running the command)
NOTE : User need to download kubeconfig file and get ArgoCD password seperately for dev and stg cluster respectively.
Accessing ArgoCD
- Currently ArgoCD is configured with an auto generated admin password. In order to fetch the admin password, execute the following command
# Execute the following command
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d
- ArgoCD server service is configured with ClusterIP and hence it is not directly accessible outside the cluster. In order to access ArgoCD, you need to port-forward and access it
# Execute the following command
kubectl -n argocd port-forward svc/argo-cd-argocd-server 8443:443 (Ensure there is no space at the end of 443 while running the command)
Launch your web browser and access ArgoCD using the URL https://localhost:8443
You will see that there are no applications which ArgoCD is managing currently