Skip to content

What is k8s?

Kubernetes (also named k8s) is an orchestration technology that allow us to deploy and maintain containerized services on different environments. We have been implemented this technology using EKS on AWS ecosystem and configure our cluster using different plugins that allow us to integrate the pods with other AWS services in the same VPC.
K8s works using a lot of configuration objects that can be modified in two ways, imperative or declarative commands. We can tell k8s what to do (imperative mode) or what we want to obtain (declarative mode). If we want to deploy a new service, we commonly use declarative mode that describe what is the result of the operation but if we want to restart a service we use the imperative mode that tells k8s what to do.

EKS profiles

EKS can create cluster that allows to use pods into namespaces using fargate and/or EC2 instances. For each namespace, we create profiles to tell EKS which services will be use fargate or EC2. In other words, this configuration defines if a pod in a namespace is placed using fargate or EC2 instances. These configurations can be reviewed to our staging (staging and production) cluster on the next link:
Every time we create a namespace, we have to create a profile config that tells EKS which technology (fargate or EC2) have to use. Additionally we can specify some k8s labels, that helps EKS to find a profile for each pods on a namespace. If a pod does not match with a fargate profile, it can not be scheduled in a namespace.

Argocd and Gitops

We use Argocd to synchronize a gitops project with different namespaces (environments). It use the github api to load and review the updates and apply them to the k8s configuration at the same time the webhook notifies the change. Also, we configure the application to allow singup process using the rol and profiles used in github 1doc3 account. Only the users that have rol senior are allowed to performs changes on the cluster. Other users only can read the process information and configuration. The following link redirects to the interface:
Every time a gitflow branch (production or develop) are modified, AWS fires a pipeline that creates a container on ECS with the changes. Then the other process on the pipeline modifies the github project that tells argocd which version of the container will be used on each environment. There are two codebuild project associated with those pipelines projects: and .

Kustomize

The github project used in the continuous delivery by argocd has been created using kustomization files. This technology allow us to compile some kubernetes files on a single set of configurations.
During this process, kustomize allow us to create a base configuration of services and deployments that ar common in all environments. Using this base configuration kustomize allow us to create environment variables, personalize service account, containers versions and some target group bindings to expose the services throw application load balancers.
The continuous integration process modifies the container version on a specific environment depending of the source branch.

Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.