-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Creating deployment for nginx for Azure fails with ReadString: expects " or n, but found error #2951
Comments
@shashank-g172 |
Here's the kubectl version output: |
You're using the When you use Please refer to the fabric8 documentation to find out how to do wüst you're trying to do. |
@aledbf not an issue |
I read this in Slack today and it reminded me of that issue: |
Is this a request for help? : Yes.
What keywords did you search in NGINX Ingress controller issues before filing this one? (If you have found any duplicates, you should instead reply there.): Azure, nginx,
Is this a BUG REPORT or FEATURE REQUEST? : Really not sure, but it's just a question.
NGINX Ingress controller version:
Kubernetes version (use
kubectl version
): Client Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.2", GitCommit:"bb9ffb1654d4a729bb4cec18ff088eacc153c239", GitTreeState:"clean", BuildDate:"2018-08-07T23:17:28Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"windows/amd64"}Environment:
uname -a
):What happened: When I try to deploy the suggested nginx controller yaml file as descibed here: https://kubernetes.github.io/ingress-nginx/deploy/#azure - The deployment fails with this response: Failure executing: POST at : https://{clusterEndpoint}/apis/extensions/v1beta1/namespaces/ingress-nginx/deployments Message: Service in version "v1" cannot be handled as a Deployment: v1.Service.Spec: v1.ServiceSpec.Selector: ReadString: expects " or n, but found [, error found in #10 byte of ...|essions":[],"app":"i|..., bigger context ...|nces":[]},"spec":{"selector":{"matchExpressions":[],"app":"ingress-nginx"},"externalTrafficPolicy":"|.... Received status: Status(apiVersion=v1, code=400, details=null, kind=Status, message=Service in version "v1" cannot be handled as a Deployment: v1.Service.Spec: v1.ServiceSpec.Selector: ReadString: expects " or n, but found [, error found in #10 byte of ...|essions":[],"app":"i|..., bigger context ...|nces":[]},"spec":{"selector":{"matchExpressions":[],"app":"ingress-nginx"},"externalTrafficPolicy":"|..., metadata=ListMeta(resourceVersion=null, selfLink=null, additionalProperties={}), reason=BadRequest, status=Failure, additionalProperties={}).
What you expected to happen: The deployment should go through as expected especially since I'm using a copied over yaml file.
How to reproduce it (as minimally and precisely as possible): I'm trying to do this through the Fabric8 java REST client.
For brevity and simplification, I'm assuming here that the Kubernetes client object has been instantiated, and using the easiest readable form of code:
private void doNginxStuff(KubernetesClient instantiateKubernetesClient) throws FileNotFoundException {
File initialFile = new File("src/main/resources/nginx-controller.yaml");
InputStream targetStream = new FileInputStream(initialFile);
instantiateKubernetesClient.extensions().deployments().load(targetStream).create();
}
And here's the nginx-controller.yaml file:
kind: Service
apiVersion: v1
metadata:
name: ingress-nginx
namespace: ingress-nginx
labels:
app: ingress-nginx
spec:
externalTrafficPolicy: Local
type: LoadBalancer
selector:
app: ingress-nginx
ports:
port: 80
targetPort: http
port: 443
targetPort: https
Anything else we need to know: I'm unsure about whether this is the right channel to ask for help, and I'm not sure if this a bug report or not. What's interesting is that in the response from the POST to the deployment, the version of the apis/extensions is v1beta1 but the yaml file is v1.
The text was updated successfully, but these errors were encountered: