Minikube服务未显示

Xcer

您好,我目前正在使用Windows 10上运行的minikube设置rook-cephfs测试环境。到目前为止,我已经运行了crds.yaml,common.yaml,operator.yaml和cluster-test.yaml。我遵循https://github.com/kubernetes/kubernetes/tree/release-1.9/cluster/addons/registry的指南来设置存储。通过本指南,我创建了ReplicationController和服务。我遇到的问题是,当我运行kubectl get svc时,没有看到该服务。关于它为什么不显示的任何想法?谢谢

service.yaml

  apiVersion: v1
  kind: Service
  metadata:
    name: kube-registry
    namespace: kube-system
    labels:
      k8s-app: kube-registry-upstream
      kubernetes.io/cluster-service: "true"
      kubernetes.io/name: "KubeRegistry"
  spec:
    selector:
      k8s-app: kube-registry-upstream
    ports:
    - name: registry
      port: 5000
      protocol: TCP

Docker注册表

  apiVersion: v1
  kind: ReplicationController
  metadata:
    name: kube-registry-v0
    namespace: kube-system
    labels:
      k8s-app: kube-registry-upstream
      version: v0
      kubernetes.io/cluster-service: "true"
  spec:
    replicas: 1
    selector:
      k8s-app: kube-registry-upstream
      version: v0
    template:
      metadata:
        labels:
          k8s-app: kube-registry-upstream
          version: v0
          kubernetes.io/cluster-service: "true"
      spec:
        containers:
        - name: registry
          image: registry:2
          resources:
            limits:
              cpu: 100m
              memory: 100Mi
          env:
          - name: REGISTRY_HTTP_ADDR
            value: :5000
          - name: REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY
            value: /var/lib/registry
          volumeMounts:
          - name: image-store
            mountPath: /var/lib/registry
          ports:
          - containerPort: 5000
            name: registry
            protocol: TCP
        volumes:
        - name: image-store
          emptyDir: {}
阿波罗娃·卡玛斯

根据您共享的服务yaml,将在kube-system命名空间中创建服务。您可以使用-n选项查看服务以指定名称空间

kubectl get svc kube-registry -n kube-system

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章