-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
add a deploy on Minikube entry #1315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Deploying to Minikube | ||
|
||
## Install Minikube | ||
|
||
If you haven't an existing installation of Minikube on your computer, [follow the official tutorial](https://minikube.sigs.k8s.io/docs/start/). | ||
|
||
When Minkube is installed, start the cluster: | ||
|
||
minikube start --addons registry --addons dashboard | ||
|
||
The previous command starts Minikube with a Docker registry (we'll use it in the next step) and wih the Kubernetes dashboard. | ||
|
||
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. | ||
|
||
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. | ||
|
||
## Building and Pushing Docker Images | ||
|
||
First, build the images: | ||
|
||
docker build -t localhost:5000/php api --target api_platform_php | ||
docker build -t localhost:5000/caddy api --target api_platform_caddy | ||
dunglas marked this conversation as resolved.
Show resolved
Hide resolved
|
||
docker build -t localhost:5000/pwa pwa --target api_platform_pwa_prod | ||
|
||
Then push the images in the registry installed in Minikube: | ||
|
||
docker push localhost:5000/php | ||
docker push localhost:5000/caddy | ||
docker push localhost:5000/pwa | ||
|
||
## Deploying | ||
|
||
Finally, deploy the project using the Helm chart: | ||
|
||
$ helm install my-project helm/api-platform \ | ||
--set php.image.repository=localhost:5000/php \ | ||
--set php.image.tag=latest \ | ||
--set caddy.image.repository=localhost:5000/caddy \ | ||
--set caddy.image.tag=latest \ | ||
--set pwa.image.repository=localhost:5000/pwa \ | ||
--set pwa.image.tag=latest | ||
|
||
Copy and paste the commands displayed in the terminal to enable the port forwarding then go to `http://localhost:8080` to access your application! | ||
|
||
Run `minikube dashboard` at any moment to see the state of your deployments. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.