Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This requires a bit of a jump #1

Open
davehodg opened this issue Nov 19, 2018 · 3 comments
Open

This requires a bit of a jump #1

davehodg opened this issue Nov 19, 2018 · 3 comments

Comments

@davehodg
Copy link

davehodg commented Nov 19, 2018

"Create 3 hosts and call them node-master, node-1 and node-2."

Needs a bit of explanation!

If I do:

$ docker run --name node-master -i -t ubuntu /bin/bash

And then do your suggested apt stuff, the kubeadm apt isn't found.

$ docker run -i -t ubuntu:16.04 /bin/bash

It was a hell of a job getting kubadm installed. Your stanza didn't work needed to add "deb http://apt.kubernetes.io/ kubernetes-xenial main" manually.

kubeadm init needed --ignore-preflight-errors=all and even then, ended with a load of:

[WARNING ImagePull]: failed to pull image k8s.gcr.io/kube-apiserver:v1.12.2: output: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

, error: exit status 1

The docker daemon isn't running despite installing docker.

@etadata
Copy link
Owner

etadata commented Nov 19, 2018

for the part 1 of the lab, you can download a preconfigured machine from here

according to the error message, it seems like the docker service isn't running

inside the node-1 and node-2

for SERVICES in kube-proxy kubelet  docker; do
    systemctl restart $SERVICES
    systemctl enable $SERVICES
    systemctl status $SERVICES
done

to see if the docker daemon is already running
systemctl status docker
docker info

to restart the services in the node-master

for SERVICES in etcd kube-apiserver kube-controller-manager kube-scheduler flanneld; do
	systemctl restart $SERVICES
	systemctl enable $SERVICES
	systemctl status $SERVICES
done

and plz make sure the DNS service is already configured
another tip: if you are running the cluster's machine has more than one NIC, then k8s will use the one which has the default route

kubeadm must be run from the node-master

@davehodg
Copy link
Author

davehodg commented Nov 19, 2018

Why the nodes? GitHub says to do the kube stuff on the master.

Trying your image now. Oh, link didn't work.

@etadata
Copy link
Owner

etadata commented Nov 19, 2018

exactly, the kube staff should be on the master. and you have to administrate the nodes using kubectl from the master.
i didn't upload a preconfigured VM. i used the GCP to create k8s cluster.
if you would like to create k8s cluster by yourself try to download this ubuntu iso
and follow the steps in the option.

I will be glad to help you create ur cluster

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants