> For the complete documentation index, see [llms.txt](https://docs.neevcloud.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.neevcloud.com/neevcloud-guide/kubernetes/deploy-lamp-in-kubernetes-with-using-helm..md). Agents can also search and read this documentation through its [MCP server](https://docs.neevcloud.com/~gitbook/mcp).

# Deploy Lamp in Kubernetes with using Helm.

To create a Helm chart for a LAMP stack, you can follow these steps:

## Lamp deployment in Kubernetes with using Helm chart.

## Prerequisites

You have to set the Kubernetes cluster to follow these [links](https://docs.neevcloud.com/neevcloud-products/kubernetes/launch-kubernetes-cluster).

### Access the Kubernetes Master Node

To access the master node in a Kubernetes cluster, follow these [LINK](https://docs.neevcloud.com/neevcloud-products/kubernetes/launch-kubernetes-cluster#to-ssh-into-the-master-node)

Open a terminal session.

Use the SSH protocol to connect:

```
ssh -i access_keuser@master-node-address
```

{% hint style="info" %}
Replace `user` with your username and `master-node-address` with the IP address or hostname of the master node.
{% endhint %}

Enter your password or authenticate with your **SSH** key when prompted.

Once connected, you can perform administrative tasks on the Kubernetes master node.

To deploy a **LAMP stack** on Kubernetes with efficiency, we leverage **Helm charts**. Helm packages applications alongside their dependencies such as containers and services into a single deployment unit. Commence by creating a new directory specifically for your Helm chart

## **Create a new directory for your Helm chart**:

```
mkdir my-lamp-chart 
cd my-lamp-chart
```

### **Initialize the Helm chart**:

```
helm create lamp-chart
```

```
cd lamp-chart && ls
```

Run the cd command to navigate to the lamp-chart directory.

<figure><img src="https://1876135298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEC5NwtFshv6EATOemuUn%2Fuploads%2FixybVYU5yCxzEl5GEJZV%2Fimage.png?alt=media&amp;token=646f8fdb-2b63-40e5-bcdf-9dec6b98aa68" alt=""><figcaption></figcaption></figure>

### **Edit the values.yaml file**:

```
vi values.yaml
```

### **Add image of httpd**

A tag identifies a specific version of an image.

**tag: latest**

Service types are used to specify the type of service that should be created for a deployment, service types determine how the service is exposed and accessed within a Kubernetes cluster

**type: LoadBalancer**

<figure><img src="https://1876135298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEC5NwtFshv6EATOemuUn%2Fuploads%2F9xsavWOUrTyJRk4aCicJ%2Fimage.png?alt=media&amp;token=eaa30fae-555c-4b6a-af91-4f492c090965" alt=""><figcaption></figcaption></figure>

### **Edit the templates directory:**

```
cd template
```

```
vi service.yaml
```

The target port is a crucial element in service configuration. It ensures correct traffic routing between the service and the container. You can specify the port that the container listens on and map it to a service port. Use it carefully to maintain proper communication and functionality.

### **Add the target port: 80**

<figure><img src="https://1876135298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEC5NwtFshv6EATOemuUn%2Fuploads%2F1uXjCkYWKr0zfBSQMM3s%2Fimage.png?alt=media&amp;token=2564b740-d108-4c0e-9d21-53c3c2d1c187" alt=""><figcaption></figcaption></figure>

### Rum Helm Install&#x20;

Now back to my-lamp-chart directory run these command

```
helm install my-lamp-release ./lamp-chart
```

<figure><img src="https://1876135298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEC5NwtFshv6EATOemuUn%2Fuploads%2FzNACUcdOwz7ALUi7pQqE%2Fimage.png?alt=media&amp;token=ff53ce9c-4a98-41f7-9d10-87031982d3de" alt=""><figcaption></figcaption></figure>

**Verify the installation**:

```
kubectl get all
```

<figure><img src="https://1876135298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEC5NwtFshv6EATOemuUn%2Fuploads%2FYMuBKZDFnSTmjxb1PhsY%2Fimage.png?alt=media&amp;token=0edc244b-5532-43a3-a5b8-8e9c25ffa873" alt=""><figcaption></figcaption></figure>

When you create a YAML file for a LoadBalancer, it will automatically configure a new load balancer in the NeevCloud Panel. To verify the load balancer navigate to the neevcloud dashboard and select the networking section to click the Load Balancer.

<figure><img src="https://1876135298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEC5NwtFshv6EATOemuUn%2Fuploads%2FgIqyx3nEF57USAzmmqyR%2Fimage.png?alt=media&amp;token=abd4a778-2088-4db7-8f7d-3b136a5ba9f8" alt=""><figcaption></figcaption></figure>

### Added Pools Overview

This section provides an overview of the pools that have been added.

<figure><img src="https://1876135298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEC5NwtFshv6EATOemuUn%2Fuploads%2FhBdafY1uKafBsNk8MLN6%2Fimage.png?alt=media&amp;token=c8adf133-681b-44a0-9590-72f2ef7826c7" alt=""><figcaption></figcaption></figure>

Open your browser and verify the service is running.

\*\*<http://External\\_IP**&#x20>;

<figure><img src="https://1876135298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEC5NwtFshv6EATOemuUn%2Fuploads%2Fp65nVFGbtWk3NIWxyJNy%2Fimage.png?alt=media&amp;token=d4747c39-569b-4945-a538-6044395f543f" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.neevcloud.com/neevcloud-guide/kubernetes/deploy-lamp-in-kubernetes-with-using-helm..md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
