What’s New?
Cost Optimization Opportunities
Cloud infrastructure can be expensive. Any opportunity to save money is always a win especially in an “eventful” year like this one so far. We are always looking for new approaches to cutting cloud infrastructure costs and passing along those savings to your team. Here are a couple of recent projects that are worth being aware of.
ECR Lifecycle Policies
The default behavior of the ECR container registry (and many other container registries) is to keep every image built, forever. Though storing individual images on ECR itself is relatively cheap, costs can add up over time. Months (or years) of application builds can quickly add up to hundreds of dollars a month in ECR storage costs. We can help you set up ECR Lifecycle Policies that automatically expire old images while safely keeping those currently deployed on your cluster. Adding lifecycle policies to your ECR repos can help you bring ECR costs down to a negligible amount on your bill.
AWS CloudWatch
AWS CloudWatch is Amazon’s proprietary monitoring solution on AWS. It can collect logs, record metrics from instances, and even send you alerts. Unfortunately, AWS CloudWatch is also both mandatory and quite expensive: AWS managed services like RDS and Elasticache only report their logs and metrics to CloudWatch, and CloudWatch charges for both data storage and actually accessing the data. In order to monitor, visualize, and send alerts for these types of AWS managed services, Prometheus needs to regularly fetch metrics and other information from CloudWatch. The latest versions of our monitoring module include a number of optimizations to fetch this monitoring data more cheaply than before without sacrificing metric resolution or accuracy of alerts.
Docker Layer Caching for CircleCI
Docker Layer Caching (DLC) is a time saving feature that caches Docker image layers on CircleCI instead of needing to rebuild or pull images that have already been built as part of a previous job. We already recommend using DLC on CircleCI to save time on every Docker build. But did you know DLC can save you money too? CircleCI charges by the minute for every job run at a default rate of 10 credits per minute, and DLC costs a flat 200 credits per job run. With this in mind, enabling DLC is always recommended if doing so saves you 20 minutes or more for a given CircleCI job.
Viewing RDS Logs in Kibana
An important part of debugging database issues is seeing what goes on in the database logs. In particular, slow query logging on MySQL and Postgres can often highlight queries that might be interfering with normal DB operation. General database logs are an excellent indicator of database configuration issues or serious errors that require your attention to resolve. Until now, these logs have only been available in the logs section of the RDS web dashboard (unless you wanted to manually go hunting for the log stream in CloudWatch). These logs weren’t searchable, and viewing more than a page of logs at a time was a chore. So, due to these issues, we’ve set up a pipeline to export your RDS logs from CloudWatch and let you view them in a new dashboard in Kibana. This makes it much easier to filter and search your RDS logs, as well as identify any anomalies at a glance.
Kubernetes 1.17 Is Now Available On EKS
Kubernetes 1.17 is now available on AWS EKS. Kubernetes 1.17 is a relatively straightforward release, with the main feature that “cloud provider labels” are supported. This will tag all Kubernetes resources with key metadata such as what region it’s running in, host instance type, etc. This release includes a number of other bug fixes and new features - you can read more about this in the EKS release notes and Kubernetes changelogs:
Importantly, EKS 1.14 will reach its end-of-life in November. If you have any clusters still running EKS 1.14, you need to upgrade or AWS will begin the upgrade process for you.
Contact us if you would like help with the upgrade to 1.17.
Useful Reading
Terraform 0.13 is now available (contact us if you need help)
AWS announces ACK: this is a new tool that will let you create AWS resources like S3 buckets and RDS database instances as Kubernetes CRDs.
Announcing hierarchical namespaces for Kubernetes - this will make it possible to create namespaces that are children of other namespaces (this is a great feature to allow multiple teams share the same cluster).
Visual Studio Code has an extension for Kubernetes. This makes it possible to easily explore a Kubernetes cluster by clicking through the side pane of VSCode. This extension makes it dangerously easy to edit your Kubernetes configuration, and provides inline documentation for all of Kubernetes’ many YAML options.
Fun Stuff
Order pizza using Terraform. Danger: will actually charge your credit card and order pizza.
Play a game in Vim (don’t let the sheep get you!)
Rainbow dragons in your terminal: echo rawr | cowsay -f dragon | lolcat
A regular space invaders game with a twist: every time you shoot an alien, it deletes a pod on your Kubernetes cluster!