Multi-Node Kubernetes Cluster setup using Amazon Elastic Kubernetes Service(EKS)…….
Amazon Elastic Kubernetes Service (Amazon EKS) is a fully managed Kubernetes service. Customers such as Intel, Snap, Intuit, GoDaddy, and Autodesk trust EKS to run their most sensitive and mission critical applications because of its security, reliability, and scalability.
EKS is the best place to run Kubernetes for several reasons. First, you can choose to run your EKS clusters using AWS Fargate, which is serverless compute for containers. Fargate removes the need to provision and manage servers, lets you specify and pay for resources per application, and improves security through application isolation by design. Second, EKS is deeply integrated with services such as Amazon CloudWatch, Auto Scaling Groups, AWS Identity and Access Management (IAM), and Amazon Virtual Private Cloud (VPC), providing you a seamless experience to monitor, scale, and load-balance your applications. Third, EKS integrates with AWS App Mesh and provides a Kubernetes native experience to consume service mesh features and bring rich observability, traffic controls and security features to applications. Additionally, EKS provides a scalable and highly-available control plane that runs across multiple availability zones to eliminate a single point of failure.
EKS runs upstream Kubernetes and is certified Kubernetes conformant so you can leverage all benefits of open source tooling from the community. You can also easily migrate any standard Kubernetes application to EKS without needing to refactor your code.
— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — -
Going to launch WordPress site, a completely fault tolerance setup using EKS service of Amazon. WordPress (WP, WordPress.org) is a free and open-source content management system (CMS) written in PHP and paired with a MySQL or MariaDB database.
— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —
Diagrammatic View :::
Steps to follow : — — — — — — —
- Create cluster.yml file —
→ Created 3 node-groups. Inside each node-group provided the instance type and number of instance we need , also provided the public key name so that we can login to the nodes whenever required.
→ Run this command to create the cluster : eksctl create cluster -f cluster.yml
→ It may take around 10 — 20 min to launch the EKS cluster
→ To check whether it launched successfully or not . Check in to the ec2 service of aws and check whether the instances are running or not.
→ Our cluster is ready…
2. Update the kubeconfig file…provide the name of the cluster…so that admin can use the cluster..
→ aws eks — region ap-south-1 update-kubeconfig — name udit-cluster
3. As we know that Amazon Elastic File System (Amazon EFS) provides a simple, scalable, fully managed elastic NFS file system for use with AWS Cloud services and on-premises resources.
So , Create a NFS using EFS service of AWS. Launch the NFS in the same VPC where our instances are residing and provide the same security group that our instances has. Here we are using NFS so that all the pods can share the same centralized storage.
4. Create a namespace .
→ kubectl create ns uditns2
5. Create an EFS Provisioner using efs-provisioner.yml file in the namespace that we created in the previous step, provide the id and DNS inside the file and execute the file.
→ kubectl create -f efs_provisioner.yml -n uditns2
6. Secure the namespace uditns2 that we created.
→ kubectl create -f nfs_role.yaml -n uditns2
7. Create a storage class and PersistentVolumeClaim for MySQL and Wordpress .
→ kubectl create -f storage.yaml -n uditns2
→ To check the storage class.
kubectl get sc -n uditns2
8. To deploy the MySQL and WordPress.
→ Create mysql_deployment.yaml file.
→ Create WordPress_deployment.yaml file.
→ Create kustomization.yml file , inside the file we will be providing our id and password as well as names of mysql and wordPress yaml files to run mysql and word press from one file.
→ kubectl create -k . -n uditns2
9. To check status of the pods and to get the External-IP , which will be used by clients to access our Wordpress site.
→kubectl get all -n uditns2
10. Copy the External — IP and paste it in browser to access the Wordpress site.
Thank YOU….