mojozoox

Finding the right mojo for everything.

Kubernetes Resource Requests and Limits

When scheduler tries to schedule a pod, k8s checks for pod's resource requirements and places on node which has sufficient resources By default container requests for 0.5 CPU and 256 Mi of RAM for getting scheduled, this can be modified by adding resources section under spec of pod yaml definition ... spec ... resources: requests: memory: "1Gi" cpu: 1 1 CPU = 1000m = 1 vCPU = 1 AWS vCPU = 1 GCP core = 1 Azure core = 1 Hyperthread. m is millicore It can as low as 0.1 which...
Read post

Terraform Template to Create SQS Private Endpoint

data "aws_vpc_endpoint_service" "sqs" { service = "sqs" filter { name = "service-type" values = ["Interface"] } } data "aws_vpc" "selected" { id = "vpc-change-me" } resource "aws_security_group" "sqs_ep" { name = "sqs-ep" vpc_id = "vpc-change-me" revoke_rules_on_delete = true egress { from_port = 0 to_port = 0 protocol = "-1" cidr_blocks = ["0.0.0.0/0"] } # I use the https://github.com/cloudposse/t...
Read post

Quarantine A EKS Node with Docker Containers

While performing these step please practice caution, and have the right dashboards that will point to any issues. Step 0. Annotate the node, ip-10-102-11-188.ec2.internal, in question, to not participate in the auto-scaling. $ kubectl annotate node ip-10-102-11-188.ec2.internal cluster-autoscaler.kubernetes.io/scale-down-disabled=true Step 1. Cordon the affected the node. kubectl cordon ip-10-102-11-188.ec2.internal Step 2. Get the list of app pods running on that instance $ kubectl get pods ...
Read post