{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/11123","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/11123/labels{/name}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/11123/comments","events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/11123/events","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/issues/11123","id":94526384,"number":11123,"title":"Kubernetes 0.21 with flannel on CentOS 7 ","user":{"login":"Icedroid","id":674647,"avatar_url":"https://avatars.githubusercontent.com/u/674647?v=3","gravatar_id":"","url":"https://api.github.com/users/Icedroid","html_url":"https://github.com/Icedroid","followers_url":"https://api.github.com/users/Icedroid/followers","following_url":"https://api.github.com/users/Icedroid/following{/other_user}","gists_url":"https://api.github.com/users/Icedroid/gists{/gist_id}","starred_url":"https://api.github.com/users/Icedroid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Icedroid/subscriptions","organizations_url":"https://api.github.com/users/Icedroid/orgs","repos_url":"https://api.github.com/users/Icedroid/repos","events_url":"https://api.github.com/users/Icedroid/events{/privacy}","received_events_url":"https://api.github.com/users/Icedroid/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-07-12T02:28:36Z","updated_at":"2015-07-12T22:33:16Z","closed_at":null,"body":"I have two machines installed CentOS 7, I call one is Master, the other is Node. Now how to start the k8s cluster successfully with the guide: https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/getting-started-guides/scratch.md\r\n\r\n# On the Master have done as follow:\r\n* start kubelet\r\n```\r\n$ ./kubelet --config=/etc/kubernetes/manifests\r\n```\r\n* start etcd, apiserver, scheduler, controller-manager \r\nLike scrach guide put etcd.manifest, apiserver.manifest... into /etc/kubernetes/manifests\r\n\r\n**Question 1: Only the manifests pods file put into the kubelet config dir, It will auto create a Pod and run it?  shouldn't I start these services inside contrainers ?.**\r\n As @antoineco  say:\r\n>It's also perfectly legitimate to run your Kubernetes services as host processes, and not inside containers. In this case just drop the binaries in your $PATH and forget about the master kubelet\r\n\r\n* etcdctl write the network to /coreos.com/network/config\r\n\r\netcdctl download from  https://github.com/coreos/etcd/releases/download/v0.4.5/etcd-v0.4.5-linux-amd64.tar.gz\r\n```\r\n$ etcdctl mk /coreos.com/network/config '{\"Network\":\"10.0.0.0/16\"}'\r\n```\r\n\r\n# On the Node have done as follow:\r\n* Delete the docker0\r\n```\r\n$ yum install bridge-utils\r\n$ iptables -t nat -F \r\n$ ifconfig docker0 down\r\n$ brctl delbr docker0\r\n```\r\n**Question 2: Should I run above command on the Master?**\r\n\r\n* After edit the /etc/sysconfig/docker, restart the docker with flannel network\r\n```\r\n--bip=10.0.0.0/16 --mtu=1400 --iptables=false --insecure-registry docker.myself\r\n```\r\n\r\n* Run the kubelet, kube-proxy,flanneld\r\n```\r\n$ ./kubelet --api-servers=http://$MASTER_IP --config=/etc/kubernetes/manifests --configure-cbr0=true --register-node=true\r\n$ ./kube-proxy --api-servers=http://$MASTER_IP\r\n$ ./flanneld --etcd-endpoints=http://$MASTER_IP:4001\r\n```\r\n**Question 3:  kubelet run args is right?**\r\n\r\nQuestion More&^_^: How to add iptables rule for above network? Should I add a Cluster DNS for the cluster? \r\n\r\nWait for your help. Thank you very much.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/comments/120769766","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/issues/11123#issuecomment-120769766","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/11123","id":120769766,"user":{"login":"thockin","id":5595220,"avatar_url":"https://avatars.githubusercontent.com/u/5595220?v=3","gravatar_id":"","url":"https://api.github.com/users/thockin","html_url":"https://github.com/thockin","followers_url":"https://api.github.com/users/thockin/followers","following_url":"https://api.github.com/users/thockin/following{/other_user}","gists_url":"https://api.github.com/users/thockin/gists{/gist_id}","starred_url":"https://api.github.com/users/thockin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thockin/subscriptions","organizations_url":"https://api.github.com/users/thockin/orgs","repos_url":"https://api.github.com/users/thockin/repos","events_url":"https://api.github.com/users/thockin/events{/privacy}","received_events_url":"https://api.github.com/users/thockin/received_events","type":"User","site_admin":false},"created_at":"2015-07-12T22:33:15Z","updated_at":"2015-07-12T22:33:15Z","body":"On Sat, Jul 11, 2015 at 7:29 PM, Icecream <notifications@github.com> wrote:\n\n> Question 1: Only the manifests pods file put into the kubelet config dir, It will create a Pod and run it? shouldn't I start these services inside contrainers ?.\n\nPutting those manifests in place will run pods, which includes containers.\n\n> As @antoineco say:\n>\n> It's also perfectly legitimate to run your Kubernetes services as host processes, and not inside containers. In this case just drop the binaries in your $PATH and forget about the master kubelet\n\nWe want to move towards more stuff running as containers, so it's best\nto make that work.\n\n> $yum install bridge-utils\n> $iptables -t nat -F\n> $ifconfig docker0 down\n> $brctl delbr docker0\n>\n> Question 2: Should I run above command on the Master?\n\nI think those are cleanups but maybe not strictly REQUIRED.  But yes,\nthe master should be no different in this way.\n\n> *After edit the /etc/sysconfig/docker, restart the docker with flannel network\n>\n> --bip=10.0.0.0/16--mtu=1400 --iptables=false --insecure-registry docker.myself\n\nI Think that these flags are not needed if kubelet creates its own\ncbr0, but I have not personally set up both at once.  @dchen1107 how\ndoes kubelet choose IP and MTU for cbr0?\n\n>  ./kubelet --api-servers=http://$MASTER_IP --config=/etc/kubernetes/manifests --configure-cbr0=true --register-node=true\n> ./kube-proxy --api-servers=http://$MASTER_IP\n> ./flanneld\n>\n> Question 3: kubelet run args is right?\n>\n> Should I add a Cluster DNS for the cluster?\n\nyes, you'll want DNS - that is not in the scratch doc yet.\n\nFor comparison, my nodes look like this:\n\nroot      2897  0.3  0.4  76208 16536 ?        Sl   Jul09  16:48\n/usr/local/bin/kube-proxy --master=https://kubernetes-master\n--kubeconfig=/var/lib/kube-proxy/kubeconfig --v=2\n\nroot      3030  1.4  1.4 150400 54844 ?        Sl   Jul09  75:17\n/usr/local/bin/kubelet --api_servers=https://kubernetes-master\n--enable-debugging-handlers=true --cloud_provider=gce\n--config=/etc/kubernetes/manifests --allow_privileged=False --v=2\n--cluster_dns=10.0.0.10 --cluster_domain=cluster.local\n--configure-cbr0=true --cgroup_root=/ --system-container=/system\n\nroot      3448  0.8  0.6 854064 24304 ?        Sl   Jul09  45:03\n/usr/bin/docker -d -p /var/run/docker.pid --bridge=cbr0\n--iptables=false --ip-masq=false\n"}}