Feedback

Chat Icon

Helm in Practice

Designing, Deploying, and Operating Kubernetes Applications at Scale

Understanding Helm Chart Installation and Management
38%

Using a Chart with Custom Configurations

If you want to customize the installation of a chart by changing specific configuration values, you can use the --set flag followed by the key-value pairs you want to modify. The general syntax is:

helm install [RELEASE_NAME] [CHART] --set key1=value1,key2=value2

As an example, let's upgrade the previous WordPress installation to use a LoadBalancer service with custom ports:

  • The port 8000 as the service port for HTTP traffic (instead of the default 80, already used by the Ingress controller)
  • The port 8443 as the service port for HTTPS traffic (instead of the default 443, already used by the Ingress controller)
  • The node port 30008 as the port to open on each node for HTTP traffic
  • The node port 30009 as the port to open on each node for HTTPS traffic
# Complete reset - this will delete everything and start fresh
helm uninstall my-wordpress --ignore-not-found
kubectl delete pvc --all --ignore-not-found
sleep 10

# Install with custom configurations
helm upgrade -i \
  my-wordpress \
  bitnami/wordpress \
  --set service.type=LoadBalancer \
  --set service.ports.http=8000 \
  --set service.ports.https=8443 \
  --set service.nodePorts.http=30008 \
  --set service.nodePorts.https=30009

# Test the installation
EXTERNAL_IP=$(\
  kubectl get svc \
  --namespace default \
  my-wordpress \
  -o jsonpath='{.status.loadBalancer.ingress[0].ip}'\
)

# Verify pods
kubectl get pods

# Verify services
kubectl get svc

# Access WordPress
echo "WordPress URL: http://$EXTERNAL_IP:8000/"
echo "WordPress URL (HTTPS): https://$EXTERNAL_IP:8443/"

service.type

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