Logo Ari Yonaty
  • Home
  • About
  • Skills
  • Projects
  • Posts
  • Dark Theme
    Light Theme Dark Theme System Theme
Logo Inverted Logo
  • Posts
  • Filtering Noise
  • Anti-Flow
  • Continuous AppSec
  • Deploying Hugo
  • HE.net IPv6 Certification
  • Kubernetes Resume Challenge
    • K8s Resume Challenge: Introduction
    • K8s Resume Challenge: Containerization
    • K8s Resume Challenge: Deploying to Kubernetes
    • K8s Resume Challenge: Administration
  • Secure CD Pipeline
  • Essential Jenkins
  • How To's
    • How To: Deploy an Internal Container Registry in Kubernetes
    • How To: Python3 HTTP Server
Hero Image
K8s Resume Challenge: Introduction

Why? In an effort to keep my Kubernetes skills sharp, I decided to tackle the Kubernetes Resume Challenge. However, rather than follow the instructions to a T, I’ve decided to add some twists of my own that’ll spice things up. Hence, the reason for the blog series. Hope you enjoy the ride. Setup Like mentioned above, I plan on deviating slightly from the guide. To begin, I will not be using a cloud provider for creating the Kubernetes cluster. While using a CSP like AWS or Azure come with its own benefits, for the sake of this project, I wanted to explore Talos Linux a bit and this seemed like the perfect opportunity. Yes, Talos does support deployment to cloud providers, however for the sake of learning (and cost), began with a new VM running a Talos Linux cluster.

Wednesday, July 31, 2024 Read
Hero Image
K8s Resume Challenge: Containerization

Kubernetes is container orchestration system. With that said, it is only appropriate that our workloads be containerized. Our “product” consists of a kodecloud ecommerce site backed by a MariaDB database. To reach our goal of having it all managed via Kubernetes, a first step involves containerizing the website and database. First, let us focus on the web app. FROM php:7.4-apache RUN docker-php-ext-install mysqli COPY --chown=www-data:www-data --chmod=755 . /var/www/html/ EXPOSE 80 Short and sweet. (And can be better. But for now, it’ll do.)

Friday, August 2, 2024 Read
Hero Image
K8s Resume Challenge: Deploying to Kubernetes

Deploying the E-commerce website For the initial MVP of deploying our application to Kubernetes, the following manifests were used. Starting with the website Deployment spec, we set the environment variables accordingly. apiVersion: apps/v1 kind: Deployment metadata: name: ecom-web spec: replicas: 2 selector: matchLabels: app: ecom-web template: metadata: labels: app: ecom-web spec: containers: - name: ecom-web image: ariyonaty/ecom-web:v1 ports: - containerPort: 80 env: - name: DB_HOST value: ecom-db - name: DB_USER value: ecomuser - name: DB_PASSWORD value: ecompassword - name: DB_NAME value: ecomdb Additionally, we define a Service to expose the application.

Friday, August 2, 2024 Read
Hero Image
K8s Resume Challenge: Administration

In this post, we’ll tackle a collection of tasks that mirror a workflow in a professional environment – both on the dev side, as well as the ops side. Agenda: Add dark mode Publish new version docker image Scale application Liveness/Readiness Probes ConfigMaps / Secrets Dark Mode Per the instructions, the dark mode toggle is to be determined based on value of environment variable FEATURE_DARK_MODE. As the focus of my learning is not web development (nor my area of expertise, if any :p), this feature was rudimentary implemented by creating a separate CSS stylesheet that includes the addition of a dark background color. Then, inline PHP was used to select which stylesheet to load. The below diff demonstrates this.

Sunday, August 4, 2024 Read
Navigation
  • About
  • Skills
  • Projects
Contact me:
  • ari.h.yonaty@gmail.com
  • Ari Yonaty