Feedback

Chat Icon

Helm in Practice

Designing, Deploying, and Operating Kubernetes Applications at Scale

A Practical Guide to Building Multi-Service Applications with Helm
73%

Deploying the Application

Create Custom Values

We already have a default values.yaml in the chart, but we may want to override some values at installation time. This is also an opportunity to test our final chart. Start by creating a folder for custom values:

mkdir -p $HOME/todowithdb-custom

Use the command below to create a custom values.yaml file:

cat << EOF > $HOME/todowithdb-custom/values.yaml
# =============================================================================
# Global variables for the chart and subcharts
# =============================================================================
global:
  postgresql:
    auth:
      database: "todo_db"
      username: "todo_user"
      existingSecret: "todowithdb-postgresql"
      secretKeys:
        # We will only set the user password key
        # This is the password used by the application
        userPasswordKey: "user-password"
  # We changed the original Bitnami image,
  # so we need to allow insecure images
  security:
    allowInsecureImages: true
# =============================================================================
# Custom values for Todo Application deployment
# =============================================================================

# Application image from Harbor
image:
  repository: "$MASTER_PUBLIC_IP:30003/todo-app/todowithdb-app"
  tag: "v1.0.0"
  pullPolicy: IfNotPresent

# Registry credentials for pulling from Harbor
imageCredentials:
  create: true
  registry: "$MASTER_PUBLIC_IP:30003"
  username: "admin"
  password: "Harbor12345"
  secretName: "harbor-registry-secret"

# Service configuration
service:
  type: ClusterIP
  port: 5000

# Application resources
resources:
  requests:
    cpu: 100m
    memory: 128Mi
  limits:
    cpu: 500m
    memory: 256Mi

# PostgreSQL subchart configuration
postgresql:
  enabled: true
  image:
    registry: docker.io
    repository: bitnamilegacy/postgresql
    tag: "17.6.0-debian-12-r4"
  primary:
    persistence:
      enabled: true

Helm in Practice

Designing, Deploying, and Operating Kubernetes Applications at Scale

Enroll now to unlock current content and receive all future updates for free. Your purchase supports the author and fuels the creation of more exciting content. Act fast, as the price will rise as the course nears completion!

Unlock now  $15.99$11.99

Hurry! This limited time offer ends in:

To redeem this offer, copy the coupon code below and apply it at checkout:

Learn More