


The blue arrow indicates the docker socket being mounted on the job pods from the host Kubernetes node machine run aws-cli commands to interact with AWS.execute Kubernetes operations via kubectl.pull and push images to the private Docker registry,.The green arrows indicate that the pods will be able to The diagram below shows how the infrastructure will look like Building a job node image with kubectl, aws cli and docker capabilities.Configuring Jenkins to dynamically spin pods for jobs.


This guide will cover the following pieces:
#DOCKER AND KUBERNETES ON AWS MANUAL#
That said, I did not automate quite everything (not yet), specifically the Jenkins Kubernetes plugin configuration and some other things, so some manual operations are still required
#DOCKER AND KUBERNETES ON AWS HOW TO#
I will not cover how to install a Kubernetes cluster, I installed mine using kops, using this guide: Īlso I automated this installation with Ansible, but I will not put Ansible code here, although I will put all the necessary commands needed to automate this process in any way you wish You also need to have some knowledge about Linux, AWS, Docker, Kubernetes and Jenkins to be able to successfully go through all of this Before we start Route53 domain name (get one, there are some very cheap options).There are other guides out there which I heavily relied on but this one will cover more things in conjunctionĪs a small disclaimer, parts of this setup are quite hacky and not done properly, I will point them out throughout Prerequisites Build and push Docker containers from Jenkins job pods to the Docker registry.Ability to dynamically create job nodes as Kubernetes pods.Both Jenkins and the Docker registry bound to subdomains with TLS.AWS Batch lets you run highly-scalable batch processing workloads using Docker containers.This is a guide on how to build a CI system managed by Kubernetes deployed on AWS capable of building/pulling/pushing Docker containers to a private Docker registry with both Jenkins and the Docker registry exposed over the internet, bound to a domain protected with TLS Amazon Elastic Container Registry (ECR) is a highly available and secure private container repository that makes it easy to store and manage your Docker container images, encrypting and compressing images at rest so they are fast to pull and secure. AWS Fargate is a technology for Amazon ECS that lets you run containers in production without deploying or managing infrastructure. Amazon Elastic Container Service for Kubernetes (EKS) makes it easy for you to run Kubernetes on AWS. AWS Fargate is technology for Amazon ECS that lets you run containers without provisioning or managing servers. There are a number of ways to run containers on AWS, including Amazon Elastic Container Service (ECS) is a highly scalable, high performance container management service. Customers can easily deploy their containerized applications from their local Docker environment straight to Amazon ECS. AWS provides support for both Docker open-source and commercial solutions.
