Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
560 views
in Technique[技术] by (71.8m points)

kubernetes - Minikube service not working on windows 10

I am using minikube 1.16.0 on windows 10 with kubernetes v 1.19.0 .I can see the services and deployment on minikube dashboard and as well by running minikube service list and when running minikube service servicetwo it opens a link in the browser but connection refused is showing on browser.any help would be really appreciated

apiVersion: apps/v1
    kind: Deployment
    metadata:
      name: servicetwo
      labels:
        name: servicetwo
      
    spec:
      replicas: 1
      selector:               
        matchLabels:
          name: servicetwo     
      template:
        metadata:
          labels:
            name: servicetwo
        spec:
          containers:
          - name: servicetwo
            image: swapnadeepdas/servicetwo
            ports:
             - containerPort: 5000
    
            
    ---
    apiVersion: v1
    kind: Service
    metadata:
      name: servicetwo
      labels:
        name: servicetwo
     
    spec:
      ports:
        # the port that this service should serve on
      - port: 5000
        targetPort: 5000
        nodePort: 30003
      selector:
        name: servicetwo
      type: NodePort  
    ---

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
...