Skip to content

Commit e4374d0

Browse files
committed
Fix typos
Fixed typos from PR on imagePullPolicy and updated style for headings to be active. Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
1 parent 3fc58fe commit e4374d0

1 file changed

Lines changed: 27 additions & 28 deletions

File tree

docs/deployment/kubernetes.md

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,21 @@ $ echo -n "" | faas-cli invoke --gateway http://kubernetes-ip:31112 nodeinfo
188188
$ echo -n "verbose" | faas-cli invoke --gateway http://kubernetes-ip:31112 nodeinfo
189189
```
190190
191-
## Customizing the install
191+
## Start the hands-on labs
192+
193+
Learn how to build Serverless functions with OpenFaaS and Python in our half-day workshop. You can follow along online at your own pace.
194+
195+
* [OpenFaaS workshop](/tutorials/workshop/)
196+
## Troubleshooting
197+
198+
If you are running into any issues please check out the troubleshooting guide and search the documentation / past issues before raising an issue.
199+
200+
* [Troubleshooting guide](https://github.com/openfaas/faas/blob/master/guide/troubleshooting.md)
201+
202+
## Advanced
203+
204+
This section covers additional advanced topics beyond the initial deployment.
205+
192206
### Use a private registry with Kubernetes
193207
194208
If you are using a hosted private Docker registry ([Docker Hub](https://hub.docker.com/), or other),
@@ -303,50 +317,35 @@ imagePullSecrets:
303317
Save your changes.
304318
OpenFaaS will now deploy functions with images in private repositories without having to specify the secret in the deployment manifests.
305319
306-
### Setting the ImagePullPolicy with OpenFaaS
320+
### Set a custom ImagePullPolicy
307321
308-
Kubernetes allows you to control the conditions for when Docker images are pulled onto a node via the [imagePullPolicy](https://kubernetes.io/docs/concepts/containers/images/#updating-images) config. Your options are
322+
Kubernetes allows you to control the conditions for when the Docker images for your functions are pulled onto a node. This is configured through an [imagePullPolicy](https://kubernetes.io/docs/concepts/containers/images/#updating-images).
309323
310-
- `Always` : Kuberenetes will pull the Docker image from the registry every time
311-
- `IfNotPresent` : Kuberentes will only pull the image if it does not exist in the local registry cache
312-
- `Never` : Kuberenetes will never try to pull the image, you must manually ensure that the image already exists in the local cache
324+
There are three options:
313325
314-
By default, deployed functions will use an `imagePullPolicy` of `Always`, which ensures functions using static image tags (e.g. "latest" tags) are refreshed during an update. This behavior is configurable in `faas-netes` via the `image_pull_policy` environment variable. When installing via helm you can easily set this value during install using
326+
- `Always` - pull the Docker image from the registry every time a deployment changes
327+
- `IfNotPresent` - only pull the image if it does not exist in the local registry cache
328+
- `Never` - never attempt to pull an image
329+
330+
By default, deployed functions will use an `imagePullPolicy` of `Always`, which ensures functions using static image tags (e.g. "latest" tags) are refreshed during an update. This behavior is configurable in `faas-netes` via the `image_pull_policy` environment variable.
331+
332+
If you're using helm you can pass a configuration flag:
315333

316334
```
317335
helm upgrade openfaas openfaas/openfaas --install --set "faasnetesd.imagePullPolicy=IfNotPresent"
318336
```
319337
320-
If installing via a custom yaml manifest, ensure that your `faas-netes` contain spec includes
321-
338+
If you're using the plain YAML files then edit `gateway-dep.yml` and set the following for `faas-netes`:
322339
```
323-
env:
324340
- name: image_pull_policy
325341
value: "IfNotPresent"
326342
```
327343
328-
[See here](/deployment/kubernetes/) for more details on deploying OpenFaaS in Kubernetes.
329-
330-
#### Which imagePullPolicy should you use
344+
#### Notes on picking an "imagePullPolicy"
331345
332346
As mentioned above, the default value is `Always`. Every time a function is deployed or is scaled up, Kubernetes will pull a potentially updated copy of the image from the registry. If you are using static image tags like `latest`, this is necessary.
333347
334348
When set to `IfNotPresent`, function deployments may not be updated when using static image tags like `latest`. `IfNotPresent` is particularly useful when developing locally with minikube. In this case, you can set your local environment to use [minikube's docker](https://github.com/kubernetes/minikube/blob/master/docs/reusing_the_docker_daemon.md) so `faas-cli build` builds directly into minikube's image store. `faas-cli push` is unnecessary in this workflow - use faas-cli build then faas-cli deploy.
335349
336350
When set to `Never`, only local (or pulled) images will work. This is useful if you want to tightly control which images are available and run in your Kubernetes cluster.
337351
338-
339-
340-
341-
342-
343-
## Start the hands-on labs
344-
345-
Learn how to build serverless functions with OpenFaaS and Python in our half-day workshop. You can follow along online at your own pace.
346-
347-
* [OpenFaaS workshop](/tutorials/workshop/)
348-
## Troubleshooting
349-
350-
If you are running into any issues please check out the troubleshooting guide and search the documentation / past issues before raising an issue.
351-
352-
* [Troubleshooting guide](https://github.com/openfaas/faas/blob/master/guide/troubleshooting.md)

0 commit comments

Comments
 (0)