Comments (26)
I decided to use consult as the service discovery and configuration center. No more trouble.
from dotnet-kube-client.
Can you check the section of the readme about how to turn on logging for the client? It should be able to log the requests it’s making which might give us a clue as to what’s going wrong...
from dotnet-kube-client.
Can you check the section of the readme about how to turn on logging for the client? It should be able to log the requests it’s making which might give us a clue as to what’s going wrong...
@tintoy
I don't know where exactly you mean. Could you be more specific?
from dotnet-kube-client.
@tintoy
Is this?
from dotnet-kube-client.
Yep - from memory you can even send the logs to Serilog as well.
from dotnet-kube-client.
As long as it logs to the console or the VS debugger console it should show you the requests it’s making (there is a property on the client options to log requests.
from dotnet-kube-client.
(As you guessed, it’s the logger factory property). Sorry am viewing this on my phone as I’m not near a computer right now.
Take a look at the ConfigMap sample in the repository, it logs requests and does most of what you’d need to hook up configuration from a ConfigMap.
from dotnet-kube-client.
I looked at the ConfigMap sample and it seems that it still can't solve my problem.
@tintoy
from dotnet-kube-client.
Do you use ConfigMap as the configuration center code?Can you send it to me for reference?
from dotnet-kube-client.
Are you able to run that sample successfully?
from dotnet-kube-client.
Can the. @tintoy
from dotnet-kube-client.
What happens when you press enter?
from dotnet-kube-client.
Delete seems to delete unsuccessful, after the creation of an error.
After I manually delete, perform as follows.
from dotnet-kube-client.
In your own program, do you see any keys in the IConfiguration once it has been built? What is the name of the namespace that your config map is in?
from dotnet-kube-client.
@tintoy
Loading the local appSettings. json will work fine. The namespace name is microservice.
I'll send you the code, so you can run it?
from dotnet-kube-client.
It looks like in your original example code you are not specifying the namespace where the configmap lives - can you try passing the namespace in your original program and see if that works?
from dotnet-kube-client.
@tintoy
No.
from dotnet-kube-client.
What keys does the configuration have?
from dotnet-kube-client.
@tintoy
appsettings.json
{ "RemoteServices": { "Default": { "BaseUrl": "http://localhost:65115/" } }, "AuthServer": { "Authority": "http://localhost:64999", "ApiName": "BackendAdminAppGateway" }, "ElasticSearch": { "Url": "http://139.224.255.200:3005" }, "ConnectionStrings": { "Default": "HOST=60.22.155.248;PORT=30000;DATABASE=MsDemo_Identity;PASSWORD=123456;USER ID=postgres;" }, "Redis": { "Configuration": "139.224.255.200:3002" }, "ReRoutes": [ { "DownstreamPathTemplate": "/api/identity/{everything}", "DownstreamScheme": "http", "UpstreamPathTemplate": "/api/identity/{everything}", "ServiceName": "identity-service", "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] }, { "DownstreamPathTemplate": "/api/multi-tenancy/{everything}", "DownstreamScheme": "http", "UpstreamPathTemplate": "/api/multi-tenancy/{everything}", "ServiceName": "multi-tenancy-service", "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] }, { "DownstreamPathTemplate": "/api/productManagement/{everything}", "DownstreamScheme": "http", "UpstreamPathTemplate": "/api/productManagement/{everything}", "ServiceName": "product-management-service", "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] } ], "GlobalConfiguration": { "ServiceDiscoveryProvider": { "Namespace": "microservice", "Type": "kube" } }, "Logging": { "LogLevel": { "Default": "Warning" } }, "AllowedHosts": "*" }
from dotnet-kube-client.
Sorry I mean what keys are in the IConfiguration
? It’s enumerable I think so you can use foreach to see all the keys.
from dotnet-kube-client.
@tintoy
Just this one key
from dotnet-kube-client.
@tintoy
I'm not using it now, I'm just going to mount it, and that's fine.
Now I would like to ask how this method should be used and what needs to be configured?Is there any documentation for that
from dotnet-kube-client.
Hi - there are some examples here:
https://github.com/tintoy/dotnet-kube-client#make-the-client-available-for-dependency-injection
😄
from dotnet-kube-client.
@tintoy
I don't know you used Ocelot.Provider.Kubernetes this component.
I can't find the service. When I access the gateway, an error will be reported:
Direct access to a link to a service is possible.Not through the gateway.
from dotnet-kube-client.
The extension method from this library is called AddKubeClient()
, I’m not sure what AddKubernetes()
does?
from dotnet-kube-client.
I’m not sure how Ocelot’s Kubernetes support works but I’m not aware of an integration between it and this library...
from dotnet-kube-client.
Related Issues (20)
- Project direction / contributions HOT 7
- How is the ApiEndPoint configured for this parameter HOT 5
- IEventClientV1 fails to convert time value HOT 15
- Error while trying to create HorizontalPodAutoscaler with DynamicResourceClient HOT 7
- Aysnc methods on resource clients do not use standard Async naming conventions HOT 3
- Access full details of STATUS column from "kubectl get pod" HOT 1
- No authentication needed for url HOT 2
- KubeClient.Models.ObjectMetaV1.Annotations Should not be read-only
- Metadata doesn't get built for write-only models HOT 3
- WatchAll is missing for some resources HOT 4
- Field selectors for pods not implemented HOT 6
- Credential Plugins (AKS / AAD) Support HOT 1
- Detect current Pod namespace HOT 4
- Cannot find resource API for kind for Istio CRD HOT 6
- Upgrade to a newer version of YamlDotNet HOT 1
- CVE-2018-8292 | System.Net.Http HOT 2
- ExecAndConnect example yields 403 Forbidden HOT 1
- Cannot get output when using ExecAndConnect HOT 3
- Periods in ConfigMap keys get replaced by colons without any possibility of escape. HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dotnet-kube-client.