Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong port number for apisix ingress service targetPort to deployment #774

Open
zzyyll2 opened this issue Aug 14, 2024 · 0 comments
Open

Comments

@zzyyll2
Copy link

zzyyll2 commented Aug 14, 2024

I use this command to install apisix:

`

> helm repo add apisix https://charts.apiseven.com
> helm repo add bitnami https://charts.bitnami.com/bitnami
> helm repo update
> #  We use Apisix 3.0 in this example. If you're using Apisix v2.x, please set to v2
> helm install apisix apisix/apisix \
>   --set service.type=NodePort \
>   --set ingress-controller.enabled=true \
>   --create-namespace \
>   --namespace ingress-apisix \
>   --set ingress-controller.config.apisix.serviceNamespace=ingress-apisix \
>   --set ingress-controller.config.apisix.adminAPIVersion=v3

`

after finished, i found ingress gateway targetPort is 9080, but ingress gateway deployment http port is 8080

image

`# kubectl describe -n ingress-apisix service/apisix-ingress-controller-apisix-gateway
Name:                     apisix-ingress-controller-apisix-gateway
Namespace:                ingress-apisix
Labels:                   app.kubernetes.io/instance=apisix
                          app.kubernetes.io/managed-by=Helm
                          app.kubernetes.io/name=ingress-controller
                          app.kubernetes.io/version=1.8.0
                          helm.sh/chart=ingress-controller-0.14.0
Annotations:              meta.helm.sh/release-name: apisix
                          meta.helm.sh/release-namespace: ingress-apisix
Selector:                 app.kubernetes.io/instance=apisix,app.kubernetes.io/name=ingress-controller
Type:                     NodePort
IP Family Policy:         SingleStack
IP Families:              IPv4
IP:                       10.111.93.55
IPs:                      10.111.93.55
Port:                     http  80/TCP
**TargetPort:               9080/TCP**
NodePort:                 http  64855/TCP
Endpoints:                10.244.0.3:9080
Port:                     https  443/TCP
TargetPort:               9443/TCP
NodePort:                 https  34570/TCP
Endpoints:                10.244.0.3:9443
Session Affinity:         None
External Traffic Policy:  Cluster
Internal Traffic Policy:  Cluster
Events:                   <none>
`
`# kubectl describe -n ingress-apisix pod/apisix-ingress-controller-7d5d7868c8-g925k
Name:             apisix-ingress-controller-7d5d7868c8-g925k
Namespace:        ingress-apisix
Priority:         0
Service Account:  apisix-ingress-controller
Node:             minikube/10.250.112.2
Start Time:       Wed, 14 Aug 2024 19:07:32 +0800
Labels:           app.kubernetes.io/instance=apisix
                  app.kubernetes.io/name=ingress-controller
                  pod-template-hash=7d5d7868c8
Annotations:      checksum/config: 1a836d2628f3e26458424c91c5e54af08ea80a684a64e0a76eb70dfc5d54fc9a
Status:           Running
IP:               10.244.0.3
IPs:
  IP:           10.244.0.3
Controlled By:  ReplicaSet/apisix-ingress-controller-7d5d7868c8
Init Containers:
  wait-apisix-admin:
    Container ID:  docker://5593413d6542d8fb5c5da9385f0e8eab442b08d1301bab13d3c33a7efee9d969
    Image:         busybox:1.28
    Image ID:      docker-pullable://busybox@sha256:141c253bc4c3fd0a201d32dc1f493bcf3fff003b6df416dea4f41046e0f37d47
    Port:          <none>
    Host Port:     <none>
    Command:
      sh
      -c
      until nc -z apisix-admin.ingress-apisix.svc.cluster.local 9180 ; do echo waiting for apisix-admin; sleep 2; done;
    State:          Terminated
      Reason:       Completed
      Exit Code:    0
      Started:      Wed, 14 Aug 2024 19:07:38 +0800
      Finished:     Wed, 14 Aug 2024 19:12:12 +0800
    Ready:          True
    Restart Count:  0
    Environment:    <none>
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-k8wrq (ro)
Containers:
  ingress-controller:
    Container ID:  docker://3ffa81d56fe28b3f1ddc38fe4315d1a0d1f660c40d5d3a42f769d56935cba607
    Image:         apache/apisix-ingress-controller:1.8.0
    Image ID:      docker-pullable://apache/apisix-ingress-controller@sha256:57d581ba7d69c85e61af642b352b1c62cefeeef5cae7951281ccbf621fb8c943
    **Port:          8080/TCP**
    Host Port:     0/TCP
    Command:
      /ingress-apisix/apisix-ingress-controller
      ingress
      --config-path
      /ingress-apisix/conf/config.yaml
    State:          Running
      Started:      Wed, 14 Aug 2024 19:12:34 +0800
    Ready:          True
`

it means ingress gateway not works

image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant