Open lxm opened 3 years ago
@lxm That's right, we may maintain a document to tell people if you're using xxx feature in ingress-nginx, and you're trying to migrate to ingress-apisix, that what you need to configure to achieve the same purpose.
Workload is huge, but we can list some common and important features, adding examples for them preferentially.
@gxthrj @tao12345666333
We are now expanding the functionality of apisix-ingress, see #397 Use the same annotation similar to ingress-nginx.
Sure,We should also add documents to describe
@lxm any feedback?
Before you can migrate from nginx ingress controller to Apisix-ingress, you'll need to identify the annotations used in your nginx ingress controller configuration that you want to migrate. You can do this by examining your Kubernetes manifests and looking for annotations that have the prefix "nginx.ingress.kubernetes.io/". Take note of the names and values of these annotations.
Once you have identified the annotations you want to migrate, check if they are supported in Apisix-ingress. Apisix-ingress has its own set of annotations, which can be found in the official documentation. If an annotation you want to migrate is not listed, you may need to find an alternative solution or implement custom functionality in Apisix-ingress.
Once you have identified the Apisix-ingress annotations that correspond to the nginx ingress controller annotations you want to migrate, you'll need to update your Kubernetes manifests to use the Apisix-ingress annotations instead. Be sure to update the values of the annotations as well, if necessary.
For example, if you have an nginx ingress controller annotation like this:
nginx.ingress.kubernetes.io/rewrite-target: /$1
You can replace it with the following Apisix-ingress annotation:
apisix.apache.org/rewrite-target: /$1
Next, you'll need to update your Kubernetes manifests to use the Apisix-ingress resource instead of the nginx ingress controller resource. The Apisix-ingress resource is similar to the Kubernetes Ingress resource, but with additional features and functionality.
Here's an example Apisix-ingress resource:
apiVersion: apisix.apache.org/v2alpha1
kind: ApisixIngress
metadata:
name:
spec:
rules:
- host:
http:
paths:
- path:
pathType:
backend:
service:
name:
port:
name: http
If you have existing Kubernetes Ingress resources that you want to migrate to Apisix-ingress, you can do so by creating a new ApisixRoute resource with the same configuration as the Ingress resource, and then deleting the Ingress resource.
Here's an example ApisixRoute resource that's equivalent to the example Apisix-ingress resource shown above:
apiVersion:
kind: ApisixRoute
metadata:
name:
spec:
rules:
- host:
http:
paths:
- path:
pathType:
backend:
service:
name:
port:
name: http
Finally, you'll need to update your documentation to reflect the changes you've made. This should include instructions for using the new Apisix-ingress annotations and resources, as well as any other relevant information about the migration process.
By following these steps, you should be able to migrate from nginx ingress controller to Apisix-ingress with minimal disruption
Issue description
Due to most people started to get in touch with Kubernetes ingress is using
nginx ingress controller
, so it is likely to use a lot of nginx ingress's annotations. It's a good idea to add some example about migrating from nginx ingress controller. Such asand so on.