-
Notifications
You must be signed in to change notification settings - Fork 972
Open
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.Indicates an issue or PR lacks a `triage/foo` label and requires one.
Description
What happened:
Why has the request method of kubectl exec
changed from POST
to GET
now, eg, v1.33.3. It was POST
in v1.26.15
?
And now pods/exec
no need create
verbs, get
is enough to make it happen, is it intended?
What you expected to happen:
pods/exec
still using create
verbs not get
How to reproduce it (as minimally and precisely as possible):
Grant k8s user viewer access, which has get
pods/exec
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: ns:viewer-nonprod
rules:
- apiGroups:
- "*"
resources:
- "*"
verbs:
- get
- list
- watch
Try kubectl exec -v6 -it {pod_name} -- bash
by using version v1.33.3 (GET) and v1.26.15(POST)
eg:

Anything else we need to know?:
Environment:
- Kubernetes client and server versions (use
kubectl version
):
Client Version: v1.33.3
Kustomize Version: v5.6.0
Server Version: v1.31.1-aliyun.1 - Cloud provider or hardware configuration:
AliCloud ACK - OS (e.g:
cat /etc/os-release
):
Darwin MacBook-Pro.local 24.5.0 Darwin Kernel Version 24.5.0: Tue Apr 22 19:54:49 PDT 2025; root:xnu-11417.121.6~2/RELEASE_ARM64_T6000 arm64
Metadata
Metadata
Assignees
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.Indicates an issue or PR lacks a `triage/foo` label and requires one.