windowsminikubecephcephfsrook-storage

Minikube Service Not Showing up


Hello I'm currently setting up a rook-cephfs test environment using minikube running on Windows 10. So far I've ran crds.yaml, common.yaml, operator.yaml and cluster-test.yaml. I following the guide at https://github.com/kubernetes/kubernetes/tree/release-1.9/cluster/addons/registry to set up the storage. From this guide, I've created the ReplicationController and the service. The issue that I'm having is that when I run kubectl get svc, I don't see the service. Any idea on why its not showing up? Thanks

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 registry

  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: {}

Solution

  • Based on the service yaml you shared, the service in getting created in kube-system namespace. You can view the service using the -n option to specify the namespace

    kubectl get svc kube-registry -n kube-system