kuberneteskubernetes-ingressambassador

ambassador service stays "pending"


Currently running a fresh "all in one VM" (stacked master/worker approach) kubernetes v1.21.1-00 on Ubuntu Server 20 LTS, using

also installed the kubernetes-dashboard (but I guess that's not important for my issue 😉). Taking this guide for installing ambassador: https://www.getambassador.io/docs/edge-stack/latest/topics/install/yaml-install/ I come along the issue that the service is stuck in status "pending".

kubectl get svc -n ambassador prints out the following stuff

NAME               TYPE           CLUSTER-IP       EXTERNAL-IP   PORT(S)                      AGE
ambassador         LoadBalancer   10.97.117.249    <pending>     80:30925/TCP,443:32259/TCP   5h
ambassador-admin   ClusterIP      10.101.161.169   <none>        8877/TCP,8005/TCP            5h
ambassador-redis   ClusterIP      10.110.32.231    <none>        6379/TCP                     5h
quote              ClusterIP      10.104.150.137   <none>        80/TCP                       5h

While changing the type from LoadBalancer to NodePort in the service sets it up correctly, I'm not sure of the implications coming along. Again, I want to use ambassador as an ingress component here - with my setup (only one machine), "real" loadbalancing might not be necessary.

For covering all the subdomain stuff, I setup a wildcard recording for pointing to my machine, means I got a CNAME for *.k8s.my-domain.com which points to this host. Don't know, if this approach was that smart for setting up an ingress.

Edit: List of events, as requested below:

Events:
  Type    Reason     Age   From               Message
  ----    ------     ----  ----               -------
  Normal  Scheduled  116s  default-scheduler  Successfully assigned ambassador/ambassador-redis-584cd89b45-js5nw to dev-bvpl-099
  Normal  Pulled     116s  kubelet            Container image "redis:5.0.1" already present on machine
  Normal  Created    116s  kubelet            Created container redis
  Normal  Started    116s  kubelet            Started container redis

Additionally, here's the service pending in yaml presenation (exported via kubectl get svc -n ambassador -o yaml ambassador)

apiVersion: v1
kind: Service
metadata:
  annotations:
    a8r.io/bugs: https://github.com/datawire/ambassador/issues
    a8r.io/chat: http://a8r.io/Slack
    a8r.io/dependencies: ambassador-redis.ambassador
    a8r.io/description: The Ambassador Edge Stack goes beyond traditional API Gateways
      and Ingress Controllers with the advanced edge features needed to support developer
      self-service and full-cycle development.
    a8r.io/documentation: https://www.getambassador.io/docs/edge-stack/latest/
    a8r.io/owner: Ambassador Labs
    a8r.io/repository: github.com/datawire/ambassador
    a8r.io/support: https://www.getambassador.io/about-us/support/
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"v1","kind":"Service","metadata":{"annotations":{"a8r.io/bugs":"https://github.com/datawire/ambassador/issues","a8r.io/chat":"http://a8r.io/Slack","a8r.io/dependencies":"ambassador-redis.ambassador","a8r.io/description":"The Ambassador Edge Stack goes beyond traditional API Gateways and Ingress Controllers with the advanced edge features needed to support developer self-service and full-cycle development.","a8r.io/documentation":"https://www.getambassador.io/docs/edge-stack/latest/","a8r.io/owner":"Ambassador Labs","a8r.io/repository":"github.com/datawire/ambassador","a8r.io/support":"https://www.getambassador.io/about-us/support/"},"labels":{"app.kubernetes.io/component":"ambassador-service","product":"aes"},"name":"ambassador","namespace":"ambassador"},"spec":{"ports":[{"name":"http","port":80,"targetPort":8080},{"name":"https","port":443,"targetPort":8443}],"selector":{"service":"ambassador"},"type":"LoadBalancer"}}
  creationTimestamp: "2021-05-22T07:18:23Z"
  labels:
    app.kubernetes.io/component: ambassador-service
    product: aes
  name: ambassador
  namespace: ambassador
  resourceVersion: "4986406"
  uid: 68e4582c-be6d-460c-909e-dfc0ad84ae7a
spec:
  clusterIP: 10.107.194.191
  clusterIPs:
  - 10.107.194.191
  externalTrafficPolicy: Cluster
  ipFamilies:
  - IPv4
  ipFamilyPolicy: SingleStack
  ports:
  - name: http
    nodePort: 32542
    port: 80
    protocol: TCP
    targetPort: 8080
  - name: https
    nodePort: 32420
    port: 443
    protocol: TCP
    targetPort: 8443
  selector:
    service: ambassador
  sessionAffinity: None
  type: LoadBalancer
status:
  loadBalancer: {}

EDIT#2: I wonder, if https://stackoverflow.com/a/44112285/667183 applies for my process as well?


Solution

  • Answer is pretty much here: https://serverfault.com/questions/1064313/ambassador-service-stays-pending . After installing a load balancer the whole setup worked. I decided to go with metallb (https://metallb.universe.tf/installation/#installation-by-manifest for installation). I decided to go with the following configuration for a single-node kubernetes cluster:

    apiVersion: v1
    kind: ConfigMap
    metadata:
      namespace: metallb-system
      name: config
    data:
      config: |
        address-pools:
        - name: default
          protocol: layer2
          addresses:
          - 10.16.0.99-10.16.0.99
    

    After a few seconds the load balancer is detected and everything goes fine.