{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubectl/issues/519","repository_url":"https://api.github.com/repos/kubernetes/kubectl","labels_url":"https://api.github.com/repos/kubernetes/kubectl/issues/519/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubectl/issues/519/comments","events_url":"https://api.github.com/repos/kubernetes/kubectl/issues/519/events","html_url":"https://github.com/kubernetes/kubectl/issues/519","id":349584130,"node_id":"MDU6SXNzdWUzNDk1ODQxMzA=","number":519,"title":"[Windows] kubectl run not accepting valid JSON as --override on Windows (same JSON works on Mac) ","user":{"login":"psreed","id":18173185,"node_id":"MDQ6VXNlcjE4MTczMTg1","avatar_url":"https://avatars3.githubusercontent.com/u/18173185?v=4","gravatar_id":"","url":"https://api.github.com/users/psreed","html_url":"https://github.com/psreed","followers_url":"https://api.github.com/users/psreed/followers","following_url":"https://api.github.com/users/psreed/following{/other_user}","gists_url":"https://api.github.com/users/psreed/gists{/gist_id}","starred_url":"https://api.github.com/users/psreed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/psreed/subscriptions","organizations_url":"https://api.github.com/users/psreed/orgs","repos_url":"https://api.github.com/users/psreed/repos","events_url":"https://api.github.com/users/psreed/events{/privacy}","received_events_url":"https://api.github.com/users/psreed/received_events","type":"User","site_admin":false},"labels":[{"id":631708731,"node_id":"MDU6TGFiZWw2MzE3MDg3MzE=","url":"https://api.github.com/repos/kubernetes/kubectl/labels/area/kubectl","name":"area/kubectl","color":"0052cc","default":false},{"id":631708749,"node_id":"MDU6TGFiZWw2MzE3MDg3NDk=","url":"https://api.github.com/repos/kubernetes/kubectl/labels/kind/bug","name":"kind/bug","color":"e11d21","default":false},{"id":631708775,"node_id":"MDU6TGFiZWw2MzE3MDg3NzU=","url":"https://api.github.com/repos/kubernetes/kubectl/labels/priority/P2","name":"priority/P2","color":"ededed","default":false},{"id":631708835,"node_id":"MDU6TGFiZWw2MzE3MDg4MzU=","url":"https://api.github.com/repos/kubernetes/kubectl/labels/sig/cli","name":"sig/cli","color":"d2b48c","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-08-10T16:42:25Z","updated_at":"2018-10-26T10:34:46Z","closed_at":null,"author_association":"NONE","body":"/kind bug\r\n\r\n**What happened**:\r\n- \"kubectl run\" with --overrides is rejected with \"error: Invalid JSON Patch\" on WINDOWS\r\n- exact same command verified works fine on MacOS\r\n\r\n**What you expected to happen**:\r\nPatch applied to my kubectl run. See proper expected output from Mac OS run below.\r\n\r\n**How to reproduce it (as minimally and precisely as possible)**:\r\n```\r\nkubectl run pfa --image=myimage --overrides='{\"apiVersion\":\"apps/v1beta1\",\"spec\":{\"template\":{\"spec\":{\"imagePullSecrets\":[{\"name\":\"myregkey\"}]}}}}' --dry-run -o yaml\r\n```\r\n**Anything else we need to know?**:\r\nOutput on Windows:\r\n```\r\nerror: Invalid JSON Patch\r\n```\r\n\r\nOutput on Windows (with -v6 added to the end of the command):\r\n```\r\nI0810 12:11:06.986876  135292 round_trippers.go:405] GET https://192.168.99.100:8443/apis/apps/v1beta1?timeout=32s 200 OK in 11 milliseconds\r\nI0810 12:11:06.987852  135292 loader.go:359] Config loaded from file C:\\Users\\paul/.kube/config\r\nF0810 12:11:06.992733  135292 helpers.go:119] error: Invalid JSON Patch\r\n```\r\n\r\nOutput on MacOS:\r\n```apiVersion: apps/v1beta1\r\nkind: Deployment\r\nmetadata:\r\n  creationTimestamp: null\r\n  labels:\r\n    run: pfa\r\n  name: pfa\r\nspec:\r\n  progressDeadlineSeconds: 600\r\n  replicas: 1\r\n  revisionHistoryLimit: 2\r\n  selector:\r\n    matchLabels:\r\n      run: pfa\r\n  strategy:\r\n    rollingUpdate:\r\n      maxSurge: 25%\r\n      maxUnavailable: 25%\r\n    type: RollingUpdate\r\n  template:\r\n    metadata:\r\n      creationTimestamp: null\r\n      labels:\r\n        run: pfa\r\n    spec:\r\n      containers:\r\n      - image: myimage\r\n        imagePullPolicy: Always\r\n        name: pfa\r\n        resources: {}\r\n        terminationMessagePath: /dev/termination-log\r\n        terminationMessagePolicy: File\r\n      dnsPolicy: ClusterFirst\r\n      imagePullSecrets:\r\n      - name: myregkey\r\n      restartPolicy: Always\r\n      schedulerName: default-scheduler\r\n      securityContext: {}\r\n      terminationGracePeriodSeconds: 30\r\nstatus: {}\r\n```\r\n\r\n\r\n**Environment**:\r\n- Kubernetes version (use `kubectl version`):\r\nWindows Version:\r\n```\r\nClient 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\"}\r\nServer Version: version.Info{Major:\"1\", Minor:\"10\", GitVersion:\"v1.10.0\", GitCommit:\"fc32d2f3698e36b93322a3465f63a14e9f0eaead\", GitTreeState:\"clean\", BuildDate:\"2018-03-26T16:44:10Z\", GoVersion:\"go1.9.3\", Compiler:\"gc\", Platform:\"linux/amd64\"}\r\n```\r\n\r\nMac OS Version:\r\n```\r\nClient Version: version.Info{Major:\"1\", Minor:\"11\", GitVersion:\"v1.11.2\", GitCommit:\"bb9ffb1654d4a729bb4cec18ff088eacc153c239\", GitTreeState:\"clean\", BuildDate:\"2018-08-08T16:31:10Z\", GoVersion:\"go1.10.3\", Compiler:\"gc\", Platform:\"darwin/amd64\"}\r\nServer Version: version.Info{Major:\"1\", Minor:\"10\", GitVersion:\"v1.10.0\", GitCommit:\"fc32d2f3698e36b93322a3465f63a14e9f0eaead\", GitTreeState:\"clean\", BuildDate:\"2018-03-26T16:44:10Z\", GoVersion:\"go1.9.3\", Compiler:\"gc\", Platform:\"linux/amd64\"}\r\n```\r\n\r\n- Cloud provider or hardware configuration:\r\nusing minikube 0.28.2 with --vm-driver=virtualbox in both Windows and Mac OS cases.\r\n\r\n- OS (e.g. from /etc/os-release):\r\nWindows 10 & MacOS\r\n- Kernel (e.g. `uname -a`):\r\nDarwin <my_machine_name> 17.7.0 Darwin Kernel Version 17.7.0: Thu Jun 21 22:53:14 PDT 2018; root:xnu-4570.71.2~1/RELEASE_X86_64 x86_64\r\n\r\n- Install tools:\r\nminikube and kubernetes-cli installed using brew on MacOS, and using chocolatey on Windows.\r\n- Others:\r\n"},"comment":{"url":"https://api.github.com/repos/kubernetes/kubectl/issues/comments/433365322","html_url":"https://github.com/kubernetes/kubectl/issues/519#issuecomment-433365322","issue_url":"https://api.github.com/repos/kubernetes/kubectl/issues/519","id":433365322,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMzM2NTMyMg==","user":{"login":"vithati","id":19663618,"node_id":"MDQ6VXNlcjE5NjYzNjE4","avatar_url":"https://avatars2.githubusercontent.com/u/19663618?v=4","gravatar_id":"","url":"https://api.github.com/users/vithati","html_url":"https://github.com/vithati","followers_url":"https://api.github.com/users/vithati/followers","following_url":"https://api.github.com/users/vithati/following{/other_user}","gists_url":"https://api.github.com/users/vithati/gists{/gist_id}","starred_url":"https://api.github.com/users/vithati/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vithati/subscriptions","organizations_url":"https://api.github.com/users/vithati/orgs","repos_url":"https://api.github.com/users/vithati/repos","events_url":"https://api.github.com/users/vithati/events{/privacy}","received_events_url":"https://api.github.com/users/vithati/received_events","type":"User","site_admin":false},"created_at":"2018-10-26T10:34:46Z","updated_at":"2018-10-26T10:34:46Z","author_association":"NONE","body":"Using \" instead of ' around --overrides input working for me in Windows. example:- kubectl run test --image=myimage --overrides=\"{\\\"apiVersion\\\":\\\"apps/v1beta1\\\",\\\"spec\\\":{\\\"template\\\":{\\\"spec\\\":{\\\"imagePullSecrets\\\":[{\\\"name\\\":\\\"myregkey\\\"}]}}}}\" --dry-run -o yaml"}}
{"actor":{"display_login":"vithati"}}