When we develop applications, we keep our passwords and other sensitive data such as usernames, keys etc secured. Security is one of the main factors we need to consider when developing enterprise applications. Most of the time developers encode and save them. In the last article, we discussed how to move variables into a ConfigMap and store them. But the issue is these values are stored there in a plain text mode. This is definitely not the best method to store a password.
So, there come Kubernetes secrets. Secrets are used to store sensitive data. …
In the last article, we discuss how to use environmental variables in Kubernetes definition files. Now, we will see how to use a separate configuration file to manage environmental data.
ConfigMaps are used to store these environmental configuration data in Kubernetes. It is a file in the form of
key value pair. After configuring the
configMap, you need to inject it into the pod definition in Kubernetes. So, the configuration data in the
configMap file will be available as environmental variables in the application hosted inside the container in the pod.
Below is a code snippet copied from the previous…
When running applications in your own data centers you need to have proper disaster recovery techniques. Having a duplicate second datacenter is one method for disaster recovery. But when working enterprise-level, maintaining a second datacenter cost a lot.
AWS provides a cost-effective solution for this issue. AWS has large datacenter groups named “Region”. An AWS region is build to be closest to the business traffic demand. Each region is connected with high-speed fiber networks controlled by AWS.
Every region is isolated from each other. In other terms, no data can go in or out from the datacenter unless granting permission for data to be moved. …
Let’s start with an example. You have a system with two services as
worker sends messages to the
master. The system works fine. Suddenly the
master becomes unavailable to receive the messages from the
worker. So, when the
worker sends messages it waits for the
master to show up, but as it is not available the
worker start dropping the messages.
This happens because the
worker have a tightly coupled architecture. A tightly coupled architecture means whenever one of the services fails, the entire system breaks down.
First, you go to the link https://aws.amazon.com/console/ and create an AWS account. If you already have an account you can log in to the console.
In this tutorial, I will be covering;
Using on-premises servers, storage, machines including installing, maintaining, recovery managing. It costs too much. But when using a cloud service, the cloud service providers provide all the services need to deploy the applications. You can choose cloud services as per your need and pay only for what you use.
AWS is one of the biggest cloud service providers. It maintains internet-connected hardware, so you can provision and use what you want.
There are different methods of deployment methods.
Every year there were two sessions in DevFest as, workshop day and the session day. Usually, the workshop day consists of a few workshops including Google Cloud, Machine Learning and many other interesting topics. So, the participants could attend to what they really interest to.
But this year breaking the tradition, the event was hosted virtually for the very first time. DevFest Sri Lanka 2020 began on 16th October following a keynote and sessions on GCP, Knative, ML and more topics. At the end of the sessions, the ultimate #CloudKasthiram was announced.
Link for DevFest Sri Lanka 2020: GDG DevFest…
In a Kubernetes pod definition, use
env property to set the environmental variable.
env property is an array. So, when you define the variable, use
— to separate variables.
env property is a child property of the
container property. That means the environment variables are defined under
containers property. Each variable has a name and a value which are respectively going under
value properties as mentioned in the above syntax.
Now let’s see how the final pod definition looks like.
- name: ubuntu-container
- name: JAVA_HOME
Before starting I would like to recommend you to have a look at Docker in a nutshell if you are new to Docker. If not, you can continue this article.
In the previous Docker article (Docker in a nutshell), I showed you how to use commands and arguments in Docker commands. Now let’s check how to put commands and arguments into a
Look at this docker command.
docker run ubuntu sleep 5
Let’s see how to put the
sleep 5 command and argument to the pod definition file.