Skip to content

Commit b3e2074

Browse files
committed
GH-75 Updated details of how to deploy the new image to K8s.
1 parent 9afc1b6 commit b3e2074

File tree

1 file changed

+7
-3
lines changed
  • _blog/deploying-laravel-to-kubernetes

1 file changed

+7
-3
lines changed

_blog/deploying-laravel-to-kubernetes/index.md

+7-3
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,14 @@ kubectl config use-context minikube
135135
then you can deploy the container image:
136136

137137
```bash
138-
kubectl run laravel-kubernetes-demo --image=yourname/laravel-kubernetes-demo
139-
--port=8181 --image-pull-policy=IfNotPresent
138+
kubectl run laravel-kubernetes-demo \
139+
--image=yourname/laravel-kubernetes-demo \
140+
--port=80 \
141+
--image-pull-policy=IfNotPresent \
142+
--env=APP_KEY=base64:cUPmwHx4LXa4Z25HhzFiWCf7TlQmSqnt98pnuiHmzgY=
140143
```
141-
The above command tells `kubectl` to run our demo application from the Docker image while making port 8181 available for listening. The last parameter of the command simply asks `kubectl` to not pull the image from a registry such as Docker Hub if it exists locally which in this case it does. Do note that you still need to be logged on to Docker's so that `kubectl` can check if the image is up to date.
144+
145+
The above command tells `kubectl` to run our demo application from the Docker image. The first parameter of the command simply asks `kubectl` to not pull the image from a registry such as Docker Hub if it exists locally which in this case it does. Do note that you still need to be logged on to Docker's so that `kubectl` can check if the image is up to date.
142146

143147
You can check that a Pod is created for the application by running:
144148

0 commit comments

Comments
 (0)