Yearly Archives: 2020

Kubernetes: manually restart a Cron Job

27 July 2020
 

 We have a Kubernetes Cron Job which failed on its last run. Let’s look for the root cause and then will see how to restart such a failed job. List current jobs: [simterm] $ kk -n eks-prod-1-bttrm-apps-ns get cronjobs NAME SCHEDULE SUSPEND ACTIVE LAST SCHEDULE AGE bttrm-apps-backend-reccuring-payment-cron 0 10 * * * False 1 22m… Read More »

Prometheus: yet-another-cloudwatch-exporter – collecting AWS CloudWatch metrics

23 July 2020
 

 Currently, to collect metrics from the AWS CloudWatch we are using AWS’s own cloudwatch-exporter, see the Prometheus: CloudWatch exporter — сбор метрик из AWS и графики в Grafana post (in Rus), but it has a few gaps: it’s written in Java, so uses CPU/memory of the monitoring host doesn’t scrapes AWS tags from resources uses… Read More »

Linux: configuring KDE Connect and connection to an Android phone

24 June 2020
 

 A really nice Android phone and a Linux OS integration. Besides the KDE Connect, you can use gnome-shell-extension-gsconnect if you’d prefer the Gnome project. In this post, we will set up KDE COnnect between an Android HTC phone and Arch Linux. On Android install the KDE Connect from the Play Market. On Linux, install from… Read More »

Kubernetes: ClusterIP vs NodePort vs LoadBalancer, Services, and Ingress – an overview with examples

24 June 2020
 

 For network communications, Kubernetes presents four Service types – ClusterIP (the default one), NodePort, LoadBalancer, and ExternalName, plus the Ingress resources. In this post, we will take a short overview of all of them, and will check how they are working. The documentation is available here – Publishing Services (ServiceTypes). I’m using AWS Elastic Kubernetes… Read More »

Kubernetes: 503 no endpoints available for service – causes and solutions

15 June 2020
 

 We have a Redis service running behind a Service with the ClusterIP type. This Redis must accessible by pods from the same namespace (a Gorush service). The problem is that those pod can’t connect to the Redis service using its gorush-server-redis-svc:6379 name and reporting “Can’t connect redis server: connection refused“: [simterm] $ kk -n gorush-test… Read More »

AWS: CloudFormation – using Conditions, Fn::Equals, and Fn::If – an example

17 May 2020
 

 I have a CloudFormation stack with VPC Peerings, in that case, it’s a peering between VPC of a new Elastic Kubernetes Service cluster and VPC of the Prometheus monitoring stack. The EKS cluster’s stack and its whole automation creation were described in the AWS Elastic Kubernetes Service: a cluster creation automation, part 1 – CloudFormation… Read More »

Docker: configure tzdata and timezone during build

17 May 2020
 

 During a Docker image build – it stops asking to configure the tzdata. Dockerfile at this moment is the next: FROM ubuntu:18.04 RUN apt update && apt install -y python-pip python-dev ssh python-boto3 RUN pip install ansible==2.4.3.0 Let’s reproduce – run the build: [simterm] admin@jenkins-production:~$ docker build -t proj/proj-ansible:1.1 . Sending build context to Docker… Read More »

Helm: helm-secrets – sensitive data encryption with AWS KMS and use it with Jenkins

16 May 2020
 

 So, as a follow-up to the Helm: Kubernetes package manager – an overview, getting started post – let’s discuss about sensitive data in our Helm charts. What I want is to store a chart files in a repository, but even if such a repo will be a private Github repo – I still don’t want… Read More »

AWS: CloudFormation – using lists in Parameters

8 May 2020
 

 In addition to the AWS Elastic Kubernetes Service: a cluster creation automation, part 1 – CloudFormation and AWS Elastic Kubernetes Service: a cluster creation automation, part 2 – Ansible, eksctl posts – now I’d like to pass a Parameter as a List with multiply values to a CloudForamtion stack. The idea is to get all… Read More »