GithubHelp home page GithubHelp logo

kubeadm-installer's Introduction

kubeadm installer for CoreOS, Ubuntu, Debian, CentOS and Fedora

MAINTAINER HAS SWITCHED !

Use https://github.com/xakraz/kubeadm-installer for the latest update and PRs

How to run install kubeadm

Given docker already is installed (otherwise, run curl get.docker.com | bash), you can install kubeadm easily!

$ docker run -it \
	-v /etc/cni:/rootfs/etc/cni \
	-v /etc/systemd:/rootfs/etc/systemd \
	-v /opt:/rootfs/opt \
	-v /usr/bin:/rootfs/usr/bin \
	luxas/kubeadm-installer ${your_os_here}

${your_os_here} can be coreos, ubuntu, debian, fedora or centos

How to uninstall/revert

$ docker run -it 	\
	-v /etc/cni:/rootfs/etc/cni \
	-v /etc/systemd:/rootfs/etc/systemd \
	-v /opt:/rootfs/opt \
	-v /usr/bin:/rootfs/usr/bin \
	luxas/kubeadm-installer ${your_os_here} uninstall

What's inside?

License

MIT

kubeadm-installer's People

Contributors

luxas avatar xakraz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

kubeadm-installer's Issues

Pre-existing ETCD cluster needed?

Do I have to create an etcd cluster for the bare metal machines I plan on using first for CoreOS? Or does Kubernetes(By that I mean kubeadm) configure that for me because all the minions end up pointing to the master, anyway?

Also, I cannot post issues on the new maintainer's repo because it's still a fork of this project. Not sure how to solve that on Github but if the new maintainer wants to solve issues, he needs his own repo.

@xakraz

Transfer ownership ?

Hello @luxas

Thanks for having given me the opportunity to maintain this tool.

Would you transfer me the repo so that every other forks refer to the me now ?

Thx

Note: I will have to delete my fork 1st before accepting your transfer. So ping me when you are available and ready to do it :)

Instructions are wrong

Should be:

$ docker run -it -v /etc/cni:/rootfs/etc/cni -v /etc/systemd:/rootfs/etc/systemd -v /opt:/rootfs/opt -v /usr/bin:/rootfs/usr/bin luxas/kubeadm-installer ${your_os_here}

kublet.service looking for kubelet.conf file that doesn't exist

Trying to bootstrap a Container Linux (CoreOS) cluster with kubeadm-installer, thanks for all the good work!
My node's kubelet is failing to start looking for a kubelet.conf file that does not exist on the system. I don't see one generated by the installer, is this a change in kubeadm setup? Should I be providing one for the system?
Logs:

Jan 21 14:23:07 core-01-node systemd[1]: kubelet.service: Scheduled restart job, restart counter is at 1.              
Jan 21 14:23:07 core-01-node systemd[1]: Stopped kubelet: The Kubernetes Node Agent.                                   
Jan 21 14:23:07 core-01-node systemd[1]: Started kubelet: The Kubernetes Node Agent.                                   
Jan 21 14:23:07 core-01-node kubelet-wrapper[1936]: KUBELET_VERSION environment variable is deprecated, please use KUBELET_IMAGE_TAG instead                                                                                                   
Jan 21 14:23:07 core-01-node kubelet-wrapper[1936]: + exec /usr/bin/rkt run --volume opt-cni,kind=host,source=/opt/cni --mount volume=opt-cni,target=/opt/cni --volume etc-cni,kind=host,source=/etc/cni --mount volume=etc-cni,target=/etc/cni
Jan 21 14:23:08 core-01-node kubelet-wrapper[1936]: Flag --require-kubeconfig has been deprecated, You no longer need to use --require-kubeconfig. This will be removed in a future version. Providing --kubeconfig enables API server mode, om
Jan 21 14:23:08 core-01-node kubelet-wrapper[1936]: I0121 14:23:08.812095    1936 server.go:182] Version: v1.9.2+coreos.0                                                                                                                      
Jan 21 14:23:08 core-01-node kubelet-wrapper[1936]: I0121 14:23:08.812326    1936 feature_gate.go:220] feature gates: &{{} map[]}                                                                                                              
Jan 21 14:23:08 core-01-node kubelet-wrapper[1936]: W0121 14:23:08.812621    1936 server.go:280] --require-kubeconfig is deprecated. Set --kubeconfig without using --require-kubeconfig.                                                      
Jan 21 14:23:08 core-01-node kubelet-wrapper[1936]: W0121 14:23:08.812979    1936 cni.go:171] Unable to update cni config: No networks found in /etc/cni/net.d                                                                                 
Jan 21 14:23:08 core-01-node kubelet-wrapper[1936]: I0121 14:23:08.835305    1936 plugins.go:101] No cloud provider specified.                                                                                                                 
Jan 21 14:23:08 core-01-node kubelet-wrapper[1936]: Error: failed to run Kubelet: invalid kubeconfig: stat /etc/kubernetes/kubelet.conf: no such file or directory                                                             

kubelet.service file:

  [Unit]
  Description=kubelet: The Kubernetes Node Agent
  Documentation=http://kubernetes.io/docs/

  [Service]
  Environment="KUBELET_VERSION=v1.9.2_coreos.0"
  Environment="KUBELET_IMAGE_TAG=v1.9.2_coreos.0"
  Environment="RKT_RUN_ARGS=--volume opt-cni,kind=host,source=/opt/cni --mount volume=opt-cni,target=/opt/cni --volume etc-cni,kind=host,source=/etc/cni --mount volume=etc-cni,target=/etc/cni"
  ExecStart=/usr/lib/coreos/kubelet-wrapper --kubeconfig=/etc/kubernetes/kubelet.conf     --require-kubeconfig=true     --pod-manifest-path=/etc/kubernetes/manifests     --allow-privileged=true     --network-plugin=cni     --cni-conf-dir=/etc/cni/net.d --cni-bin-dir=/opt/cni/bin     --cluster-dns=10.96.0.10 --cluster-domain=cluster.local
  Restart=always
  StartLimitInterval=0
  RestartSec=10

  [Install]
  WantedBy=multi-user.target

CoreOS v 1662.0.0
I'm pulling the 'latest' tag on the kubeadm-installer

@xakraz

coreos not working

i am trying to run it on CoreOS
DISTRIB_ID="Container Linux by CoreOS"
DISTRIB_RELEASE=1967.6.0

docker run -it -v /etc/cni:/rootfs/etc/cni -v /etc/systemd:/rootfs/etc/systemd -v /opt:/rootfs/opt -v

/usr/bin:/rootfs/usr/bin luxas/kubeadm-installer coreos
Installed kubectl in /opt/bin/kubectl
Ignoring /opt/bin/kubelet, since it seems to exist already or isn't needed
Installed kubeadm in /opt/bin/kubeadm
Installed CNI binaries in /opt/cni
Installed the kubelet.service in /etc/systemd/system/kubelet.service
/entrypoint.sh: line 97: /etc/systemd/network/50-cni.network: No such file or directory
Installed 50-cni.network in /etc/systemd/network/50-cni.network
Done! Now run this in your terminal to enable docker and kubelet:

systemctl daemon-reload
systemctl enable docker kubelet
systemctl restart docker kubelet

localhost ~ # /opt/bin/kubeadm init
/opt/bin/kubeadm: line 1: syntax error near unexpected token <' /opt/bin/kubeadm: line 1: NoSuchKeyThe specified key does not exist.

No such object: kubernetes-release-dev/ci-cross/v1.6.0-alpha.0.2074+a092d8e0f95f52/bin/linux/amd64/kubeadm
'

cat /opt/bin/kubeadm

NoSuchKeyThe specified key does not exist.
No such object: kubernetes-release-dev/ci-cross/v1.6.0-alpha.0.2074+a092d8e0f95f52/bin/linux/amd64/kubeadm

Please help..
What am I doing something wrong?

kubelet-wrapper doesn't start any manifest

The kubeadm-installer is using the kubelet-wrapper from CoreOS and none of the static pod is started from the manifests. I assume it's a kubelet-wrapper issue as I cannot reproduce it on different OS where standard Kubelet bin is used.
Would there be another way to use kubeadm on CoreOS nodes ?

Attached is the kubelet log with --v=6
kubelet.txt

"Unbound variable" error when using "default" action (not providing any on the CLI)

https://github.com/xakraz/kubeadm-installer/blob/master/files/entrypoint.sh#L168

$ docker run --rm -it \
>   --env="http_proxy=http://XXXX:3128" \
>   --env="https_proxy=http://XXXX:3128" \
>   --env="KUBEADM_RELEASE=v1.6.1" \
>   --volume=/etc/cni:/rootfs/etc/cni \
>   --volume=/etc/systemd:/rootfs/etc/systemd \
>   --volume=/opt:/rootfs/opt \
>   --volume=/usr/bin:/rootfs/usr/bin \
>   xakra/kubeadm-installer coreos

Unable to find image 'xakra/kubeadm-installer:latest' locally
latest: Pulling from xakra/kubeadm-installer
2aecc7e1714b: Pull complete 
8f7b96c2ad68: Pull complete 
5918ece632fc: Pull complete 
Digest: sha256:a5c7f579e7c9f612d1a613e7c3d6330a41748af83fd1fdc572b66c6e9e2be389
Status: Downloaded newer image for xakra/kubeadm-installer:latest

[ENV] 'K8S_VERSION' is empty -> Getting latest release version
[ENV] 'K8S_VERSION' = v1.6.6
[ENV] 'KUBEADM_RELEASE' = v1.6.1
[ENV] 'CNI_RELEASE' is empty -> Getting latest release version
[ENV] 'CNI_RELEASE' = v0.5.2
[Kubeadm] Selected version: v1.6.1
[Kubeadm] KUBEADM_RELEASE v1.6.1 is a Release version
[Kubeadm] Download url: https://storage.googleapis.com/kubernetes-release/release
[CNI] Selected version: v0.5.2
[CNI] CNI_RELEASE v0.5.2 is a Release version
[CNI] Download url: https://github.com/containernetworking/cni/releases/download/v0.5.2/cni-amd64-v0.5.2.tgz

/entrypoint.sh: line 168: $2: unbound variable

[coreos] Missing ${ROOTFS}

On Container Linux 1353.1.0 the script fails with:

/entrypoint.sh: line 97: /etc/systemd/network/50-cni.network: No such file or directory
Installed 50-cni.network in /etc/systemd/network/50-cni.network
(...)

core@kovh ~ $ ls -l /etc/systemd/network/
total 0

That's because of a missing ${ROOTFS}/ on the line cat > /etc/systemd/network/50-cni.network.

I can't send PR because the script distributed with the luxas/kubeadm-installer on the Docker Hub doesn't match the script in the current repo.

socat missing for CoreOS

preflight checks exit with:

core@ip-10-0-1-121 ~ $ sudo kubeadm init
Running pre-flight checks
preflight check errors:
	socat not found in system path

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.