tomcat

by joaquinito2051

Helm chartv10.5.6App 10.1.4

Apache Tomcat is an open-source web server designed to host and run Java-based web applications. It is a lightweight server with a good performance for applications running in production environments.

About this chart

Apache Tomcat packaged by Bitnami

Apache Tomcat is an open-source web server designed to host and run Java-based web applications. It is a lightweight server with a good performance for applications running in production environments.

Overview of Apache Tomcat

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 repo add my-repo https://charts.bitnami.com/bitnami
$ helm install my-release my-repo/tomcat

Introduction

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

Tomcat implements several Java EE specifications including Java Servlet, JavaServer Pages, Java EL, and WebSocket, and provides a "pure Java" HTTP web server environment for Java code to run in.

Bitnami charts can be used with Kubeapps for deployment and management of Helm Charts in clusters.

Prerequisites

  • Kubernetes 1.19+
  • Helm 3.2.0+
  • PV provisioner support in the underlying infrastructure
  • ReadWriteMany volumes for deployment scaling

Installing the Chart

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

$ helm repo add my-repo https://charts.bitnami.com/bitnami
$ helm install my-release my-repo/tomcat

These commands deploy Tomcat on the Kubernetes cluster in the default configuration. The Parameters section lists the parameters that can be configured during installation.

Tip: List all releases using helm list

Uninstalling the Chart

To uninstall/delete the my-release deployment:

$ helm delete my-release

The command removes all the Kubernetes components associated with the chart and deletes the release.

Parameters

Global parameters

NameDescriptionValue
global.imageRegistryGlobal Docker image registry""
global.imagePullSecretsGlobal Docker registry secret names as an array[]
global.storageClassGlobal StorageClass for Persistent Volume(s)""

Common parameters

NameDescriptionValue
kubeVersionForce target Kubernetes version (using Helm capabilities if not set)""
nameOverrideString to partially override common.names.fullname template (will maintain the release name)""
fullnameOverrideString to fully override common.names.fullname template""
commonLabelsAdd labels to all the deployed resources{}
commonAnnotationsAdd annotations to all the deployed resources{}
clusterDomainKubernetes Cluster Domaincluster.local
extraDeployArray of extra objects to deploy with the release[]

Tomcat parameters

NameDescriptionValue
image.registryTomcat image registrydocker.io
image.repositoryTomcat image repositorybitnami/tomcat
image.tagTomcat image tag (immutable tags are recommended)10.1.4-debian-11-r0
image.digestTomcat image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag""
image.pullPolicyTomcat image pull policyIfNotPresent
image.pullSecretsSpecify docker-registry secret names as an array[]
image.debugSpecify if debug logs should be enabledfalse
hostAliasesDeployment pod host aliases[]
tomcatUsernameTomcat admin useruser
tomcatPasswordTomcat admin password""
tomcatAllowRemoteManagementEnable remote access to management interface0
catalinaOptsJava runtime option used by tomcat JVM""
commandOverride default container command (useful when using custom images)[]
argsOverride default container args (useful when using custom images)[]
extraEnvVarsExtra environment variables to be set on Tomcat container[]
extraEnvVarsCMName of existing ConfigMap containing extra environment variables""
extraEnvVarsSecretName of existing Secret containing extra environment variables""

Tomcat deployment parameters

NameDescriptionValue
replicaCountSpecify number of Tomcat replicas1
deployment.typeUse Deployment or StatefulSetdeployment
updateStrategy.typeStrategyTypeRollingUpdate
containerPorts.httpHTTP port to expose at container level8080
containerExtraPortsExtra ports to expose at container level[]
podSecurityContext.enabledEnable Tomcat pods' Security Contexttrue
podSecurityContext.fsGroupSet Tomcat pod's Security Context fsGroup1001
containerSecurityContext.enabledEnable Tomcat containers' SecurityContexttrue
containerSecurityContext.runAsUserUser ID for the Tomcat container1001
containerSecurityContext.runAsNonRootForce user to be root in Tomcat containertrue
resources.limitsThe resources limits for the Tomcat container{}
resources.requestsThe requested resources for the Tomcat container{}
livenessProbe.enabledEnable livenessProbetrue
livenessProbe.initialDelaySecondsInitial delay seconds for livenessProbe120
livenessProbe.periodSecondsPeriod seconds for livenessProbe10
livenessProbe.timeoutSecondsTimeout seconds for livenessProbe5
livenessProbe.failureThresholdFailure threshold for livenessProbe6
livenessProbe.successThresholdSuccess threshold for livenessProbe1
readinessProbe.enabledEnable readinessProbetrue
readinessProbe.initialDelaySecondsInitial delay seconds for readinessProbe30
readinessProbe.periodSecondsPeriod seconds for readinessProbe5
readinessProbe.timeoutSecondsTimeout seconds for readinessProbe3
readinessProbe.failureThresholdFailure threshold for readinessProbe3
readinessProbe.successThresholdSuccess threshold for readinessProbe1
startupProbe.enabledEnable startupProbefalse
startupProbe.initialDelaySecondsInitial delay seconds for startupProbe30
startupProbe.periodSecondsPeriod seconds for startupProbe5
startupProbe.timeoutSecondsTimeout seconds for startupProbe3
startupProbe.failureThresholdFailure threshold for startupProbe3
startupProbe.successThresholdSuccess threshold for startupProbe1
customLivenessProbeOverride default liveness probe{}
customReadinessProbeOverride default readiness probe{}
customStartupProbeOverride default startup probe{}
podLabelsExtra labels for Tomcat pods{}
podAnnotationsAnnotations for Tomcat pods

Deploy tomcat with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has tomcat on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the charttomcat is pinned at v10.5.6 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply