You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/11/02 07:56:02 UTC

[GitHub] [apisix-ingress-controller] zou8944 commented on issue #1146: Add new `make dev-env` entry in Makefile

zou8944 commented on issue #1146:
URL: https://github.com/apache/apisix-ingress-controller/issues/1146#issuecomment-1299731855

   @tao12345666333 I tried this job and found something puzzle me. 
   
   First I tried the following script to create dev env,
   
   ```shell
   dev-env: kind-up pack-image
   	kubectl create namespace ingress-apisix
   
   	helm repo add apisix https://charts.apiseven.com
   	helm repo update
   	helm install apisix apisix/apisix --namespace ingress-apisix
   
   	CA_BUNDLE=kubectl config view --raw --flatten -o json | jq -r '.clusters[] | select(.name == "'$(kubectl config current-context)'") | .cluster."certificate-authority-data"'
   	kubectl kustomize $(PWD)/samples/deploy | sed "s|\${CA_BUNDLE}|${CA_BUNDLE}|g" | kubectl apply -f -
   	kubectl set image deployment/ingress-controller ingress-controller=localhost:5001/apache/apisix-ingress-controller:dev
   ```
   
   the step is:
   
   running kind-up to strat cluster and k8s -> build image and deploy to local registry -> deploy apisix to k8s with helm -> deploy ingress controller with local directory `samples/deployment`.
   
   but this didn't work, ingress controller cannot visit apisix properly, there are 2 causes.
   
   1. apisix did not allow admin visit from other endpoint excepting 127.0.0.1
   ![image](https://user-images.githubusercontent.com/18495995/199429414-5ff7ea7f-3c39-4c4c-8941-52509cdbea7f.png)
   
   2. proxy_stream is not configured
   ![image](https://user-images.githubusercontent.com/18495995/199429511-3e760294-71a1-4d41-b3e7-45e7f232cbea.png)
   
   according to [apisix helm chart](https://github.com/apache/apisix-helm-chart/blob/2d321a4b493f77b762758c11c197210e17b434e2/charts/apisix/templates/configmap.yaml#L103), I need to set `ingress-controller.enable=true` when `helm install`, but if so, an ingress controller deployment will be deploy also, this is not expected.
   
   And now I have another idea: deploying apisix and apisix-ingress-controller, and then replace the image with `localhost:5001/apache/apisix-ingress-controller:dev`, the script may be 
   
   ```shell
   dev-env: kind-up pack-image
   	kubectl create namespace ingress-apisix
   
   	helm repo add apisix https://charts.apiseven.com
   	helm repo update
   	helm install apisix apisix/apisix \
   		--set gateway.type=NodePort \
   		--set ingress-controller.enabled=true \
   		--namespace ingress-apisix
   
   	kubectl set image deployment/apisix-ingress-controller apisix-ingress-controller=localhost:5001/apache/apisix-ingress-controller:dev
   ```
   
   Could you please give me some advice?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org