-
Notifications
You must be signed in to change notification settings - Fork 26
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
env command does not support windows #24
Comments
Hey, What is your philosophy for windows ? Another point is clearly I'm working on project of virtual machine to setup a kubernetes for easy deployment/development. For now I didn't really know what was the good approach (Vagrant ? only docker ? ... each braings problems). |
No, I didn't know that an official .exe have been released. Will definitely have a look. Thank you. |
with MINGW64 (Docker Quick Launch Terminal): To make the setup work, we need to change one of your To do that: cd ${YOUR_KMACHINE_FOLDER}
./kmachine.exe create dev
./kmachine env dev > env.sh Then open kubectl config set-cluster dev \
--server=https://192.168.99.101:6443 \
--certificate-authority=C:\Users\YOUR_USERNAME\.kube\machine\machines\dev/ca.pem to something like that : kubectl config set-cluster dev \
--server=https://192.168.99.101:6443 \
--certificate-authority=/C/Users/YOUR_USERNAME/.kube/machine/machines/dev/ca.pem finally, import the env: . ./env.sh Note that you will have to do that each time you create a new kmachine |
The way I have done for this portability issue is to run everything in a container:
In this way, everything can be run from any kind of environment that have only docker. So we can forget that windows compatibility that doesn't simplify the work for everyone .... For now the tool I'm working on is hive. It's focused on developper and not devops so most of the tools won't really help you directly. But maybe we can look to map your different project (like addons) in order to simplify users life: For now, I run kubectl like this: $ ./hive kubernetes cli get nodes No need for any installation. Hive is just a bash of less than 30 lines. Maybe I can look in something like: $ ./hive kmachine get_env
$ ./hive kmachine start_addons etc ... How do you feel with this approach ? |
One approach we could take on windows at first:
The process for new user would be:
I was looking to start kmachine from hive but it's not intuitive as for now you need MINGW64 first .... like egg and chicken ... Note: if we know how to install all this things by using bash (Virtualbox, git (for bash), MINGW64), we can at that moment add an install command on hive that make sense:
|
Some advance on that topic. I have re-written the docker-toolbox start.sh.I'm on the pattern:
For now, the script:
I think it could be a good place to add function and alias. issueThe environment import is the breaking point ^^ $ ./start.sh TEST
no kmachine in PATH, downloading in the current path
====================================================
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 605 0 605 0 0 968 0 --:--:-- --:--:-- --:--:-- 1074
100 37.3M 100 37.3M 0 0 4563k 0 0:00:08 0:00:08 --:--:-- 6846k
Creating CA: C:\Users\shinm\.kube\machine\certs\ca.pem
Creating client certificate: C:\Users\shinm\.kube\machine\certs\cert.pem
Running pre-create checks...
Creating machine...
Waiting for machine to be running, this may take a few minutes...
Machine is running, waiting for SSH to be available...
Detecting operating system of created instance...
Provisioning created instance...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Configuring kubernetes...
Copying certs to the remote system...
To see how to connect Docker to this machine, run: C:\Users\shinm\.kube\bin\kmachine.exe env dev
./start.sh: line 100: kubectl: command not found
Looks like something went wrong... Press any key to continue...
The solution, is I think at this line 100 of the gist:
I could replace Is this part of the code in your hands ? If yes, just return env for bash without the kubectl and we should be fine. |
@Runseb any feedback on that ? :D Just a point on something I said that was wrong: to invoke |
@tdeheurles just did not have time to look at it. We are working on getting 1.2.0 out with embedded add-ons. Will get back to this in the coming week. Thanks for your patience |
Ok, thanks. Just for information, kubernetes on docker seems to work now. I have it started with DNS/Dashboard working. But as kubernetes is large, it's hard to tell if everything is working ... |
We need to add windows (powershell) support for the
kmachine env
command.The text was updated successfully, but these errors were encountered: