How to Dockerize a Flask App
If you have a Flask app that you would like packaged in a Docker container, then you can do the following. The steps outlined below will help you …
Read Article →In-depth guides, insights, and best practices for modern software engineering
If you have a Flask app that you would like packaged in a Docker container, then you can do the following. The steps outlined below will help you …
Read Article →You can use the aws cli to get the EKS cluster name, parse the first result and return it into a variable.
This is handy in automation scripts where …
Read Article →If you want to automatically generate a manifest file in Kubernetes, you can do so by using the kubectl run command coupled with a --dry-run to output …
If you need to sort a list of your pods by their CreationTimestamp, then do the following:
kubectl get pods -n kube-system …
Read Article →
If you want to jump onto a particular Kubernetes Pod and run Bash within it, you can do so as follows:
kubectl exec -ti <pod_name> /bin/bash
You …
Read Article →If you would like to run shell commands inside of your Kubernetes cluster, then you can use the kubectl run command.
If you find yourself in a position where you need to sync all emails from one account to another, then you can use the imapsync command-line tool to …
You can download and install the AWS CLI v2 on Linux as follows. This works on most x86_64 Linux distributions including Ubuntu, Amazon Linux, and …
Read Article →If you need to reboot, or restart the networking interface on your Mac, by using the CLI, then you can issue the following commands:
If you get the following error:
fatal: unable to access <git>: SSL certificate problem: self signed certificate in certificate chain
..when …
Read Article →Ever needed to extract the files in a Docker container?
Docker provides the save sub-command.
The examples …
Read Article →If you’ve run into this dreaded error:
Error response from daemon: No such image:
Then you can solve it as follows:
Perform a docker pull …
When you launch an EC2 instance, you can use the user-data to bootstrap a instance creation script.
We can use the following code to start a web …
Read Article →Ever searched for kubectl update config from aws eks and needed a quick result?
Make sure that you have valid AWS …
Read Article →Java provides many ways to generate random strings.
public void generatingRandomAlphanumericString_ApacheCommons() { …
Read Article →
Python gives the ability to generate random strings out of the box, by using a combination of the string and random modules.
import string
import …
Read Article →
If you need to generate a random number or string in Terraform, then you can use the following:
This is useful when you need unique names for …
Read Article →If you have received the following error while trying to issue commands to kubectl:
Unable to connect to the server: dial tcp: lookup
Then it may be …
Read Article →Storing Terraform states files locally is not recommended. Instead you should use a backend such as as S3 from AWS.
To do this, you just need to add …
Read Article →If you have come across the following error:
ZipArchive extension: <strong>disabled/not installed</strong>
This just means that …
Read Article →We have been searching for all the neighboring points in a Cartesian coordinate system. As we know each point in a coordinate system has …
Read Article →The prime number sequence starts with: 2,3,5,7,11,13,17,19.... Notice that 2 is in position one.
3 occupies position two, which is a …
When you first try and push to a git repository, you may get the following error message:
error: src refspec master does not match any.
error: failed …
Read Article →
In this challenge, you will be given a number n (n > 0) and your task will be to return the smallest square number N (N > 0) such …