{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kops/issues/2830","repository_url":"https://api.github.com/repos/kubernetes/kops","labels_url":"https://api.github.com/repos/kubernetes/kops/issues/2830/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kops/issues/2830/comments","events_url":"https://api.github.com/repos/kubernetes/kops/issues/2830/events","html_url":"https://github.com/kubernetes/kops/issues/2830","id":239454978,"number":2830,"title":"Field cannot be changed: CIDR","user":{"login":"doubaokun","id":313478,"avatar_url":"https://avatars2.githubusercontent.com/u/313478?v=4","gravatar_id":"","url":"https://api.github.com/users/doubaokun","html_url":"https://github.com/doubaokun","followers_url":"https://api.github.com/users/doubaokun/followers","following_url":"https://api.github.com/users/doubaokun/following{/other_user}","gists_url":"https://api.github.com/users/doubaokun/gists{/gist_id}","starred_url":"https://api.github.com/users/doubaokun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doubaokun/subscriptions","organizations_url":"https://api.github.com/users/doubaokun/orgs","repos_url":"https://api.github.com/users/doubaokun/repos","events_url":"https://api.github.com/users/doubaokun/events{/privacy}","received_events_url":"https://api.github.com/users/doubaokun/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2017-06-29T11:57:27Z","updated_at":"2018-02-15T17:18:05Z","closed_at":null,"author_association":"NONE","body":"kops version\r\nVersion 1.6.2\r\n\r\nWhen create cluster in an pre-defined subnet 10.10.32.0/20 inside an existing VPC, received the error: Field cannot be changed: CIDR.\r\n\r\n`kops create cluster stage.cluster --state s3://cluster-status --network-cidr 10.10.32.0/20`\r\n\r\n```\r\nI0629 12:53:33.398443   98978 create_cluster.go:841] Using SSH public key: private/id_rsa.pub\r\nI0629 12:53:34.238304   98978 subnets.go:183] Assigned CIDR 10.10.34.0/23 to subnet eu-west-2a\r\nI0629 12:53:34.238328   98978 subnets.go:197] Assigned CIDR 10.10.32.0/26 to subnet utility-eu-west-2a\r\nPreviewing changes that will be made:\r\n\r\nI0629 12:53:37.312653   98978 dns.go:91] Private DNS: skipping DNS validation\r\nI0629 12:53:37.317943   98978 executor.go:91] Tasks: 0 done / 75 total; 34 can run\r\nW0629 12:53:38.167222   98978 executor.go:109] error running task \"VPC/stage.cluster\" (9m59s remaining to succeed): Field cannot be changed: CIDR\r\nI0629 12:53:38.167260   98978 executor.go:91] Tasks: 33 done / 75 total; 5 can run\r\nW0629 12:53:38.446064   98978 executor.go:109] error running task \"VPC/stage.cluster\" (9m58s remaining to succeed): Field cannot be changed: CIDR\r\nI0629 12:53:38.446092   98978 executor.go:91] Tasks: 37 done / 75 total; 1 can run\r\nW0629 12:53:38.691914   98978 executor.go:109] error running task \"VPC/stage.cluster\" (9m58s remaining to succeed): Field cannot be changed: CIDR\r\nI0629 12:53:38.691942   98978 executor.go:124] No progress made, sleeping before retrying 1 failed task(s)\r\n```\r\n\r\n\r\n```\r\nI0629 12:59:56.396055   99187 executor.go:91] Tasks: 37 done / 75 total; 1 can run\r\nI0629 12:59:56.396107   99187 executor.go:157] Executing task \"VPC/stage.cluster\": *awstasks.VPC {\"Name\":\"stage.cluster\",\"ID\":\"vpc-c80b8ba1\",\"CIDR\":\"10.10.32.0/20\",\"EnableDNSHostnames\":null,\"EnableDNSSupport\":true,\"Shared\":true,\"Tags\":{\"KubernetesCluster\":\"stage.cluster\",\"Name\":\"stage.cluster\",\"kubernetes.io/cluster/stage.cluster\":\"shared\"}}\r\nI0629 12:59:56.396304   99187 request_logger.go:45] AWS request: ec2/DescribeVpcs\r\nI0629 12:59:56.586846   99187 vpc.go:82] found matching VPC *awstasks.VPC {\"Name\":\"aws-vpc\",\"ID\":\"vpc-c80b8ba1\",\"CIDR\":\"10.10.0.0/16\",\"EnableDNSHostnames\":null,\"EnableDNSSupport\":null,\"Shared\":null,\"Tags\":{\"Name\":\"aws-vpc\"}}\r\nI0629 12:59:56.586951   99187 request_logger.go:45] AWS request: ec2/DescribeVpcAttribute\r\nI0629 12:59:56.688154   99187 request_logger.go:45] AWS request: ec2/DescribeVpcAttribute\r\nI0629 12:59:56.769476   99187 changes.go:80] Field changed \"Name\" actual=\"aws-vpc\" expected=\"stage.cluster\"\r\nI0629 12:59:56.769503   99187 changes.go:80] Field changed \"CIDR\" actual=\"10.10.0.0/16\" expected=\"10.10.32.0/20\"\r\nI0629 12:59:56.769525   99187 changes.go:80] Field changed \"Tags\" actual=\"map[Name:aws-vpc]\" expected=\"map[kubernetes.io/cluster/stage.cluster:shared KubernetesCluster:stage.cluster Name:stage.cluster]\"\r\nW0629 12:59:56.769590   99187 executor.go:109] error running task \"VPC/stage.cluster\" (9m38s remaining to succeed): Field cannot be changed: CIDR\r\nI0629 12:59:56.769606   99187 executor.go:124] No progress made, sleeping before retrying 1 failed task(s)\r\n```"},"comment":{"url":"https://api.github.com/repos/kubernetes/kops/issues/comments/365998166","html_url":"https://github.com/kubernetes/kops/issues/2830#issuecomment-365998166","issue_url":"https://api.github.com/repos/kubernetes/kops/issues/2830","id":365998166,"user":{"login":"smcquay","id":333234,"avatar_url":"https://avatars1.githubusercontent.com/u/333234?v=4","gravatar_id":"","url":"https://api.github.com/users/smcquay","html_url":"https://github.com/smcquay","followers_url":"https://api.github.com/users/smcquay/followers","following_url":"https://api.github.com/users/smcquay/following{/other_user}","gists_url":"https://api.github.com/users/smcquay/gists{/gist_id}","starred_url":"https://api.github.com/users/smcquay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smcquay/subscriptions","organizations_url":"https://api.github.com/users/smcquay/orgs","repos_url":"https://api.github.com/users/smcquay/repos","events_url":"https://api.github.com/users/smcquay/events{/privacy}","received_events_url":"https://api.github.com/users/smcquay/received_events","type":"User","site_admin":false},"created_at":"2018-02-15T17:18:05Z","updated_at":"2018-02-15T17:18:05Z","author_association":"NONE","body":"@chrislovecnm: I'm going to add that this flag has also confused me.\r\n\r\nI have an AWS VPC with the CIDR `10.10.0.0/16` and I'd like the kubernetes cluster to only use `10.10.168.0/21` (as much of the network address space is already being used). When I try to run:\r\n\r\n```\r\nkops create cluster \\\r\n    --cloud=aws \\\r\n    --zones us-west-1a \\\r\n    --name=k8s-kops-poc-00.infra.poc.aun1.i.wish.com \\\r\n    --vpc vpc-<redacted> \\\r\n    --networking amazon-vpc-routed-eni \\\r\n    --master-size c4.xlarge \\\r\n    --kubernetes-version 1.9.2 \\\r\n    --network-cidr 10.10.168.0/21 \\\r\n    --node-count 4 \\\r\n    --node-size m4.2xlarge \\\r\n    --state s3://sm-k8s-kops-state-store \r\n```\r\n\r\nI get the same error.\r\n\r\nI'm pretty new to the `kops` project (trying it out for the first time) but I'm more than happy to dive into the code and figure out what's not working as we expect and fix it. I'm going to start [here](https://github.com/kubernetes/kops/blob/master/docs/development/adding_a_feature.md), but am happy to engage with whomever/however to design the appropriate solution here."}}
{"actor":{"display_login":"smcquay"}}