-
Notifications
You must be signed in to change notification settings - Fork 539
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
Support SPDY for exec #411
Comments
An HTTP 403 comes before any protocol (SPDY or WebSockets) is negotiated. So I don't think SPDY vs WebSockets is the reason that you are getting a 403. My guess is that your kubeconfig is somehow incompatible with the Java client. What is the content of your kubeconfig (after removing secrets) |
Unfortunately I don't have access to the kubeconfig, but I can ask about it. The thing is that it was working before and looks like something changed. As I understand WebSocket and SPDY protocol negotiation is started differently: WebSocket requires that the first request is GET, while I managed to find different issues which look similar to me, but I'm not well versed in K8s internals:
By the way I got confused by these two methods: |
Here's an example kubeconfig: apiVersion: v1
clusters:
- cluster:
server: https://cluster1
name: cluster1
- cluster:
server: https://cluster2
name: cluster2
contexts:
- context:
cluster: cluster1
namespace: namespace1
user: username
name: cluster1
- context:
cluster: cluster2
namespace: namespace2
user: username
name: cluster2
current-context: cluster1
kind: Config
preferences: {}
users:
- name: username
user:
token: some token here and here's extract from Kubernetes roles: - apiGroups:
- ""
resources:
- pods
- pods/attach
- pods/eviction
- pods/exec
verbs:
- create
- delete
- deletecollection
- patch
- update |
That could be the problem, you may need to add |
Regarding the question about But honestly, the generated API client doesn't understand WebSockets or SPDY, so they actually not very useful by themselves. |
Unfortunately this is not always possible. I'm trying to make some prototype which uses SPDY, but unfortunately the library I use is already abandoned in favor of HTTP/2, which K8s doesn't yet support for exec. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
I have cluster in with I could exec into a pod using
Exec
class, but recently it stopped working and now return403
status code when doing so.At the same time
kubectl exec
works fine and after some digging it looks like there are two protocols which can be used: WebSocket and SPDY. SPDY is used bykubectl
and that is why it's still working.The text was updated successfully, but these errors were encountered: