2018-05-03 10:20:39 +03:00
# Upgrading
!!! important
2018-08-30 15:24:56 -03:00
No matter the method you use for upgrading, _if you use template overrides,
make sure your templates are compatible with the new version of ingress-nginx_.
2018-05-03 10:20:39 +03:00
## Without Helm
To upgrade your ingress-nginx installation, it should be enough to change the version of the image
in the controller Deployment.
I.e. if your deployment resource looks like (partial example):
```yaml
kind: Deployment
metadata:
2021-11-28 22:11:22 +01:00
name: ingress-nginx-controller
2018-05-03 10:20:39 +03:00
namespace: ingress-nginx
spec:
replicas: 1
selector: ...
template:
metadata: ...
spec:
containers:
2021-11-28 22:11:22 +01:00
- name: ingress-nginx-controller
2022-06-10 16:31:52 +05:30
image: registry.k8s.io/ingress-nginx/controller:v1.0.4@sha256:545cff00370f28363dad31e3b59a94ba377854d3a11f18988f5f9e56841ef9ef
2018-05-03 10:20:39 +03:00
args: ...
```
2021-11-28 22:11:22 +01:00
simply change the `v1.0.4` tag to the version you wish to upgrade to.
2018-05-03 10:20:39 +03:00
The easiest way to do this is e.g. (do note you may need to change the name parameter according to your installation):
```
2021-11-28 22:11:22 +01:00
kubectl set image deployment/ingress-nginx-controller \
2022-06-10 16:31:52 +05:30
controller=registry.k8s.io/ingress-nginx/controller:v1.0.5@sha256:55a1fcda5b7657c372515fe402c3e39ad93aa59f6e4378e82acd99912fe6028d \
2020-07-20 10:53:34 +03:00
-n ingress-nginx
2018-05-03 10:20:39 +03:00
```
2021-11-28 22:11:22 +01:00
For interactive editing, use `kubectl edit deployment ingress-nginx-controller -n ingress-nginx` .
2018-05-03 10:20:39 +03:00
## With Helm
2021-10-27 18:05:25 +01:00
If you installed ingress-nginx using the Helm command in the deployment docs so its name is `ingress-nginx` ,
2018-05-03 10:20:39 +03:00
you should be able to upgrade using
```shell
2021-10-27 18:05:25 +01:00
helm upgrade --reuse-values ingress-nginx ingress-nginx/ingress-nginx
2018-05-03 10:20:39 +03:00
```
2020-08-18 17:18:17 -04:00
### Migrating from stable/nginx-ingress
2021-08-06 21:07:29 -03:00
See detailed steps in the upgrading section of the `ingress-nginx` chart [README ](https://github.com/kubernetes/ingress-nginx/blob/main/charts/ingress-nginx/README.md#migrating-from-stablenginx-ingress ).