-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Add new driver "SSH" to bootstrap generic minkube clusters over ssh #10099
Conversation
This driver connects to an already existing virtual machine, using the provided IP address and SSH user/key/port parameters. On this machine, libmachine will provision the docker daemon and minikube will bootstrap the kubernetes cluster (as usual).
It is not supported anyway, and just throws errors. There is no use to restart or to retry, just give up. This should never be a problem with "none", though. That always return running, while generic tests ssh.
All drivers *must* be in "supportedDrivers" Delete Podman on Darwin (Mac), not available
It was failing to install the "docker" package Since the provisioning was defaulting to ISO
Since we don't know the remote machine type anyway, it could be a virtual machine or a physical server. But we don't add any _extra_ isolation for minikube, so go with "bare metal machine" machine type for now.
It was only called for existing machines, not for new. But other commands expect to be able to run "docker".
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: afbjorklund The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This makes the machine driver specific to minikube
The "none" driver has redefined stop and start to mean the kubelet rather than the host itself. Use the same API here. Killing actual containers remotely remains to be implemented. Only stop the kubelet service for now, and assuming systemd.
@medyagh : I forked the "generic" driver and changed the start/stop implementation, so now it looks more like the "none" driver. This also means that both drivers are now free to be renamed or aliased or whatever, since they are no longer using libmachine. |
Not using the default libmachine drivers anymore
Setting the config directly instead in minikube
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mostly looks good just a couple knits.
btw do u mind pasting an example in the output I am curious how it looks for minikube start
But most of it is identical to the "none" driver
86281db
to
fb6cf6b
Compare
What would you think about an alternate name for this, such as "ssh" or "remote"?
|
The fork (from libmachine) is now completed, so the drivers can be renamed. We had originally planned to do it as a separate feature, though: #7772 The boring names were Like "bare metal" or "cloud" and also "native". But not stuck with |
Think we will leave the provisioner as-is, and leave that to the other feature: #9989 But right now it works differently for ubuntu and for any other distributions. So we might want to add some specific KIC-check, to the "ubuntu" provisioner ? func (p *UbuntuProvisioner) String() string {
return "ubuntu"
}
// CompatibleWithHost checks if provisioner is compatible with host
func (p *UbuntuProvisioner) CompatibleWithHost() bool {
return p.OsReleaseInfo.ID == "ubuntu"
} Because it is hard-coded for KIC, so we don't really "detect" it anyway. |
I would vote for SSH name since everything in the flags points to SSH. |
I thought all drivers were using ssh to talk to the machine, even docker ? But we can go with ssh... Will change the code, to see what we end up with. Like: |
Now that we have forked the machine driver
@afbjorklund there seem to be a build error need to be fixed |
/ok-to-test |
Things got a bit hard to read, when the machine driver was renamed. i.e sshIPAddress, sshSSHUser, sshSSHKey, sshSSHPort Easy to confuse the name of the driver (ssh) with the protocol (ssh) Normally the IP of the VM is the same for all uses, though |
/retest-this-please |
New year, new attempt of the generic driver...
This driver connects to an already existing virtual machine,
using the provided IP address and SSH user/key/port parameters.
On this machine, libmachine will provision the docker daemon
and minikube will bootstrap the kubernetes cluster (as usual).
Rebased version of
#9545#6873#4734Closes #4733 #9583