https://rominirani.com/ Tutorial-getting-started-with-kubernetes-on-your-windows-laptop-with-minikube-3269b54a226#.d9lmuvzf2
This article's Considerations:
1, as of 2017.01.20, window kubernetes is still experimental, there are a variety of unpredictable bugs, if you encounter bugs, please go to kubernetes GitHub search Issues to find solutions (issues Kubernetes/kubernetes https://github.com/kubernetes/kubernetes/issues)
2, as of 2017.01.20, in the course of the following tutorial to note that all kinds of command operations, in the administrator's right cmd or Prowershell, and then switch to C disk (System disk), if the other disk operation will fail, this is known as the current bug
3, the article will be prompted to install Docker-toolbox, it will automatically install all Docker, Docker-compose, VirtualBox Environment, to install to C disk (System disk), other disk installation will cause bugs
4, the text will be prompted to Kubectl, Minikube, Etcd placed in the $path path, remember to put the path to the system disk, preferably the C-packing directory, and then add the root directory to the system environment $path
5, when starting Kubernetes, run minikube Start command, may prompt "xxx machine not Found", this error is found in issues because of the above installation VirtualBox, Minikube, Docker, when The working directory of the former operation CMD is not in the C disk, so please install the installation time according to the above prompts; If you are prompted for "xxx fail", most likely because the version of VirtualBox you are using Docker-toolbox does not match the version of Minikube and WIN10, it is recommended that you download the latest VirtualBox version of the VirtualBox website ( Downloads–oracle VM VirtualBox https://www.virtualbox.org/wiki/Downloads)
I have recently covered multiple posts (1 & 2) on getting started with Docker Swarm.
I personally like the simplicity of Docker Swarm and have found in my teaching experience with developers, which it was EAS Ier for most people to understand what Container Management solutions are all about when they-a few simple commands in Docker Swarm and are able to relate to stuff like scaling up/down, rolling, etc.
Personally I If you are looking for a container management solution in today's world, you have to invest your TI Me in kubernetes (k8s). There is no doubt about that because of multiple factors. To the best of our undestanding, points include:kubernetes Is open Source great momentum in terms of activities & Contribution at Its open Source Project Decades of experience running Its predecessor at Google Supp ORT of multiple OS and infrastructure software vendors Rate at which features are being released Production readiness (Dam n It, pokemon go met Its scale due to kubernetes) number of features available. Check out the list of features at The home page. What this post is about?
I don't want to spend time explaining about what Kubernetes are and its building blocks like Pods, Replication controllers , Services, deployments and more. There are multiple articles on, and I suggest that, go through it.
I have written a couple of other articles this go through a high level overview the kubernetes:introduction to Kubernetes Kubernetes Building Blocks
It is important this go through some basic material on its concepts and so we can directly get down into its command S.
The general perception about a management solution like kubernetes are that it would require quite a bit of setup for you T O Try it out locally. What This means's it would take some time to set it up but more than setting it up and you might probably get access to It only during staging phase or something as that. Ideally you want a similar environment in your development too, so this you are as close to what it takes to run your Ication. The implications of this is about want it running on your laptop/desktop, where your are likely to do your.
This is the goal behind the Minikube project and the team has put in fantastic effort to help us setup and run Kubernetes On our development machines. This are as simple and portable as it can get. The tagline of Minikube Project says it all: "Run kubernetes locally".
Side note:the The Minikube logo makes for interesting reading.
This post is going to take your through setting up Minikube on your Windows development machine and then taking it for a he Llo World Spin to the Kubernetes cluster in action. Along the way, I'll highlight my environment and what I had to does to get the experimental builds of minikube working on M Y Windows machine. Yes, it is experimental software, but it works!
If you don't are on Windows, the instructions to setup Minikube on either your Linux machine or MAC machine are also availab Le here. Check it out. You can then safely skip on the setup and go to the section where we do a quick Hello world to test drive Kubernetes Loc Ally.
Keep in mind that Minikube gives your a single node cluster this is running into a VM on your development. Of course, once you are do with the what you to this blog, I strongly recommend that you also look at Managed Container Orchestration solutions like Google Container Engine.
Let's get started now with installation of Minikube. But-we-must make sure this our development machine has some of the pre-requisites to run it. Do not ignore that! Using VirtualBox and not Hyper-V
VirtualBox and Hyperv (which are available on Windows) don't make a happy pair and your are bound to run into situations Where the tools get confused. I preferred to use VirtualBox and avoid all esoteric command-line switches, we need to provide to enable creation of T He underlying Docker hosts, etc.
To disable Hyper-V, go to Turn Windows features in or off and you would have a dialog with List of Windows features as shown Below. Navigate to the Hyper-V section and disable it completely. This would require a restart to the machine to take effect and in my machine, it even ended up doing a Windows Update, conf Iguring it and a good minutes later, it is back up.
Great! We have everything now going. Development Machine Environment
I am assuming that you have a setup which is similar to this. I believe, you should is fine on Windows 7 too and it would not have the hyperv stuff, instructions of which I'll give I n a while. Windows laptop. Vt-x/amd-v virtualization must is enabled in BIOS. Docker Toolbox v1.12.0. The toolbox sets up VirtualBox and I have gone with that. Kubectl command line utility. This is the CLI utility for the Kubernetes cluster and your need to install it and have it available in your PATH. To install the latest 1.4 release, do the Following:go to the browser and give the following Ge.googleapis.com/kubernetes-release/release/v1.4.0/bin/windows/amd64/kubectl.exe. This would download the Kubectl CLI executable. Please make it available in the Environment PATH variable. Note:kubectl versions are available at a generic location as per the following format: HTTPS://STORAGE.GOOGLEAPIS.C Om/kubernetes-release/release/${k8s_version}/bin/${goos}/${goarch}/${k8S_binary} Minikube Installation
The "the" the "I" is to take the Kubectl.exe file, downloaded in the previous step and place, in the C:\ folder.
The next step are to download the Minikube binary the following Location:https://github.com/kubernetes/minikube/relea Ses
Go to the Windows download link as shown below:
This'll start downloading the v0.10.0 release of the executable. The file name is Minikube-windows-amd64.exe. Just rename this to Minikube.exeand place it in C:\ Drive, alongside the Kubectl.exe file from the previous section.
You are are all set now to launch a local kubernetes one-node cluster!
All the steps moving forward are being do in Powershell. Launch Powershell in Administrative mode (Ctrl-shift-enter) and navigate to C:\ Drive where the Kubectl.exe and MINIKUBE.E Xe files are present. A Few things to note
Let's do we standard testing to validate our utilities.
If you are your%homepath%\.minikube folder now, you'll notice that several folders got. Take a look!
There are multiple commands that Minikube supports. can use the standard '-help ' option to the ' List of commands ' it has:
PS c:\>. \minikube--help
Minikube is a CLI tool that provisions and manages Single-node kubernetes clusters Optimi Zed for Development Workflows
usage:minikube [command]
Available Commands:dashboard opens/displays The Kubernetes dashboard URL for your local cluster delete
Deletes a local kubernetes cluster. Docker-env sets up Docker env variables; Similar to ' $ (docker-machine env) ' Get-k8s-versions Gets the list of available kubernetes versions for available
E. IP Retrieve The IP address of the running cluster.
Logs Gets The logs of the running Localkube instance, used for debugging minikube, not user code. Config Modify minikube Config service Gets the kubernetes URL for the specified service in your local Cluster ssh Log into or run a command on a machine with SSH;
Similar to ' docker-machine ssh ' start starts a local kubernetes cluster.
Status Gets the status of a local kubernetes cluster.
Stop Stops a running local kubernetes cluster. Version Print the version of Minikube.
flags:--alsologtostderr[=false]: Log to standard error as ok as files--log-flush-frequency=5s:maximum nu Mber of seconds between log flushes--log_backtrace_at=:0:when logging hits line file:n, emit a stack trace- -log_dir= "": If non-empty, write log files in this directory--logtostderr[=false]: Log to standard error instead of
Files--show-libmachine-logs[=false]: Whether or not to show logs from Libmachine. --stderrthreshold=2:logs at or above the threshold go to stderr--v=0:log level for V logs--vmodule=: Comm a-separated List of pattern=n settings for file-filtered logging
Use ' minikube [command]--help ' For more information about a command.
I have highlighted a couple of Global flags that you can use the commands for Minikube. These flags are useful to, what is going on inside the ' hood at times and also for seeing the ' output on the ' standard out Put (Console/command).
Minikube supports multiple versions of Kubernetes and the latest version is v1.4.0. To check out the different versions supported try out the following command:
PS c:\>. \minikube get-k8s-versions The following kubernetes versions are available
:
-v1.4.0
-V1.3.7
-v1.3.6-
v1.3.5
-v1.3.4
-v1.3.3
-v1.3.0
starting our Cluster
We are now ready to launch our kubernetes cluster locally. We use TheStart command for it.