Posts

Showing posts with the label Public_Cloud

K8s Cluster Upgrade Control Plane

Image
  In this post, we will see how to upgrade K8s master and worker node. kubeadm   supports upgrading Kubernetes clusters.  We will be upgrading Kubernetes from version 1.28.1 to version 1.28.2.  You should always backup important data before upgrading, and test upgrades before deploying them to production. The upgrade process follows the general procedure of: Upgrading the Kubernetes control plane with kubeadm (Kubernetes components and add-ons excluding the CNI) Manually upgrading the CNI network plugin, if applicable Upgrading the Kubernetes packages ( kubelet ,  kubeadm ,  kubectl ) on the control plane and worker nodes Upgrading the kubelet config on worker nodes with kubeadm. Login to the control plane node. To begin the upgrade,  first kubeadm  needs to be updated to  1.28.2  : sudo apt-get update sudo apt-get install -y --allow-change-held-packages kubeadm=1...

AWS - Taking backup of an EC2 instance

Image
  In this post, we will see how to take a backup of a running EC2 instance as an AMI and how to clean up the AMI. I have an instance configured with root volume + data volume (1GB). Let's start taking backups by "Create Image". During AMI creation, EC2 creates snapshots for each volume. Now, we have AMI created. When I try to create an instance from the AMI, it automatically configures storage with 2 volumes and you cannot edit them. Now, Let's delete the AMI by "Deregister AMI".  NOTE: This will not impact running EC2s. But, no new EC2 can be created. 

AWS Code Pipeline - CI/CD Series Part 5

Image
 In this post, We will see how to add notifications to the pipeline. This would create an email alert on the selected event. This is nothing but adding SNS with AWS Code Pipeline. Click on the "PipeLine" and select "Notify". Give the notification name and select the type of notification you want. Select the events that need notifications. Select target as "SNS Topic" and topic name. Now, navigate to SNS topic and create a subscription.  Enter the mail ID and confirm the subscription. We are set with enabling notification. Let's go back to the pipeline and click on "Release Change" to rerun the pipeline. I got the notification on the pipeline is completed.

AWS Bastion Setup

Image
  A bastion host is a server whose purpose is to provide access to a private network from an external network, such as the Internet. This is going to be our setup. 1) Create a VPC. 2) Create 2 subnets. One as Public and another one as Private. 3) Public Subnet is attached to INTERNET GW -> To allow 2-way internet access from Public Subnet. 4) Public Subnet is attached to NAT GW -> To allow instances on a PRIVATE subnet to access the Internet on 1 way - OUTBOUND. Attached is the IGW to VPC. Create 2 route tables. The public route table is attached to the public subnet and with the route to Internet GW. Let's create another route table called private subnet. Not adding any route at the moment. It's associated with the Private Subnet. Creating 2 instances. One is each subnet.  Named the instance called "bastion" in the public subnet and "webserver" in the private subnet. Connecting to the bastion EC2 instance using public IP. Let's connect to the webs...