Spark-on-k8s-operator: Cannot specify imagePullSecret in minikube

Created on 1 Jul 2019  路  1Comment  路  Source: GoogleCloudPlatform/spark-on-k8s-operator

Hey, first time posting.. ever (please assist me with formatting etc.)

I have set up RBAC and can successfully run the py-pi.py example script. When trying to add a secret for pulling from our company's private repository I get the following error:

E0701 21:01:51.616935 9 reflector.go:125] github.com/GoogleCloudPlatform/spark-on-k8s-operator/pkg/client/informers/externalversions/factory.go:119: Failed to list *v1beta1.SparkApplication: v1beta1.SparkApplicationList.Items: []v1beta1.SparkApplication: v1beta1.SparkApplication.Spec: v1beta1.SparkApplicationSpec.ImagePullSecrets: []string: ReadString: expects " or n, but found {, error found in #10 byte of ...|ecrets":[{"name":"gi|..., bigger context ...|","imagePullPolicy":"Always","imagePullSecrets":[{"name":"gitlab"}],"initContainerImage":"gcr.io/spa|...
E0701 21:01:52.618573 9 reflector.go:125] github.com/GoogleCloudPlatform/spark-on-k8s-operator/pkg/client/informers/externalversions/factory.go:119: Failed to list *v1beta1.SparkApplication: v1beta1.SparkApplicationList.Items: []v1beta1.SparkApplication: v1beta1.SparkApplication.Spec: v1beta1.SparkApplicationSpec.ImagePullSecrets: []string: ReadString: expects " or n, but found {, error found in #10 byte of ...|ecrets":[{"name":"gi|..., bigger context ...|","imagePullPolicy":"Always","imagePullSecrets":[{"name":"gitlab"}],"initContainerImage":"gcr.io/spa|...
E0701 21:01:53.621293 9 reflector.go:125] github.com/GoogleCloudPlatform/spark-on-k8s-operator/pkg/client/informers/externalversions/factory.go:119: Failed to list *v1beta1.SparkApplication: v1beta1.SparkApplicationList.Items: []v1beta1.SparkApplication: v1beta1.SparkApplication.Spec: v1beta1.SparkApplicationSpec.ImagePullSecrets: []string: ReadString: expects " or n, but found {, error found in #10 byte of ...|ecrets":[{"name":"gi|..., bigger context ...|","imagePullPolicy":"Always","imagePullSecrets":[{"name":"gitlab"}],"initContainerImage":"gcr.io/spa|...

It looks to me that the json format in minikube's secret isn't cooperating with the SparkApplication yaml.

the aforementioned secret works when deploying kind Deployment, replica set and pod.

I have changed the container Image to a gcr target but it triggers the same error with our private repository, it seems to not get passed the secret parsing.

Thank you

Most helpful comment

syntax differs from kubernetes spec.containers.imagePullSecrets - name: value pair is just value.
wrong:
-- name: mySecret

correct:
-- mySecret

>All comments

syntax differs from kubernetes spec.containers.imagePullSecrets - name: value pair is just value.
wrong:
-- name: mySecret

correct:
-- mySecret

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chenqin picture chenqin  路  3Comments

AceHack picture AceHack  路  6Comments

fisache picture fisache  路  6Comments

jgardner04 picture jgardner04  路  5Comments

andrewgdavis picture andrewgdavis  路  5Comments