kubernetes: Can't delete statefulsets
Is this a BUG REPORT or FEATURE REQUEST?:
Uncomment only one, leave it on its own line:
/kind bug
/kind feature
What happened: Can’t delete a statefulsets and I get an error error: error when stopping “workers.yml”: no kind “GetOptions” is registered for version “apps/v1”
$ kubectl auth can-i get statefulsets
yes
$ kubectl auth can-i create statefulsets
yes
$ kubectl auth can-i delete statefulsets
yes
What you expected to happen: statefulsets will be delete
How to reproduce it (as minimally and precisely as possible): Create a statefulsets and try to delete it
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: worker
spec:
serviceName: "experience1"
replicas: 4
selector:
matchLabels:
app: experience1
template:
metadata:
labels:
app: experience1
spec:
containers:
- name: ssh
image: .....
Anything else we need to know?: It works with a “cluster-admin” role
Environment:
-
Kubernetes version (use
kubectl version): Client Version: version.Info{Major:“1”, Minor:“7”, GitVersion:“v1.7.6”, GitCommit:“4bc5e7f9a6c25dc4c03d4d656f2cefd21540e28c”, GitTreeState:“clean”, BuildDate:“2017-09-14T06:55:55Z”, GoVersion:“go1.8.3”, Compiler:“gc”, Platform:“darwin/amd64”} Server Version: version.Info{Major:“1”, Minor:“9”, GitVersion:“v1.9.2+coreos.0”, GitCommit:“b427929b2982726eeb64e985bc1ebb41aaa5e095”, GitTreeState:“clean”, BuildDate:“2018-01-18T22:56:14Z”, GoVersion:“go1.9.2”, Compiler:“gc”, Platform:“linux/amd64”} -
Cloud provider or hardware configuration: Bare metal
-
OS (e.g. from /etc/os-release): NAME=“Ubuntu” VERSION=“16.04.3 LTS (Xenial Xerus)” ID=ubuntu ID_LIKE=debian PRETTY_NAME=“Ubuntu 16.04.3 LTS” VERSION_ID=“16.04” HOME_URL=“http://www.ubuntu.com/” SUPPORT_URL=“http://help.ubuntu.com/” BUG_REPORT_URL=“http://bugs.launchpad.net/ubuntu/” VERSION_CODENAME=xenial UBUNTU_CODENAME=xenial
-
Kernel (e.g.
uname -a): Linux 4.13.0-26-generic #29~16.04.2-Ubuntu SMP Tue Jan 9 22:00:44 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux -
Install tools: GPUs Daemonsets
-
Others:
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 17
- Comments: 43 (12 by maintainers)
I upgraded my kubernetes-cli to 1.9.3 and statefulset deletion worked fine with no issues. It seems to be the incompatibility issue in client 1.8.2
I solved by deleting it from the dashboard instead of using the CLI.
Reproduced:
This might be gcloud issue. kubectl provided by gcloud latest (189) is still 1.8.6. But GKE allows creation of 1.9.2, hence probably we are facing this issue.
== Statefulset deletion issue when using 1.8.6 client and 1.9.2 master ==
I’m using gcloud provided kubectl version with GKE and sill facing the issue.
$ kubectl version Client Version: version.Info{Major:“1”, Minor:“8”, GitVersion:“v1.8.6”, GitCommit:“6260bb08c46c31eea6cb538b34a9ceb3e406689c”, GitTreeState:“clean”, BuildDate:“2017-12-21T06:34:11Z”, GoVersion:“go1.8.3”, Compiler:“gc”, Platform:“linux/amd64”} Server Version: version.Info{Major:“1”, Minor:“9+”, GitVersion:“v1.9.2-gke.1”, GitCommit:“4ce7af72d8d343ea2f7680348852db641ff573af”, GitTreeState:“clean”, BuildDate:“2018-01-31T22:30:55Z”, GoVersion:“go1.9.2b4”, Compiler:“gc”, Platform:“linux/amd64”}
$ which kubectl …google-cloud-sdk/bin/kubectl
$ gcloud version Google Cloud SDK 189.0.0 alpha 2017.09.15 beta 2017.09.15 bq 2.0.29 core 2018.02.12 gcloud gsutil 4.28 kubectl
$ kubectl delete statefulset foo -v=4 I0217 06:52:26.732817 13294 request.go:606] Error in request: no kind “GetOptions” is registered for version “apps/v1” F0217 06:52:26.733069 13294 helpers.go:120] error: no kind “GetOptions” is registered for version “apps/v1”
I have encountered this issue trying to delete a StatefulSet in 1.8 cluster (kops@AWS) using kubectl 1.10.2. Downgrading kubectl to 1.9.7 fixed the issue.
Google’s reply was “download 1.9x kubectl” if you want one. They didn’t commit to when gcloud will include it.
On Tue, Mar 20, 2018, 8:24 PM calina notifications@github.com wrote:
@dhurley14 - I’ve asked google the same question using our support account. Will update this thread if there is anything worth sharing.
Same issue using kubectl 1.10.0 and 1.10.1 trying to delete a StatefulSet in 1.8.8-gke.0. Running with kubectl 1.8.6 worked.
/sig bugs
Had this issue as well with 1.7.4. Upgrading to 1.9.3 eliminated the problem and the error message.
I can also confirm that upgrading kubectl to 1.9.3 can help to delete the statefulset. But the error message remains.