Skip to content

Commit aff1e23

Browse files
k-37dunglas
andauthored
Update minikube.md (#2043)
Co-authored-by: Kévin Dunglas <[email protected]>
1 parent 31bc652 commit aff1e23

File tree

1 file changed

+24
-15
lines changed

1 file changed

+24
-15
lines changed

deployment/minikube.md

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,58 @@
1-
# Deploying to Minikube
1+
# Deploying to minikube
22

3-
## Install Minikube
3+
## Install minikube
44

5-
If you have no existing installation of Minikube on your computer, [follow the official tutorial](https://minikube.sigs.k8s.io/docs/start/).
5+
If you have no existing installation of minikube on your computer, [follow the official tutorial](https://minikube.sigs.k8s.io/docs/start/).
66

77
When Minikube is installed, start the cluster:
88

99
```console
1010
minikube start --addons registry --addons dashboard
1111
```
1212

13-
The previous command starts Minikube with a Docker registry (we'll use it in the next step) and with the Kubernetes dashboard.
14-
15-
If you use Mac or Windows, [refer to the documentation](https://minikube.sigs.k8s.io/docs/handbook/registry/#docker-on-macos) to learn how to expose the Docker registry installed as an addon on the port 5000 of the host.
13+
The previous command starts minikube with a Docker registry (we'll use it in the next step) and with the Kubernetes dashboard.
1614

1715
Finally, [install Helm](https://helm.sh/docs/intro/install/). We'll use it to deploy the application in the cluster thanks to the chart provided in the API Platform distribution.
1816

1917
## Building and Pushing Docker Images
2018

21-
First, build the images:
19+
On GNU/Linux and macOS, run the following command following command to point your terminal’s docker-cli to the Docker Engine inside minikube:
20+
21+
```console
22+
eval $(minikube docker-env)
23+
```
24+
25+
Now any `docker` command you run in this current terminal will run against the Docker Engine inside the minikube cluster. For detailed explanation and instructions for Windows [visit official minikube documentation](https://minikube.sigs.k8s.io/docs/handbook/pushing/#1-pushing-directly-to-the-in-cluster-docker-daemon-docker-env).
26+
27+
Build the images in minikube:
2228

2329
```console
24-
docker build -t localhost:5000/php api --target api_platform_php
25-
docker build -t localhost:5000/caddy api --target api_platform_caddy
26-
docker build -t localhost:5000/pwa pwa --target api_platform_pwa_prod
30+
docker build -t localhost:5000/php api --target frankenphp_prod
31+
docker build -t localhost:5000/pwa pwa --target prod
2732
```
2833

29-
Then push the images in the registry installed in Minikube:
34+
Then push the images in the registry available in minikube:
3035

3136
```console
3237
docker push localhost:5000/php
33-
docker push localhost:5000/caddy
3438
docker push localhost:5000/pwa
3539
```
3640

3741
## Deploying
3842

43+
Fetch Helm chart dependencies:
44+
45+
```console
46+
helm repo add postgresql https://charts.bitnami.com/bitnami/
47+
helm dependency build helm/api-platform
48+
```
49+
3950
Finally, deploy the project using the Helm chart:
4051

4152
```console
42-
$ helm install my-project helm/api-platform \
53+
helm install my-project helm/api-platform \
4354
--set php.image.repository=localhost:5000/php \
4455
--set php.image.tag=latest \
45-
--set caddy.image.repository=localhost:5000/caddy \
46-
--set caddy.image.tag=latest \
4756
--set pwa.image.repository=localhost:5000/pwa \
4857
--set pwa.image.tag=latest
4958
```

0 commit comments

Comments
 (0)