DocsEmissary-ingress2.1Upgrade Emissary-ingress 1.14.X to Emissary-ingress 2.1.2 (YAML)
Upgrade Emissary-ingress 1.14.X to Emissary-ingress 2.1.2 (YAML)
We're pleased to introduce Emissary-ingress 2.1.2! The 2.X family introduces a number of changes to allow Emissary-ingress to more gracefully handle larger installations (including multitenant or multiorganizational installations), reduce memory footprint, and improve performance. In keeping with SemVer, Emissary-ingress 2.X introduces some changes that aren't backward-compatible with 1.X. These changes are detailed in Major Changes in Emissary-ingress 2.X.
Migration Overview
The recommended strategy for migration is to run Emissary-ingress 1.14 and Emissary-ingress 2.1.2 side-by-side in the same cluster. This gives Emissary-ingress 2.1.2 and Emissary-ingress 1.14 access to all the same configuration resources, with some important caveats:
Emissary-ingress 1.14 will not see any
getambassador.io/v3alpha1
resources.This is intentional; it provides a way to apply configuration only to Emissary-ingress 2.1.2, while not interfering with the operation of your Emissary-ingress 1.14 installation.
If needed, you can use labels to further isolate configurations.
If you need to prevent your Emissary-ingress 2.1.2 installation from seeing a particular bit of Emissary-ingress 1.14 configuration, you can apply a Kubernetes label to the configuration resources that should be seen by your Emissary-ingress 2.1.2 installation, then set its
AMBASSADOR_LABEL_SELECTOR
environment variable to restrict its configuration to only the labelled resources.For example, you could apply a
version-two: true
label to all resources that should be visible to Emissary-ingress 2.1.2, then setAMBASSADOR_LABEL_SELECTOR=version-two=true
in its Deployment.Be careful about label selectors on Kubernetes Services!
If you have services in Emissary-ingress 1.14 that use selectors that will match Pods from Emissary-ingress 2.1.2, traffic will be erroneously split between Emissary-ingress 1.14 and Emissary-ingress 2.1.2. The labels used by Emissary-ingress 2.1.2 include:
You can also migrate by installing Emissary-ingress 2.1.2 in a separate cluster. This permits absolute certainty that your Emissary-ingress 1.14 configuration will not be affected by changes meant for Emissary-ingress 2.1.2, and it eliminates concerns about ACME, but it is more effort.
Side-by-Side Migration Steps
Migration is a six-step process:
Make sure that older configuration resources are not present.
Emissary-ingress 2.X does not support
getambassador.io/v0
orgetambassador.io/v1
resources, and Kubernetes will not permit removing support for CRD versions that are still in use for stored resources. To verify that no resources older thangetambassador.io/v2
are active, runIf
v1
is present in the output, do not begin migration. The old resources must be converted togetambassador.io/v2
and thestoredVersion
information in the cluster must be updated. If necessary, contact Ambassador Labs on Slack for more information.Install new CRDs.
Before installing Emissary-ingress 2.1.2 itself, you must configure your Kubernetes cluster to support its new
getambassador.io/v3alpha1
configuration resources. Note thatgetambassador.io/v2
resources are still supported, but you must install support forgetambassador.io/v3alpha1
to run Emissary-ingress 2.1.2, even if you intend to continue using onlygetambassador.io/v2
resources for some time.Install Emissary-ingress 2.1.2.
After installing the new CRDs, you need to install Emissary-ingress 2.1.2 itself in the same namespace as your existing Emissary-ingress 1.14 installation. It's important to use the same namespace so that the two installations can see the same secrets, etc.
Our
emissary-defaultns.yaml
assumes that Emissary-ingress 1.14 is installed in thedefault
namespace. If you installed Emissary-ingress 1.14 into a different namespace, you'll need to downloademissary-defaultns.yaml
file and edit it.If you need to set
AMBASSADOR_LABEL_SELECTOR
, downloademissary-defaultns-migration.yaml
and edit it to do so.Install
Listener
s andHost
s as needed.An important difference between Emissary-ingress 1.14 and Emissary-ingress 2.1.2 is the new mandatory
Listener
CRD. Also, when running both installations side by side, you will need to make sure that aHost
is present for the new Emissary-ingress 2.1.2 Service. For example:This example requires that you know the hostname for the Emissary-ingress Service (
$EMISSARY_HOSTNAME
) and that you have created a TLS Secret for it in$EMISSARY_TLS_SECRET
.Test!
Your Emissary-ingress 2.1.2 installation can support the
getambassador.io/v2
configuration resources used by Emissary-ingress 1.14, but you may need to make some changes to the configuration, as detailed in the documentation on configuring Emissary-ingress Communications and updating CRDs togetambassador.io/v3alpha1
.If you find that you need to roll back, just reinstall your 1.14 CRDs and delete your installation of Emissary-ingress 2.1.2.
When ready, switch over to Emissary-ingress 2.1.2.
You can run Emissary-ingress 1.14 and Emissary-ingress 2.1.2 side-by-side as long as you care to. However, taking full advantage of Emissary-ingress 2.X's capabilities requires updating your configuration to use
getambassador.io/v3alpha1
configuration resources, since some useful features in Emissary-ingress 2.1.2 are only available usinggetambassador.io/v3alpha1
resources.When you're ready to have Emissary-ingress 2.1.2 handle traffic on its own, switch your original Emissary-ingress 1.14 Service to point to Emissary-ingress 2.1.2. Use
kubectl edit service ambassador
and change theselectors
to:Once that is done, it's safe to remove the
ambassador-admin
Service and theambassador
Deployment:You may also want to redirect DNS to the
emissary-ingress
Service and remove theambassador
Service.Once Emissary-ingress 1.14 is no longer running, you may convert any remaining
getambassador.io/v2
resources togetambassador.io/v3alpha1
.
ON THIS PAGE