You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by kv...@apache.org on 2021/01/18 06:57:38 UTC

[apisix-ingress-controller] branch master updated: doc: add doc about run on aws eks (#177)

This is an automated email from the ASF dual-hosted git repository.

kvn pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-ingress-controller.git


The following commit(s) were added to refs/heads/master by this push:
     new 2983898  doc: add doc about run on aws eks (#177)
2983898 is described below

commit 29838989c6596ca44b4716114672d55471c0b873
Author: Alex Zhang <zc...@gmail.com>
AuthorDate: Mon Jan 18 14:57:30 2021 +0800

    doc: add doc about run on aws eks (#177)
    
    * doc: add doc about run on aws eks
    
    * fix: add admin_key
    
    * fix: add missing \
---
 charts/ingress-apisix/templates/configmap.yaml |  7 ++-
 docs/deployments/aws.md                        | 78 ++++++++++++++++++++++++++
 docs/install.md                                |  1 +
 3 files changed, 85 insertions(+), 1 deletion(-)

diff --git a/charts/ingress-apisix/templates/configmap.yaml b/charts/ingress-apisix/templates/configmap.yaml
index 85bab99..bd1ebc6 100644
--- a/charts/ingress-apisix/templates/configmap.yaml
+++ b/charts/ingress-apisix/templates/configmap.yaml
@@ -25,7 +25,12 @@ data:
     kubernetes:
       kubeconfig: {{ .Values.ingressController.config.kubernetes.kubeconfig | quote }}
       resync_interval: {{ .Values.ingressController.config.kubernetes.resyncInterval | quote }}
-      app_namespaces: {{ .Values.ingressController.config.kubernetes.appNamespaces }}
+      {{- if gt (len .Values.ingressController.config.kubernetes.appNamespaces) 0 }}
+      app_namespaces:
+      {{- range .Values.ingressController.config.kubernetes.appNamespaces }}
+      - {{ . | quote }}
+      {{- end }}
+      {{- end }}
     apisix:
       base_url: {{ .Values.ingressController.config.apisix.baseURL | quote }}
       admin_key: {{ .Values.ingressController.config.apisix.adminKey | quote }}
diff --git a/docs/deployments/aws.md b/docs/deployments/aws.md
new file mode 100644
index 0000000..304f6b6
--- /dev/null
+++ b/docs/deployments/aws.md
@@ -0,0 +1,78 @@
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+# Install Ingress APISIX on AWS EKS
+
+This document explains how to install Ingress APISIX on [AWS EKS](https://amazonaws-china.com/eks/?whats-new-cards.sort-by=item.additionalFields.postDateTime&whats-new-cards.sort-order=desc&eks-blogs.sort-by=item.additionalFields.createdDate&eks-blogs.sort-order=desc).
+
+## Prerequisites
+
+* Create an EKS Service on AWS.
+* Install [Helm](https://helm.sh/).
+* Download the kube config for your EKS from [aws cli interface](https://amazonaws-china.com/cli/).
+* Clone [Apache APISIX Charts](https://github.com/apache/apisix-helm-chart).
+* Clone [apisix-ingress-controller](https://github.com/apache/apisix-ingress-controller).
+* Make sure your target namespace exists, kubectl operations thorough this document will be executed in namespace `ingress-apisix`.
+
+## Install APISIX
+
+[Apache APISIX](http://apisix.apache.org/) as the proxy plane of apisix-ingress-controller, should be deployed in advance.
+
+```shell
+cd /path/to/apisix-helm-chart
+helm repo add bitnami https://charts.bitnami.com/bitnami
+helm dependency update ./chart/apisix
+helm install apisix ./chart/apisix \
+  --set gateway.type=LoadBalancer \
+  --set allow.ipList="{0.0.0.0/0}" \
+  --namespace ingress-apisix \
+kubectl get service --namespace ingress-apisix
+```
+
+Two Service resources were created, one is `apisix-gateway`, which processes the real traffic; another is `apisix-admin`, which acts as the control plane to process all the configuration changes.
+
+The gateway service type is set to `LoadBalancer` (See [AWS Network Balancer](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html) for more details), so that clients can access Apache APISIX through a load balancer. You can find the load balancer hostname by running:
+
+```shell
+kubectl get service apisix-gateway --namespace ingress-apisix -o jsonpath='{.status.loadBalancer.ingress[].hostname}'
+```
+
+Another thing should be concerned that the `allow.ipList` field should be customized according to the [EKS CIDR Ranges](https://amazonaws-china.com/premiumsupport/knowledge-center/eks-multiple-cidr-ranges/), so that the apisix-ingress-controller instances can access the APISIX instances (resources pushing).
+
+## Install apisix-ingress-controller
+
+You can also install apisix-ingress-controller by Helm Charts, it's recommended to install it in the same namespace with Apache APISIX.
+
+```shell
+cd /path/to/apisix-ingress-controller
+# install base resources, e.g. ServiceAccount.
+helm install ingress-apisix-base -n ingress-apisix ./charts/base
+# install apisix-ingress-controller
+helm install ingress-apisix ./charts/ingress-apisix \
+  --set ingressController.image.tag=dev \
+  --set ingressController.config.apisix.baseURL=http://apisix-admin:9180/apisix/admin \
+  --set ingressController.config.apisix.adminKey=edd1c9f034335f136f87ad84b625c8f1 \
+  --namespace ingress-apisix
+```
+
+Change the `ingressController.image.tag` to the Apache APISIX version that you desire. You have to Wait for while until the correspdoning pods are running.
+
+Now open your [EKS console](https://console.aws.amazon.com/eks/home), choosing your cluster and clicking the Workloads tag, you'll see all pods of Apache APISIX, etcd and apisix-ingress-controller are ready.
+
+Try to create some [resources](../CRD-specification.md) to verify the running status. As a minimalist example, see [proxy-the-httpbin-service](../samples/proxy-the-httpbin-service.md) to learn how to apply resources to drive the apisix-ingress-controller.
diff --git a/docs/install.md b/docs/install.md
index bf78953..a2463a1 100644
--- a/docs/install.md
+++ b/docs/install.md
@@ -23,6 +23,7 @@ This is an index page about installing Ingress APISIX in several environments. C
 
 * [Install Ingress APISIX on Minikube](deployments/minikube.md)
 * [Install Ingress APISIX on Azure AKS](deployments/azure.md)
+* [Install Ingress APISIX on AWS EKS](deployments/aws.md)
 
 ## Kustomize Support