bitnamicharts/apache

Verified Publisher

By VMware

Updated 11 months ago

Bitnami Helm chart for Apache

Helm
Image
Web servers
0

500K+

bitnamicharts/apache repository overview

Bitnami Secure Images Helm chart for Apache

Apache HTTP Server is an open-source HTTP server. The goal of this project is to provide a secure, efficient and extensible server that provides HTTP services in sync with the current HTTP standards.

Overview of Apache

Trademarks: This software listing is packaged by Bitnami. The respective trademarks mentioned in the offering are owned by the respective companies, and use of them does not imply any affiliation or endorsement.

TL;DR

helm install my-release oci://REGISTRY_NAME/REPOSITORY_NAME/apache

Note: You need to substitute the placeholders REGISTRY_NAME and REPOSITORY_NAME with a reference to your Helm chart registry and repository.

Introduction

Bitnami charts for Helm are carefully engineered, actively maintained and are the quickest and easiest way to deploy containers on a Kubernetes cluster that are ready to handle production workloads.

This chart bootstraps a Apache deployment on a Kubernetes cluster using the Helm package manager.

The Apache HTTP Server ("httpd") was launched in 1995 and it has been the most popular web server on the Internet since April 1996. It has celebrated its 20th birthday as a project in February 2015.

Before you begin

  • Kubernetes 1.23+
  • Helm 3.8.0+

Installing the Chart

To install the chart with the release name my-release:

helm install my-release oci://REGISTRY_NAME/REPOSITORY_NAME/apache

Note: You need to substitute the placeholders REGISTRY_NAME and REPOSITORY_NAME with a reference to your Helm chart registry and repository. For example, in the case of Bitnami, you need to use REGISTRY_NAME=registry-1.docker.io and REPOSITORY_NAME=bitnamicharts.

These commands deploy Apache on the Kubernetes cluster in the default configuration.

Tip: List all releases using helm list

Configuration and installation details

This section describes credentials, configuration, and other installation options.

Resource requests and limits

Bitnami charts allow setting resource requests and limits for all containers inside the chart deployment. These are inside the resources value (check parameter table). Setting requests is essential for production workloads and these should be adapted to your specific use case.

To make this process easier, the chart contains the resourcesPreset values, which automatically sets the resources section according to different presets. Check these presets in the bitnami/common chart. However, in production workloads using resourcesPreset is discouraged as it may not fully adapt to your specific needs. Find more information on container resource management in the official Kubernetes documentation.

Rolling VS Immutable tags

It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image.

Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist.

Backup and restore

To back up and restore Helm chart deployments on Kubernetes, you need to back up the persistent volumes from the source deployment and attach them to a new deployment using Velero, a Kubernetes backup/restore tool. Find the instructions for using Velero in this guide.

Deploying a custom web application

The Apache chart allows you to deploy a custom web application using one of the following methods:

  • Cloning from a git repository: Set cloneHtdocsFromGit.enabled to true and set the repository and branch using the cloneHtdocsFromGit.repository and cloneHtdocsFromGit.branch parameters. A sidecar will also pull the latest changes in an interval set by cloneHtdocsFromGit.interval.
  • Providing a ConfigMap: Set the htdocsConfigMap value to mount a ConfigMap in the Apache htdocs folder.
  • Using an existing PVC: Set the htdocsPVC value to mount an PersistentVolumeClaim with the web application content.

Here is an example of deploying a web application from a Git repository using the first method:

cloneHtdocsFromGit.enabled=true
cloneHtdocsFromGit.repository=https://github.com/mdn/beginner-html-site-styled.git
cloneHtdocsFromGit.branch=master

To use a custom httpd.conf file, mount it using the httpdConfConfigMap parameter, which references a Kubernetes ConfigMap with the contents of the httpd.conf file. Alternatively, copy the httpd.conf file to files/httpd.conf in the current working directory to mount it in the container.

To mount different virtual host configurations, use the vhostsConfigMap value. This is a pointer to a Kubernetes ConfigMap with the desired Apache virtual host configurations. You can also copy the virtual host configurations under the files/vhosts/ directory in your current working directory to mount them as a ConfigMap in the container.

Gateway API

This chart provides support for exposing Apache using the Gateway API and its HTTPRoute resource. If you have a Gateway controller installed on your cluster, such as APISIX, Contour, Envoy Gateway, NGINX Gateway Fabric or Kong Ingress Controller you can utilize the Gateway controller to serve your application. To enable Gateway API integration, set httpRoute.enabled to true. The Gateway to be used can be customized by setting the httpRoute.parentRefs parameter. By default, it will reference a Gateway named gateway in the same namespace as the release.

You can specify the list of hostnames to be mapped to the deployment using the httpRoute.hostnames parameter. Additionally, you can customize the rules used to route the traffic to the service by modifying the httpRoute.matches and httpRoute.filters parameters or adding new rules using the httpRoute.extraRules parameter.

Setting Pod's affinity

This chart allows you to set your custom affinity using the affinity parameter. Find more information about Pod affinity in the Kubernetes documentation.

As an alternative, you can use the preset configurations for pod affinity, pod anti-affinity, and node affinity available in the bitnami/common chart. To do so, set the podAffinityPreset, podAntiAffinityPreset, or nodeAffinityPreset parameters.

Prometheus metrics

This chart can be integrated with Prometheus by setting metrics.enabled to true. This will deploy a sidecar container with apache-exporter in all pods and a metrics service, which can be configured under the metrics.service section. This metrics service will have the necessary annotations to be automatically scraped by Prometheus.

Prometheus requirements

It is necessary to have a working installation of Prometheus or Prometheus Operator for the integration to work. Install the Bitnami Prometheus helm chart or the Bitnami Kube Prometheus helm chart to easily have a working Prometheus in your cluster.

Integration with Prometheus Operator

The chart can deploy ServiceMonitor objects for integration with Prometheus Operator installations. To do so, set the value metrics.serviceMonitor.enabled=true. Ensure that the Prometheus Operator CustomResourceDefinitions are installed in the cluster or it will fail with the following error:

no matches for kind "ServiceMonitor" in version "monitoring.coreos.com/v1"

Install the Bitnami Kube Prometheus helm chart for having the necessary CRDs and the Prometheus Operator.

FIPS parameters

The FIPS parameters only have effect if you are using images from the Bitnami Secure Images catalog.

For more information on this new support, please refer to the FIPS Compliance section.

Parameters

The following subsections list global, common, and component-specific parameters.

Global parameters
NameDescriptionValue
global.imageRegistryGlobal Docker image registry""
global.imagePullSecretsGlobal Docker registry secret names as an array[]
global.defaultStorageClassGlobal default StorageClass for Persistent Volume(s)""
global.storageClassDEPRECATED: use global.defaultStorageClass instead""
global.defaultFipsDefault value for the FIPS configuration (allowed values: '', restricted, relaxed, off). Can be overridden by the 'fips' objectrestricted
global.compatibility.openshift.adaptSecurityContextAdapt the securityContext sections of the deployment to make them compatible with Openshift restricted-v2 SCC: remove runAsUser, runAsGroup and fsGroup and let the platform use their allowed default IDs. Possible values: auto (apply if the detected running cluster is Openshift), force (perform the adaptation always), disabled (do not perform adaptation)auto
global.security.allowInsecureImagesBy default, this chart verifies that the original container images that were designed, tested, and validated are used. This option makes the chart skip the verification step and proceedfalse
Common parameters
NameDescriptionValue
kubeVersionOverride Kubernetes version""
nameOverrideString to partially override common.names.fullname""
fullnameOverrideString to fully override common.names.fullname""
commonLabelsLabels to add to all deployed objects{}
commonAnnotationsAnnotations to add to all deployed objects{}
extraDeployArray of extra objects to deploy with the release[]
Apache parameters
NameDescriptionValue
image.registryApache image registryREGISTRY_NAME
image.repositoryApache image repositoryREPOSITORY_NAME/apache
image.digestApache image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag""
image.pullPolicyApache image pull policyIfNotPresent
image.pullSecretsApache image pull secrets[]
image.debugEnable image debug modefalse
git.registryGit image registryREGISTRY_NAME
git.repositoryGit image nameREPOSITORY_NAME/git
git.digestGit image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag""
git.pullPolicyGit image pull policyIfNotPresent
git.pullSecretsSpecify docker-registry secret names as an array[]
replicaCountNumber of replicas of the Apache deployment1
revisionHistoryLimitThe number of old history to retain to allow rollback10
podAffinityPresetPod affinity preset. Ignored if affinity is set. Allowed values: soft or hard""
podAntiAffinityPresetPod anti-affinity preset. Ignored if affinity is set. Allowed values: soft or hardsoft
nodeAffinityPreset.typeNode affinity preset type. Ignored if affinity is set. Allowed values: soft or hard""
nodeAffinityPreset.keyNode label key to match. Ignored if affinity is set""
nodeAffinityPreset.valuesNode label values to match. Ignored if affinity is set[]
affinityAffinity for pod assignment{}
nodeSelectorNode labels for pod assignment{}
tolerationsTolerations for pod assignment[]
topologySpreadConstraintsTopology Spread Constraints for pod assignment spread across your cluster among failure-domains. Evaluated as a template[]
extraPodSpecOptionally specify extra PodSpec{}
cloneHtdocsFromGit.enabledGet the server static content from a git repositoryfalse
cloneHtdocsFromGit.repositoryRepository to clone static content from""
cloneHtdocsFromGit.branchBranch inside the git repository""
cloneHtdocsFromGit.enableAutoRefreshEnables an automatic git pull with a sidecar containertrue
cloneHtdocsFromGit.intervalInterval for sidecar container pull from the repository60
cloneHtdocsFromGit.resourcesPresetSet container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if cloneHtdocsFromGit.resources is set (cloneHtdocsFromGit.resources is recommended for production).nano

Note: the README for this chart is longer than the DockerHub length limit of 25000, so it has been trimmed. The full README can be found at https://techdocs.broadcom.com/us/en/vmware-tanzu/bitnami-secure-images/bitnami-secure-images/services/bsi-app-doc/apps-charts-apache-index.html

Tag summary

Content type

Image

Digest

sha256:e0e0b2834

Size

7.8 kB

Last updated

11 months ago

docker pull bitnamicharts/apache:sha256-fa6dbac6ea30fe7adb9bee2407593090863ae711feb9dec13cd6275642aaa94a

This week's pulls

Pulls:

4,331

Last week

Bitnami