-
Notifications
You must be signed in to change notification settings - Fork 237
Cannot create mysql cluster on k8s v1.10.11 #317
Description
Is this a BUG REPORT or FEATURE REQUEST?
BUG REPORT
Versions
MySQL Operator Version:
v0.3.0
Environment:
- Kubernetes version (use
kubectl version):
Client Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.11", GitCommit:"637c7e288581ee40ab4ca210618a89a555b6e7e9", GitTreeState:"archive", BuildDate:"2018-12-07T20:49:26Z", GoVersion:"go1.9.4", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.11", GitCommit:"637c7e288581ee40ab4ca210618a89a555b6e7e9", GitTreeState:"archive", BuildDate:"2019-05-02T12:45:58Z", GoVersion:"go1.9.4", Compiler:"gc", Platform:"linux/amd64"} - Cloud provider or hardware configuration:
- OS (e.g. from /etc/os-release):
- Kernel (e.g.
uname -a):
Linux ost-k8sdwan-master74hk.novalocal 4.14.35-1902.4.8.el7uek.x86_64 Replace custom struct with a local object reference #2 SMP Sun Aug 4 22:25:18 GMT 2019 x86_64 x86_64 x86_64 GNU/Linux - Others:
What happened?
When I create a mysql cluster by mysql operator, I will receive error message as following:
I1014 08:58:49.067134 1 controller.go:331] Setting labels on cluster v1alpha1.mysql.oracle.com/cluster=mysql
I1014 08:58:49.115997 1 controller.go:286] Successfully synced 'mysql/mysql'
I1014 08:58:49.135914 1 controller.go:351] Creating a new Service for cluster "mysql/mysql"
E1014 08:58:49.138922 1 controller.go:291] error syncing 'mysql/mysql': services "mysql" is forbidden: cannot set an ownerRef on a resource you can't delete: ,
When I add the delete permission for the clusterrole mysql-operator, and create a mysql cluster again, I will get the following message:
I1014 09:04:37.829237 1 controller.go:331] Setting labels on cluster v1alpha1.mysql.oracle.com/cluster=mysql
I1014 09:04:37.849862 1 controller.go:286] Successfully synced 'mysql/mysql'
I1014 09:04:37.859937 1 controller.go:351] Creating a new Service for cluster "mysql/mysql"
E1014 09:04:37.862420 1 controller.go:291] error syncing 'mysql/mysql': services "mysql" is forbidden: cannot set blockOwnerDeletion in this case because cannot find RESTMapping for APIVersion mysql.oracle.com/v1alpha1 Kind Cluster: allowed by ClusterRoleBinding "mysql-operator" of ClusterRole "mysql-operator" to ServiceAccount "mysql-operator/mysql-operator", no matches for kind "Cluster" in version "mysql.oracle.com/v1alpha1"
Why?
What you expected to happen?
I hope to create a mysql cluster cluster normally
How to reproduce it (as minimally and precisely as possible)?
cat ./mysql-cluster.yaml
apiVersion: mysql.oracle.com/v1alpha1
kind: Cluster
metadata:
name: mysql
namespace: mysql
spec:
members: 3
rootPasswordSecret:
name: mysql-root-user-secret
kubectl create ns mysql
kubectl -n mysql create -f ./mysql-cluster.yaml
Anything else we need to know?
No