Minikube Ingress:意外错误读取configmap kube-system / tcp-services:configmap kube-system / tcp-services未找到

时间:2018-04-03 02:24:51

标签: minikube kubernetes-ingress

我正在使用以下配置运行minikube

环境

  • minikube版本: v0.25.2
  • macOS版本: 10.12.6
  • DriverName: virtualbox
  • ISO: minikube-v0.25.1.iso

我创建了 Ingress 资源来将服务messy-chimp-emauser映射到路径:/

但是当我推出对minikube的更改时,我会在nginx-ingress-controller

的pod中获取以下日志
   5 controller.go:811] service default/messy-chimp-emauser does not have any active endpoints
   5 controller.go:245] unexpected error reading configmap kube-system/tcp-services: configmap kube-system/tcp-services was not found
   5 controller.go:245] unexpected error reading configmap kube-system/udp-services: configmap kube-system/udp-services was not found

因此在尝试从浏览器访问服务时获取HTTP-503

重现的步骤

第1步 minikube addons enable ingress

第2步 kubectl create -f kube-resources.yml (用k8s.gcr.io/echoserver:1.4替换了实际图像)

KUBE-resources.yml

apiVersion: v1
kind: Service
metadata:
  name: messy-chimp-emauser
  labels:
    app: messy-chimp-emauser
    chart: emauser-0.1.0
    release: messy-chimp
    heritage: Tiller
spec:
  type: ClusterIP
  ports:
    - port: 80
      targetPort: http
      protocol: TCP
      name: emauser
  selector:
    app: messy-chimp-emauser
    release: messy-chimp
---
apiVersion: apps/v1beta2
kind: Deployment
metadata:
  name: messy-chimp-emauser
  labels:
    app: emauser
    chart: emauser-0.1.0
    release: messy-chimp
    heritage: Tiller
spec:
  replicas: 1
  selector:
    matchLabels:
      app: emauser
      release: messy-chimp
  template:
    metadata:
      labels:
        app: emauser
        release: messy-chimp
    spec:
      containers:
        - name: emauser
          image: "k8s.gcr.io/echoserver:1.4"
          imagePullPolicy: IfNotPresent
          ports:
            - containerPort: 80
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: messy-chimp-ema-chart
  labels:
    app: ema-chart
    chart: ema-chart-0.1.0
    release: messy-chimp
    heritage: Tiller
spec:
  rules:
    - http:
        paths:
          - path: /
            backend:
              serviceName: messy-chimp-emauser
              servicePort: emauser

请求建议。

0 个答案:

没有答案