You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have deployed two services in kubernetes (bare-metal k0s. To do some tracing on Jaeger Service A makes a call to Service B for a JWT authentication token - this works perfectly when I test in Visual Studio (Service A is able to retrieve token from Service B).
However when I execute the call in Postman now that I have deployed to k0S , I cannot see neither the services or any traces Jaeger UI :
Using guide from here I have configured the services as below :
Service A (Startup.cs)
`public class Startup
{
private readonly IWebHostEnvironment _environment;
public Startup(IConfiguration configuration, IWebHostEnvironment environment)
{
Configuration = configuration;
_environment = environment;
}
public IConfiguration Configuration { get; }
I have to tried to expose the operator as Traefik Ingress but failed and had to change to NodePort (Can this affect registering of services , if at all ?) :
This is the call in Service A that retrieves token from Service B :
` [HttpGet]
public async Task GetAccountAsync([FromQuery] AccountLookupRequest request)
{
string authenticationResponse = await GetTokenAsync();
if (authenticationResponse != null)
{
_logger.LogInformation("Called AccountLookup API");
List res = new List();
var tranRef = String.Format("{1}{2}{0}", Helpers.aa, Helpers.bb, DateTime.Now.ToString("yyMMddHHmmss"));
...
}
}
static async Task GetTokenAsync()
{
var payload = "{"Username": "golide","Password": "It@XXXXX"}";
Uri uri = new Uri("http://10.XXX.XXX.XXX:31306/users/authenticate");
HttpContent c = new StringContent(payload, Encoding.UTF8, "application/json");
AuthenticationResponse responseEntity = new AuthenticationResponse();
var response = string.Empty;
using (var client = new HttpClient())
{
HttpResponseMessage result = await client.PostAsync(uri, c);
if (result.IsSuccessStatusCode)
{
response = result.StatusCode.ToString();
// responseEntity = JsonConvert.DeserializeObject(response);
}
}
return response;
}`
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
0
I have deployed two services in kubernetes (bare-metal k0s. To do some tracing on Jaeger Service A makes a call to Service B for a JWT authentication token - this works perfectly when I test in Visual Studio (Service A is able to retrieve token from Service B).
However when I execute the call in Postman now that I have deployed to k0S , I cannot see neither the services or any traces Jaeger UI :
Using guide from here I have configured the services as below :
Service A (Startup.cs)
`public class Startup
{
private readonly IWebHostEnvironment _environment;
public Startup(IConfiguration configuration, IWebHostEnvironment environment)
{
Configuration = configuration;
_environment = environment;
}
public IConfiguration Configuration { get; }
}`
Service B has the exact same configuration.
Jaeger operator is set up using NodePort with config as in this file :
[file][https://drive.google.com/file/d/1nAjQ2jHrLSZLWoV9vGb3l4b0M1_yTMTw/view?usp=sharing]
I have to tried to expose the operator as Traefik Ingress but failed and had to change to NodePort (Can this affect registering of services , if at all ?) :
This is the call in Service A that retrieves token from Service B :
` [HttpGet]
public async Task GetAccountAsync([FromQuery] AccountLookupRequest request)
{
string authenticationResponse = await GetTokenAsync();
if (authenticationResponse != null)
{
_logger.LogInformation("Called AccountLookup API");
List res = new List();
var tranRef = String.Format("{1}{2}{0}", Helpers.aa, Helpers.bb, DateTime.Now.ToString("yyMMddHHmmss"));
...
}
}
static async Task GetTokenAsync()
{
var payload = "{"Username": "golide","Password": "It@XXXXX"}";
Uri uri = new Uri("http://10.XXX.XXX.XXX:31306/users/authenticate");
HttpContent c = new StringContent(payload, Encoding.UTF8, "application/json");
AuthenticationResponse responseEntity = new AuthenticationResponse();
var response = string.Empty;
using (var client = new HttpClient())
{
HttpResponseMessage result = await client.PostAsync(uri, c);
if (result.IsSuccessStatusCode)
{
response = result.StatusCode.ToString();
// responseEntity = JsonConvert.DeserializeObject(response);
}
}
return response;
}`
In Postman context the call to http://10.170.xxx.xxx:30488/account?field4=3025202645050&field7=GENERIC01&field10=ABC076 will implicitly invoke the AuthenticationAPI at http://10.170.xxx.xxx:31306/users/authenticate
What am I missing ?
Beta Was this translation helpful? Give feedback.
All reactions