Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnableToFindServiceDiscoveryProviderError for type "consul " when using type "kube" #1529

Closed
arthursmuller opened this issue Oct 26, 2021 · 2 comments · Fixed by #1954
Closed
Labels
bug Identified as a potential bug Kubernetes Service discovery by Kubernetes merged Issue has been merged to dev and is waiting for the next release Nov'23 November 2023 release Service Discovery Ocelot feature: Service Discovery

Comments

@arthursmuller
Copy link

arthursmuller commented Oct 26, 2021

I have already ran kubectl create clusterrolebinding permissive-binding --clusterrole=cluster-admin --user=admin --user=kubelet --group=system:serviceaccounts

Can someone please tell me whats wrong with it?

When trying to run ocelot inside kubernetes cluster i get this errors

Error

warn: Ocelot.Responder.Middleware.ResponderMiddleware[0] requestId: 0HMCO5SFMMOIQ:00000002, previousRequestId: no previous request id, message: Error Code: UnableToFindServiceDiscoveryProviderError Message: Unable to find service discovery provider for type: consul errors found in ResponderMiddleware. Setting error response for request path:/externalForumService, request method: GET

{
  "Routes": [
    {
      "UpstreamPathTemplate": "/externalForumService/GetAll",
      "DownstreamPathTemplate": "/api/externalforum/v1/forum/GetAll",
      "DownstreamScheme": "http",
      "ServiceName": "externalforum-api-svc",
      "UpstreamHttpMethod": [ "Get" ]
    },
    {
      "UpstreamPathTemplate": "/externalForumService",
      "DownstreamPathTemplate": "/api/externalforum/v1/forum",
      "DownstreamScheme": "http",
      "ServiceName": "externalforum-api-svc",
      "UpstreamHttpMethod": [ "Get" ]
    }
  ],
  "GlobalConfiguration": {
    "ServiceDiscoveryProvider": {
      "Namespace": "propnull",
      "Type": "kube"
    }
  }
}

Service to map

apiVersion: v1
kind: Service
metadata:
  name: externalforum-api-svc
  namespace: propnull
spec:
  type: ClusterIP
  selector:
    app: externalforum-api
  ports:
    - name: http
      protocol: TCP
      port: 80
      targetPort: 80

Specifications

  • Version: 17.0.0
  • Platform: net core 5.0
@arthursmuller arthursmuller changed the title UnableToFindServiceDiscoveryProviderError for type consul UnableToFindServiceDiscoveryProviderError for type "consul " when using type "Kube" Oct 26, 2021
@arthursmuller arthursmuller changed the title UnableToFindServiceDiscoveryProviderError for type "consul " when using type "Kube" UnableToFindServiceDiscoveryProviderError for type "consul " when using type "kube" Oct 26, 2021
@raman-m
Copy link
Member

raman-m commented Jan 13, 2024

@ggnaegi
This is strange error.
What do you think?

@raman-m
Copy link
Member

raman-m commented Jan 15, 2024

Duplicate of #1527

@raman-m raman-m marked this as a duplicate of #1527 Jan 15, 2024
@raman-m raman-m added bug Identified as a potential bug needs validation Issue has not been replicated or verified yet labels Jan 15, 2024
@raman-m raman-m added Service Discovery Ocelot feature: Service Discovery Kubernetes Service discovery by Kubernetes and removed needs validation Issue has not been replicated or verified yet labels Feb 10, 2024
@raman-m raman-m added accepted Bug or feature would be accepted as a PR or is being worked on Nov'23 November 2023 release labels Feb 10, 2024
@raman-m raman-m added this to the Nov-December'23 milestone Feb 10, 2024
raman-m added a commit that referenced this issue Feb 12, 2024
… discovery provider (#1954)

* Update kubernetes.rst

The `Type` field for the kubernetes example is outdated

* Rename the class back to `Kube` making it as default K8s provider

* Endpoint mocking for `GetAsync()` of `Kube` provider

* Switch off timer

* Update K8s docs

* IDE1006: Naming rule violation

* Follow .NET conventions for test class names

---------

Co-authored-by: Raman Maksimchuk <[email protected]>
@raman-m raman-m added merged Issue has been merged to dev and is waiting for the next release and removed accepted Bug or feature would be accepted as a PR or is being worked on labels Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Identified as a potential bug Kubernetes Service discovery by Kubernetes merged Issue has been merged to dev and is waiting for the next release Nov'23 November 2023 release Service Discovery Ocelot feature: Service Discovery
Projects
None yet
2 participants