Open cveld opened 2 years ago
When running the example
K8sMultiplexer connection = await client.PodsV1().ExecAndConnect( kubeNamespace: "default", podName: "nginx", command: "/bin/bash", stdin: true, stdout: true, tty: true );
This yields
Error: System.Net.WebSockets.WebSocketException (0x80004005): WebSocket connection failure. ---> System.Net.WebSockets.WebSocketException (0x80004005): Connection failure (status line = 'HTTP/1.1 403 Forbidden'). at KubeClient.Extensions.WebSockets.K8sWebSocket.ParseAndValidateConnectResponseAsync(Stream stream, K8sWebSocketOptions options, String expectedSecWebSocketAccept, CancellationToken cancellationToken) at KubeClient.Extensions.WebSockets.K8sWebSocket.ConnectAsync(Uri uri, K8sWebSocketOptions options, CancellationToken cancellationToken) at KubeClient.Extensions.WebSockets.K8sWebSocket.ConnectAsync(Uri uri, K8sWebSocketOptions options, CancellationToken cancellationToken) at KubeClient.ResourceClientWebSocketExtensions.ExecAndConnectRaw(IPodClientV1 podClient, String podName, String command, Boolean stdin, Boolean stdout, Boolean stderr, Boolean tty, String container, String kubeNamespace, CancellationToken cancellation) at KubeClient.KubeClientExtensions.Multiplexed(Task`1 webSocketTask, Byte[] inputStreamIndexes, Byte[] outputStreamIndexes, ILoggerFactory loggerFactory) at BlazorTerraformRunner.Pages.Index.ExecPodClicked() in C:\work\git\github\cveld\Experiments\2022-11 Blazor terraform runner\BlazorTerraformRunner\BlazorTerraformRunner\Pages\Index.razor:line 39 at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task) at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
dotnet 6
<PackageReference Include="KubeClient" Version="2.4.9" /> <PackageReference Include="KubeClient.Extensions.WebSockets" Version="2.4.9" />
kubernetes 1.24
Hi - what type of authentication are you using, and are you able to successfully perform any other API calls against that cluster (e.g. client.PodsV1().List()?
client.PodsV1().List()
When running the example
This yields
dotnet 6
kubernetes 1.24