After installing CloudWatch Agent in the EKS cluster, its pods stuck in the "Pending" state Watching the describe pod Solution: The solution was found here. In this EKS cluster, a separate NodeGroup is allocated for the system pods with the instance type: t3.micro, and there is simply not enough capacity to launch the …
Continue reading "FIX ERROR – EKS: cloudwatch – 0/1 nodes are available: 1 Insufficient pods."
When trying to create a partition with the "fdisk" utility, 2 or more TB in size, the following message appears: The size of this disk is 2 TiB (2199023255552 bytes). DOS partition table format cannot be used on drives for volumes larger than 2199023255040 bytes for 512-byte sectors. Use GUID partition table format (GPT). …
Continue reading "FIX ERROR – fdisk: DOS partition table format cannot be used on drives for volumes larger than 2199023255040 bytes for 512-byte sectors"
For a parameterized assembly with an image tag selection, you will need the Active Choices plugin Go to "Manage Jenkins" Section "Manage Plugins" Go to the "Available" tab and select "Active Choices" in the search. Install it. Create a "New Item" – "Pipeline", indicate that it will be a parameterized assembly, and …
Continue reading "Jenkins – Active Choice: GitHub – Commit"
Key "–environment" AWS Cli utility replaces all the variables, those that you specify as an argument. To change the value of only one variable without erasing the others, or without listing them all, you can use the following BASH script: aws_lambda_update_env.sh: This script requires jq utility The script reads all current variables, changes …
Continue reading "AWS Cli – Lambda: Update single variable value"
After we installed Docker on the Jenkins server and started it, when we try to build, we get the following error: Solution: Add the user "jenkins" to the "docker" group: After that, the user "jenkins" will be able to work with Docker if he connects via SSH, but with Jenkins job there will …
Continue reading "FIX ERROR – Jenkins: dial unix /var/run/docker.sock: connect: permission denied"
An example of how you can create entities in Kubernetes using AWS Lambda. The function will be in Python3, so we will use Kubernetes Python Client More usage examples can be found here. Since AWS Lambda does not support this package, we will pack the "kubernetes" and "boto3" modules in our function. "boto3" is needed …
Continue reading "AWS – Lambda: kubectl"
When trying to execute the Lambda Python function, the following error occurs: { "errorMessage": "main() takes 0 positional arguments but 2 were given", "errorType": "TypeError", "stackTrace": [ " File \"/var/runtime/bootstrap.py\", line 131, in handle_event_request\n response = request_handler(event, lambda_context)\n" ] } Solution: From the message, we see that we use the "main" function as a …
Continue reading "FIX ERROR – AWS Lambda Python: "main() takes 0 positional arguments but 2 were given""
Python3 sample script to get metrics from AWS CloudWatch. In the example, we get the maximum value in the last minute and display only the value, this is necessary if you want to collect metrics for example in Zabbix. Script:
Where, "XXXXXXXXXXX" – AWS Account ID, "us-east-1" – AWS Region
For a parameterized assembly with an image tag selection, you will need the Active Choices plugin Go to "Manage Jenkins" Section "Manage Plugins" Go to the "Available" tab and select "Active Choices" in the search. Install it. Create a "New Item" – "Pipeline", indicate that it will be a parameterized assembly, and …
Continue reading "Jenkins – Active Choice: Harbor – Images tag"