> For the complete documentation index, see [llms.txt](https://docs.microservice-stack.com/introduction/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.microservice-stack.com/introduction/deployment/local-deployment.md).

# Local deployment

Microservice stack comes with a CLI tool that helps you deploy your infrastructure locally. In order to start local deployment, you must first have ran [Configuration generator](/introduction/workspace-generators/configuration-generator.md). This generator generates all required files for local deployment.

The deployment CLI can be run using NPX. There are three different CLI commands available

### Install

```
npx @microservice-stack/local-deployment@latest install
```

This command will set up local Minikube cluster will all deployments that are required to run your application. It will also build and deploy all the services that are located inside the `apps/api` folder.

### Update service

```
npx @microservice-stack/local-deployment@latest update --service <name>
```

This command is used to deploy new version of a service to the already deployed minikube. This command will not work correctly if used before install command.

### Update ingress controller

```
npx @microservice-stack/local-deployment@latest update-ingress
```

This command will deploy new version of the ingress controller. It takes in values that are defined inside the `infrastructure/ingress-values.yaml` file.

## Cluster access

To access your Kubernetes cluster after everything is deployed, you can use `kubectl port-forward` command.

To do that, you first have to find out your ingress controller pod name. You can do that by running the following command:

```typescript
kubectl -n ingress-nginx get pods
```

The response should look something like this

![](https://3048002809-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ6xEka2WKHRv890dwrNn%2Fuploads%2FnM3DGqS3JS3d5Ieia56B%2Fimage.png?alt=media\&token=92ea65f3-318c-4207-8a99-b2e55a1899ae)

Now that you have the ingress controller name, you can use the port-forward command to expose the cluster to port 3000 using the following command

```
kubectl -n ingress-nginx port-forward <controller pod name> 3000:80
```
