Accessing your Drupal site

How you access your Drupal site depends on how it is exposed by the operator.

ClusterIP (default)

List services in your namespace:

kubectl get svc -n drupal-demo

Look for a service named:

  • <name>-np (for example example-drupal-np)

The PORT(S) column will show something like 80/TCP, where 80 is the port.

LoadBalancer

If spec.drupal_loadbalancer: true, the operator also creates a LoadBalancer service for the site.

Relevant fields:

  • drupal_loadbalancer: true to enable the LoadBalancer
  • drupal_loadbalancer_port: external service port (default 80)
  • drupal_loadbalancer_target_port: pod target port (default 80)

On a cloud provider or environment that supports LoadBalancers:

kubectl get svc -n drupal-demo

You will see an external IP in the EXTERNAL-IP column for the <name>-loadbalancer service (if configured this way in your templates). Use that IP and port to access the Drupal site.

Debugging access issues

If you cannot reach the site:

  1. Confirm pods are running:
kubectl get pods -n drupal-demo
  1. Inspect the service:
kubectl describe svc example-drupal-nodeport -n drupal-demo
  1. Check the Drupal deployment and logs:
kubectl describe deploy example-drupal-drupal -n drupal-demo
kubectl logs deploy/example-drupal-drupal -n drupal-demo

These commands often reveal misconfigurations such as wrong ports, pending pods due to PVC or image issues, or failing readiness probes.