首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >大使服务“待定”

大使服务“待定”
EN

Stack Overflow用户
提问于 2021-05-21 13:32:12
回答 1查看 453关注 0票数 2

当前在Ubuntu 20 LTS上运行一个新的"all in one VM“(堆栈主/工作者方法) kubernetes v1.21.1-00,使用

作为networking/security容器运行时networking/security的

  • cri-o

还安装了kubernetes-仪表板(但我想这对我的问题并不重要)。下面是关于安装大使的指南:https://www.getambassador.io/docs/edge-stack/latest/topics/install/yaml-install/,我提出了一个问题,即该服务处于“挂起”状态。

kubectl get svc -n ambassador打印出以下内容

代码语言:javascript
复制
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

在服务中将typeLoadBalancer更改为NodePort时,正确地设置了它,但我不确定其中的含义。同样,我想在这里使用大使作为入口组件--使用我的设置(只有一台机器),“真正的”负载平衡可能是不必要的。

为了覆盖所有的子域内容,我设置了一个指向我的机器的通配符记录,这意味着我得到了指向这个主机的*.k8s.my-domain.com的CNAME。不知道,这种方法是否有那么聪明来设置入口。

编辑:事件列表,如下所示:

代码语言:javascript
复制
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

此外,以下是yaml预演中挂起的服务(通过kubectl get svc -n ambassador -o yaml ambassador导出)

代码语言:javascript
复制
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:我想知道,https://stackoverflow.com/a/44112285/667183是否也申请了我的流程?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-05-26 20:19:39

答案差不多在这里:https://serverfault.com/questions/1064313/ambassador-service-stays-pending。在安装load balancer之后,整个设置工作正常。我决定使用metallb (用于安装的https://metallb.universe.tf/installation/#installation-by-manifest)。我决定对单个节点kubernetes集群进行以下配置:

代码语言:javascript
复制
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

几秒钟后,负载平衡器被检测到,一切正常。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/67637854

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档