Skip to content
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

empty selector is invalid #3

Open
mdkhvn opened this issue Oct 20, 2020 · 0 comments
Open

empty selector is invalid #3

mdkhvn opened this issue Oct 20, 2020 · 0 comments

Comments

@mdkhvn
Copy link

mdkhvn commented Oct 20, 2020

hi
i want to install it on my k8s cluster version 1.17.3 i gave error about version and selector!
first of all i change apps/v1beta2 to apps/v1 then give error about (validating data) and i use tag to ignore this error with (--validate=false) then give error like bellow:
The StatefulSet "mysql" is invalid:

  • spec.selector: Required value
  • spec.template.metadata.labels: Invalid value: map[string]string{"name":"mysql"}: selector does not match template labels
    then i change yaml file and put selector there like this:
    apiVersion: apps/v1
    kind: StatefulSet
    metadata:
    name: mysql
    labels:
    name: mysql
    spec:
    serviceName: "mysql"
    replicas: 3
    selector:
    matchlabels:
    app: mysql
    then give another error!
    The StatefulSet "mysql" is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string(nil), MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: empty selector is invalid for statefulset
    could yo help me to solve this issue?!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant