yaml

yaml
# ClusterIP Service (internal only)
apiVersion: v1
kind: Service
metadata:
  name: web-app
  namespace: production

Kubernetes Services and Ingress for traffic routing

kubernetes k8s services
by Ryan Nakamura 2 tabs
yaml
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: api-ingress
  namespace: production
spec:

Kubernetes NetworkPolicy for namespace level traffic control

kubernetes networkpolicy cluster-security
by Kai Nakamura 1 tab
yaml
production:
  primary:
    adapter: postgresql
    url: <%= ENV['DATABASE_URL'] %>
    pool: <%= ENV.fetch("RAILS_MAX_THREADS", 5) %>
  primary_replica:

Database read replicas for scaling reads

rails postgresql scaling
by Alex Kumar 3 tabs
java
package com.example.demo.feature;

import org.togglz.core.Feature;
import org.togglz.core.annotation.EnabledByDefault;
import org.togglz.core.annotation.Label;
import org.togglz.core.context.FeatureContext;

Feature flags for gradual rollouts

java feature-flags togglz
by David Kumar 4 tabs
yaml
amazon:
  service: S3
  access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %>
  secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %>
  region: us-east-1
  bucket: <%= Rails.application.credentials.dig(:aws, :bucket) %>

ActiveStorage for file uploads

rails activestorage file-uploads
by Alex Kumar 3 tabs
yaml
# Service Account for the application
apiVersion: v1
kind: ServiceAccount
metadata:
  name: web-app-sa
  namespace: production

Kubernetes RBAC and service account security

kubernetes k8s rbac
by Ryan Nakamura 1 tab
dockerfile
# Build stage
FROM maven:3.9-eclipse-temurin-21 AS build
WORKDIR /app

# Copy dependency definitions
COPY pom.xml .

Docker containerization for Spring Boot

java docker spring-boot
by David Kumar 3 tabs
yaml
production:
  primary:
    adapter: postgresql
    database: app_production
    username: app
    password: <%= ENV["PRIMARY_DB_PASSWORD"] %>

Read Replica Routing for GET-Heavy Endpoints

rails activerecord postgres
by codesnips 4 tabs
yaml
name: CI

on:
  push:
  pull_request:

GitHub Actions: cache + tests + build

ci github-actions node
by Mateo Rodriguez 1 tab
bash
#!/bin/bash
# Helm commands

# Add repositories
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update

Kubernetes Helm charts for package management

kubernetes helm charts
by Ryan Nakamura 4 tabs
java
package com.example.demo.service;

import io.micrometer.core.instrument.Counter;
import io.micrometer.core.instrument.MeterRegistry;
import io.micrometer.core.instrument.Timer;
import org.springframework.stereotype.Service;

Actuator for production monitoring

java spring-boot actuator
by David Kumar 4 tabs
bash
#!/bin/bash
# Docker Compose commands

# Start all services
docker compose up -d

Docker Compose for multi-container applications

docker docker-compose devops
by Ryan Nakamura 2 tabs