-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
oc cluster join -- how to use? #13336
Comments
let me know if you need help this task, i will try my best |
@debianmaster sorry I haven't had time to look into this. But, if you want to try it out, the secret that it's expecting is the contents of |
i tried pasting the content of |
@csrwng can you help me with this? i'm trying to automate platform scaling and i do not want to do it in a non- standard way |
@debianmaster |
I am interested in this as well, although I haven't had time to test it, yet. @debianmaster I think the intended usecase is a bit different from yours, as stated in #9547
As I understand it you'd be bootstrapping that container on your machine as a node host to the cluster that is existing somewhere else. Question is are you supposed to run I am imagining a use case where on one reasonably available bare-metal host I want to run an all-in-one setup (like Can anybody give an indication whether joining clusters to federations is something that will likely be supported within |
😢 waiting..... |
just a heads u to thoose following this thread, the paste is waiting for a EOF on the file, so paste it in, and then hit CTRL-D |
did that work for you? what config file did you use? kubeconfig? @joshprismon |
@smarterclayton Do you have a 2 liner on how to use this? |
oc cluster join Don't work. [root@c7 ~]# oc cluster join
Please paste the contents of your secret here and hit ENTER:
123456-- Checking OpenShift client ... OK
-- Checking Docker client ... OK
-- Checking Docker version ... OK
-- Checking for existing OpenShift container ...
Deleted existing OpenShift container
-- Checking for openshift/origin:v3.6.0-alpha.2 image ... OK
-- Checking Docker daemon configuration ... OK
-- Checking for available ports ... OK
-- Checking type of volume mount ...
Using nsenter mounter for OpenShift volumes
-- Creating host directories ... OK
-- Finding server IP ...
Using 127.0.0.1 as the server IP
-- Joining OpenShift cluster ...
Starting OpenShift Node using container 'origin'
FAIL
Error: could not start OpenShift container "origin"
Details:
Last 10 lines of "origin" container log:
error: --kubeconfig must be set to provide API server connection information |
:) waiting...... |
@debianmaster Hi, can you please tell me what is the "secret"? I checked |
@wydwww still no luck. there is no good doc. |
@xiaoping378: after it fails, try to run
so it looks like there is some issue with passing the correct arguments around. But I'm trying it with OSE 3.7-to-be. |
Of course, that |
I've now retried with OpenShift Origin v3.6.1, on RHEL. On the master:
The
I've copied that file to second RHEL machine on which I plan to run On the second machine:
So I believe the problem is that I have even tried to use
or replace the IP address in
with the master, to no avail. @smarterclayton, how is the |
I don't want to create a new ticket for this issue, so I will comments on this one. --host-data-dir doesn't work Volume /var/lib/origin/openshift.local.config not define
wrong cgroup driver used
Otherwise kublet refuse to start with the following error message:
For adventurous people: I manage to get the node started by running something similar:
|
Re: join - starting with 3.7 we are officially supporting the bootstrap
path for nodes. join needs to be updated to work with it (and has not done
so), so please stay tuned. To see how bootstrapping is used, you can look
at openshift-ansible
https://github.com/openshift/openshift-ansible/blob/ec564267f4a25036c92a71be481cfd9e4c03537a/roles/openshift_node/tasks/bootstrap.yml
Briefly, start a master with the following settings in master-config.yml
kubernetesMasterConfig:
controllerArguments:
cluster-signing-cert-file:
- ca.crt
cluster-signing-key-file:
- ca.key
Create a new bootstrap config
oc sa create-kubeconfig -n openshift-infra node-bootstrapper >
/tmp/kubeconfig
Create a new node-config.yml file inside of a config map in the
openshift-node namespace as node-config (can give it any name) that will
form the template for the node.
Then run
openshift start node --bootstrap-config-name=node-config
--kubeconfig=/tmp/kubeconfig --config=/etc/origin/node/node-config.yml
The last flag determines where the bootstrap configuration is written to -
if there are any contents in this file, it is overwritten.
When the node starts, it'll say it's waiting for signed credentials. As an
admin on the master, do:
oc get csr | xargs oc adm certificate approve
once, and you should see a single cert approved (the node's client cert).
Then run it again and you should see the serving cert signed.
The node should then start up, download the node-config config map, update
its arguments, and then run.
…On Thu, Nov 16, 2017 at 9:00 PM, Patrik Dufresne ***@***.***> wrote:
I don't want to create a new ticket for this issue, so I will comments on
this one.
The oc cluster join command is broken in v3.6.1, here how:
*--host-data-dir doesn't work*
When executing oc cluster join --use-existing-config
--host-data-dir=/var/lib/origin/openshift.local.volumes --secret="$(cat
kubeconfig)", the generated docker container doesn't have the proper
volume created.
--volume="/var/lib/origin/openshift.local.config:/var/
lib/origin/openshift.local.config:z" is missing.
*Volume /var/lib/origin/openshift.local.config not define*
Even without --host-data-dir, the docker container doesn't have any
volume for /var/lib/origin/openshift.local.config. Basically, the certs
will be lost the next time we run oc cluster join again. You will get
something like this:
bootstrap client certificate does not match private key, you may need to delete the client CSR: tls: private key does not match public key
*wrong cgroup driver used*
Making reference to my own ticket #17190
<#17190>
The node configuration file /var/lib/origin/openshift.
local.config/node/node-config.yaml is missing the following lines:
kubeletArguments:
cgroup-driver:
- cgroupfs
Otherwise kublet refuse to start with the following error message:
failed to run Kubelet: failed to create kubelet: misconfiguration: kubelet cgroup driver: "systemd" is different from docker cgroup driver: "cgroupfs"
For adventurous people: I manage to get the node started by running
something similar:
docker run --name=origin --hostname=sylve --env="HOME=/root" --env="OPENSHIFT_CONTAINERIZED=true" --env="KUBECONFIG=/var/lib/origin/openshift.local.config/master/admin.kubeconfig" --env="PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" --volume="/var/log:/var/log:rw" --volume="/var/run:/var/run:rw" --volume="/sys:/sys:rw" --volume="/sys/fs/cgroup:/sys/fs/cgroup:rw" --volume="/dev:/dev" --volume="/:/rootfs:ro" --volume="/var/lib/origin/openshift.local.volumes:/var/lib/origin/openshift.local.volumes:rslave" --volume="/var/lib/origin/openshift.local.config:/var/lib/origin/openshift.local.config:z" --network=host --privileged --restart= --label io.openshift.tags="openshift,core" --label license="GPLv2" --label io.k8s.description="OpenShift Origin is a platform for developing, building, and deploying containerized applications." --label build-date="20170911" --label name="CentOS Base Image" --label io.k8s.display-name="OpenShift Origin Application Platform" --label vendor="CentOS" --detach=true openshift/origin:v3.6.1 start node --bootstrap --kubeconfig=/var/lib/origin/openshift.local.config/node/node-bootstrap.kubeconfig
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#13336 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABG_p5vDwP9fdRUopH83h-lnfRe_PVYDks5s3Oi9gaJpZM4MY_Zh>
.
|
oc cluster join is experimental and currently broken. It's on track to be
fixed for 3.9
…On Thu, Nov 16, 2017 at 9:42 PM, Patrik Dufresne ***@***.***> wrote:
@ smarterclayton yep, I've read your PR #16571
<#16571>.
While openshift start node might work, it doesn't get called properly
when trying to use oc cluster join ...
But did you have a look at #17331
<#17331>. I've raise this
problem. It seams related to wrong arguments getting passed to the
container.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#13336 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABG_p1qYeucJi1L4jDcjeHaEcdyor514ks5s3PJ8gaJpZM4MY_Zh>
.
|
@smarterclayton I'm not sure it's the right place to continue discussion. If you have a better place, please tell me.
In the logs, I see:
Then nothing else happen. From the master server, I only received one cert. Probably the client server. I didn't get any serving cert to be approved. |
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
/remove-lifecycle stale |
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
Stale issues rot after 30d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle rotten |
/remove-lifecycle rotten |
It would be great if a guide / readme provided on how to use
oc cluster join
commandVersion
oc v1.5.0-rc.0+49a4a7a
kubernetes v1.5.2+43a9be4
features: Basic-Auth
Server https://127.0.0.1:8443
openshift v1.5.0-alpha.3+cf7e336
kubernetes v1.5.2+43a9be4
Steps To Reproduce
oc cluster up
oc cluster join
Current Result
Prompts for
Please paste the contents of your secret here and hit ENTER:
and does not take any values as input, i have to ctrl + c to exit
Expected Result
join another cluster
The text was updated successfully, but these errors were encountered: