kubernetes installation on coreOS

7/14/2015

I am setting up Kubernetes on coreOS, on GCE. However, it is not going through due to the SDK dependency on Python. I downloaded python and tried installing it, but it is looking for a C compiler. Unfortunately I couldn't get one. Could someone help with this? Below is the link I am following to set this up https://github.com/rimusz/coreos-multi-node-k8s-gce/blob/master/README.md

-- user2417975
coreos
google-cloud-platform
google-compute-engine
kubernetes

1 Answer

7/14/2015

You're probably better off using a cloud-init file that curls, installs and runs each binary for kubernetes as a systemd unit. So each would look like:

- name: kube-apiserver.service
  command: start
  content: |
    [Unit]
    Description=Kubernetes API Server
    Documentation=https://github.com/GoogleCloudPlatform/kubernetes
    Requires=etcd2.service setup-network-environment.service
    After=etcd2.service setup-network-environment.service
    [Service]
    EnvironmentFile=/etc/network-environment
    ExecStartPre=-/usr/bin/mkdir -p /opt/bin
    ExecStartPre=/usr/bin/curl -L -o /opt/bin/kube-apiserver -z /opt/bin/kube-apiserver https://storage.googleapis.com/kubernetes-release/release/v0.18.2/bin/linux/amd64/kube-apiserver
    ExecStartPre=/usr/bin/chmod +x /opt/bin/kube-apiserver
    ExecStartPre=/usr/bin/curl -L -o /opt/bin/kubectl -z /opt/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/v0.18.2/bin/linux/amd64/kubectl
    ExecStartPre=/usr/bin/chmod 755 /opt/bin/kubectl
    ExecStart=/opt/bin/kube-apiserver --portal_net=10.244.0.0/16 --etcd_servers=http://127.0.0.1:4001 --logtostderr=true --insecure_port=8080 --insecure_bind_address=0.0.0.0
    Restart=always
    RestartSec=10

And similar for each other binary. Just make sure you set them up to follow the chain of dependencies. This way the binaries are already compiled, compiling is something that coreos isn't exactly designed for.

-- Christian Grabowski
Source: StackOverflow