kubectl set
commands on ReplicaSet and DaemonSet occasionally return version registration errors #53040
Description
Is this a BUG REPORT or FEATURE REQUEST?:
Uncomment only one, leave it on its own line:
/kind bug
/kind feature
What happened:
create a ReplicaSet then change its image by kubectl set image command. It returns an error ocassionally like
error: replicasets/gakki-replicaset no kind "ReplicaSet" is registered for version "apps/v1beta1"
What you expected to happen:
image changes without error
How to reproduce it (as minimally and precisely as possible):
yaml file as follows:
apiVersion: apps/v1beta2
kind: ReplicaSet
metadata:
name: test-replicaset
spec:
replicas: 3
selector:
matchLabels:
tier: frontend
matchExpressions:
- {key: tier, operator: In, values: [frontend]}
template:
metadata:
labels:
app: guestbook
tier: frontend
spec:
containers:
- name: php-redis
image: gcr.io/google_samples/gb-frontend:v3
resources:
requests:
cpu: 100m
memory: 100Mi
env:
- name: GET_HOSTS_FROM
value: dns
ports:
- containerPort: 80
execute command:
kubectl create -f test.yaml
kubectl set image rs test-replicaset php-redis=nginx:1.7.9
Anything else we need to know?:
the error happens ocassionally, you can make several tries to observe this error.
Environment:
-
Kubernetes version (use
kubectl version
):
Client Version: version.Info{Major:"1", Minor:"9+", GitVersion:"v1.9.0-alpha.1.51+14cedb9f581d6a-dirty", GitCommit:"14cedb9f581d6a6de367e780e31a8ca1c7b12112", GitTreeState:"dirty", BuildDate:"2017-09-23T08:08:35Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"9+", GitVersion:"v1.9.0-alpha.1.281+ba1ab3fd559dd7-dirty", GitCommit:"ba1ab3fd559dd775863477f00a3e8d3bf86583a0", GitTreeState:"dirty", BuildDate:"2017-09-25T11:31:36Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"} -
Cloud provider or hardware configuration**:
-
OS (e.g. from /etc/os-release):
-
Kernel (e.g.
uname -a
): -
Install tools:
-
Others: