From 043c45ddf489e736ffaad434138a33b19b1aa8a4 Mon Sep 17 00:00:00 2001 From: RA489 Date: Thu, 4 Jul 2019 13:39:01 +0530 Subject: [PATCH 001/115] [FEATURE] allow to set container-runtime via config --- cmd/minikube/cmd/config/config.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmd/minikube/cmd/config/config.go b/cmd/minikube/cmd/config/config.go index e8143caabc..04a11c70ac 100644 --- a/cmd/minikube/cmd/config/config.go +++ b/cmd/minikube/cmd/config/config.go @@ -52,6 +52,12 @@ var settings = []Setting{ validations: []setFn{IsValidDriver}, callbacks: []setFn{RequiresRestartMsg}, }, + { + name: "container-runtime", + set: SetString, + validations: []setFn{IsContainerdRuntime}, + callbacks: []setFn{RequiresRestartMsg}, + }, { name: "feature-gates", set: SetString, From 81144395ba14d6b38ad86ce07a299527374fabc2 Mon Sep 17 00:00:00 2001 From: RA489 Date: Thu, 4 Jul 2019 13:39:01 +0530 Subject: [PATCH 002/115] [FEATURE] allow to set container-runtime via config --- cmd/minikube/cmd/config/config.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmd/minikube/cmd/config/config.go b/cmd/minikube/cmd/config/config.go index e8143caabc..5551cb79ac 100644 --- a/cmd/minikube/cmd/config/config.go +++ b/cmd/minikube/cmd/config/config.go @@ -175,6 +175,12 @@ var settings = []Setting{ validations: []setFn{IsValidAddon}, callbacks: []setFn{EnableOrDisableAddon}, }, + { + name: "insecure-registry", + set: SetBool, + validations: []setFn{IsValidAddon}, + callbacks: []setFn{EnableOrDisableAddon}, + }, { name: "registry", set: SetBool, From 97d27945ef7ac0f8b2e059091df71b76e5f4f58a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20F=20Bj=C3=B6rklund?= Date: Sat, 13 Jul 2019 21:24:28 +0200 Subject: [PATCH 003/115] Make sure to actually gzip the tarballs Not all tar versions can understand suffix --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index dcd7620eb7..0e88c36b1c 100755 --- a/Makefile +++ b/Makefile @@ -356,7 +356,7 @@ TAR_TARGETS_darwin := out/minikube-darwin-amd64 TAR_TARGETS_windows := out/minikube-windows-amd64.exe TAR_TARGETS_ALL := $(shell find deploy/addons -type f) out/minikube-%-amd64.tar.gz: $$(TAR_TARGETS_$$*) $(TAR_TARGETS_ALL) - tar -cvf $@ $^ + tar -cvzf $@ $^ .PHONY: cross-tars cross-tars: out/minikube-windows-amd64.tar.gz out/minikube-linux-amd64.tar.gz out/minikube-darwin-amd64.tar.gz From cb17c856e1d2355d99a8205fd725fb7a152ba453 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20F=20Bj=C3=B6rklund?= Date: Sat, 13 Jul 2019 21:26:23 +0200 Subject: [PATCH 004/115] Don't include the add-ons, but do include hyperkit The deploy/addons are normally included as binary assets, they were added to the tarballs by mistake (in d393211) Include the hyperkit driver for darwin, just as we include the kvm driver for linux. Add some targets for it, too. --- Makefile | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 0e88c36b1c..db3d33d604 100755 --- a/Makefile +++ b/Makefile @@ -352,10 +352,9 @@ out/repodata/repomd.xml: out/minikube-$(RPM_VERSION).rpm .SECONDEXPANSION: TAR_TARGETS_linux := out/minikube-linux-amd64 out/docker-machine-driver-kvm2 -TAR_TARGETS_darwin := out/minikube-darwin-amd64 +TAR_TARGETS_darwin := out/minikube-darwin-amd64 out/docker-machine-driver-hyperkit TAR_TARGETS_windows := out/minikube-windows-amd64.exe -TAR_TARGETS_ALL := $(shell find deploy/addons -type f) -out/minikube-%-amd64.tar.gz: $$(TAR_TARGETS_$$*) $(TAR_TARGETS_ALL) +out/minikube-%-amd64.tar.gz: $$(TAR_TARGETS_$$*) tar -cvzf $@ $^ .PHONY: cross-tars @@ -384,12 +383,21 @@ else -o $(BUILD_DIR)/docker-machine-driver-hyperkit k8s.io/minikube/cmd/drivers/hyperkit endif +hyperkit_in_docker: + rm -f out/docker-machine-driver-hyperkit + $(call DOCKER,$(HYPERKIT_BUILD_IMAGE),CC=o64-clang CXX=o64-clang++ /usr/bin/make out/docker-machine-driver-hyperkit) + .PHONY: install-hyperkit-driver install-hyperkit-driver: out/docker-machine-driver-hyperkit sudo cp out/docker-machine-driver-hyperkit $(HOME)/bin/docker-machine-driver-hyperkit sudo chown root:wheel $(HOME)/bin/docker-machine-driver-hyperkit sudo chmod u+s $(HOME)/bin/docker-machine-driver-hyperkit +.PHONY: release-hyperkit-driver +release-hyperkit-driver: install-hyperkit-driver checksum + gsutil cp $(GOBIN)/docker-machine-driver-hyperkit gs://minikube/drivers/hyperkit/$(VERSION)/ + gsutil cp $(GOBIN)/docker-machine-driver-hyperkit.sha256 gs://minikube/drivers/hyperkit/$(VERSION)/ + .PHONY: check-release check-release: go test -v ./deploy/minikube/release_sanity_test.go -tags=release From 5910389e3b3ac9586afc5b11db1d0169b147f2d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20F=20Bj=C3=B6rklund?= Date: Sat, 13 Jul 2019 21:33:56 +0200 Subject: [PATCH 005/115] Checksum the tarballs, for download verification Use SHA-512, same as Kubernetes does for kubectl --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index db3d33d604..7ca031b223 100755 --- a/Makefile +++ b/Makefile @@ -72,6 +72,8 @@ $(shell mkdir -p $(BUILD_DIR)) PYTHON := $(shell command -v python || echo "docker run --rm -it -v $(shell pwd):/minikube -w /minikube python python") BUILD_OS := $(shell uname -s) +SHA512SUM=$(shell command -v sha512sum || echo "shasum -a 512") + STORAGE_PROVISIONER_TAG := v1.8.1 # Set the version information for the Kubernetes servers @@ -359,6 +361,7 @@ out/minikube-%-amd64.tar.gz: $$(TAR_TARGETS_$$*) .PHONY: cross-tars cross-tars: out/minikube-windows-amd64.tar.gz out/minikube-linux-amd64.tar.gz out/minikube-darwin-amd64.tar.gz + -cd out && $(SHA512SUM) *.tar.gz > SHA512SUM out/minikube-installer.exe: out/minikube-windows-amd64.exe rm -rf out/windows_tmp From 0c7d81c9d16aa3ca67c24649d5cf8b1cb916caa5 Mon Sep 17 00:00:00 2001 From: RA489 Date: Thu, 4 Jul 2019 13:39:01 +0530 Subject: [PATCH 006/115] UI: Advice user when minikube profile is deleted --- pkg/minikube/problem/err_map.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/minikube/problem/err_map.go b/pkg/minikube/problem/err_map.go index 316e5ef6d7..3852be1a7a 100644 --- a/pkg/minikube/problem/err_map.go +++ b/pkg/minikube/problem/err_map.go @@ -30,6 +30,11 @@ var vmProblems = map[string]match{ Advice: "Please make sure the service you are looking for is deployed or is in the correct namespace.", Issues: []int{4599}, }, + "MACHINE_NOT_FOUND": { + Regexp: re(`Machine does not exist for api.Exists`), + Advice: "Your minikube vm is not running, try minikube start.", + Issues: []int{4889}, + }, "HYPERKIT_NO_IP": { Regexp: re(`IP address never found in dhcp leases file Temporary Error: Could not find an IP address for`), Advice: "Install the latest minikube hyperkit driver, and run 'minikube delete'", From 5a8d7e23fb9faf37a94df6fd5e8acb132ed32f76 Mon Sep 17 00:00:00 2001 From: Thomas Stromberg Date: Fri, 2 Aug 2019 16:00:25 -0700 Subject: [PATCH 007/115] More docs moving --- site/assets/scss/_variables_project.scss | 8 +- site/content/en/docs/Reference/_index.md | 7 +- .../en/docs/Reference/parameter-reference.md | 212 ---------------- .../en/docs/Tasks/Ponycopters/_index.md | 16 -- .../Ponycopters/configuring-ponycopters.md | 239 ------------------ .../Ponycopters/launching-ponycopters.md | 239 ------------------ site/content/en/docs/Tasks/_index.md | 13 +- site/content/en/docs/Tasks/beds.md | 239 ------------------ site/content/en/docs/Tasks/porridge.md | 239 ------------------ site/content/en/docs/Tasks/task.md | 239 ------------------ 10 files changed, 10 insertions(+), 1441 deletions(-) delete mode 100644 site/content/en/docs/Reference/parameter-reference.md delete mode 100755 site/content/en/docs/Tasks/Ponycopters/_index.md delete mode 100644 site/content/en/docs/Tasks/Ponycopters/configuring-ponycopters.md delete mode 100644 site/content/en/docs/Tasks/Ponycopters/launching-ponycopters.md delete mode 100644 site/content/en/docs/Tasks/beds.md delete mode 100644 site/content/en/docs/Tasks/porridge.md delete mode 100644 site/content/en/docs/Tasks/task.md diff --git a/site/assets/scss/_variables_project.scss b/site/assets/scss/_variables_project.scss index 356cf1bf82..e0120454d8 100644 --- a/site/assets/scss/_variables_project.scss +++ b/site/assets/scss/_variables_project.scss @@ -4,4 +4,10 @@ Add styles or override variables from the theme here. */ -$primary: #326DE6; \ No newline at end of file +$primary: #326DE6; + + +// Allow code tags to span most of a window length (default is 80%) +div.td-content pre { + max-width: 99% !important; +} \ No newline at end of file diff --git a/site/content/en/docs/Reference/_index.md b/site/content/en/docs/Reference/_index.md index c9aeb1f20b..430e000173 100644 --- a/site/content/en/docs/Reference/_index.md +++ b/site/content/en/docs/Reference/_index.md @@ -1,13 +1,8 @@ --- title: "Reference" linkTitle: "Reference" -weight: 9 +weight: 3 description: > Low level reference docs for your project. --- -{{% pageinfo %}} -This is a placeholder page that shows you how to use this template site. -{{% /pageinfo %}} - -If your project has an API, configuration, or other reference - anything that users need to look up that’s at an even lower level than a single task - put (or link to it) here. diff --git a/site/content/en/docs/Reference/parameter-reference.md b/site/content/en/docs/Reference/parameter-reference.md deleted file mode 100644 index f2d8fbbccc..0000000000 --- a/site/content/en/docs/Reference/parameter-reference.md +++ /dev/null @@ -1,212 +0,0 @@ ---- -title: "Parameter Reference" -linkTitle: "Parameter Reference" -date: 2017-01-05 -description: > - A short lead descripton about this content page. It can be **bold** or _italic_ and can be split over multiple paragraphs. ---- - -{{% pageinfo %}} -This is a placeholder page. Replace it with your own content. -{{% /pageinfo %}} - -Text can be **bold**, _italic_, or ~~strikethrough~~. [Links](https://gohugo.io) should be blue with no underlines (unless hovered over). - -There should be whitespace between paragraphs. Vape migas chillwave sriracha poutine try-hard distillery. Tattooed shabby chic small batch, pabst art party heirloom letterpress air plant pop-up. Sustainable chia skateboard art party banjo cardigan normcore affogato vexillologist quinoa meggings man bun master cleanse shoreditch readymade. Yuccie prism four dollar toast tbh cardigan iPhone, tumblr listicle live-edge VHS. Pug lyft normcore hot chicken biodiesel, actually keffiyeh thundercats photo booth pour-over twee fam food truck microdosing banh mi. Vice activated charcoal raclette unicorn live-edge post-ironic. Heirloom vexillologist coloring book, beard deep v letterpress echo park humblebrag tilde. - -90's four loko seitan photo booth gochujang freegan tumeric listicle fam ugh humblebrag. Bespoke leggings gastropub, biodiesel brunch pug fashion axe meh swag art party neutra deep v chia. Enamel pin fanny pack knausgaard tofu, artisan cronut hammock meditation occupy master cleanse chartreuse lumbersexual. Kombucha kogi viral truffaut synth distillery single-origin coffee ugh slow-carb marfa selfies. Pitchfork schlitz semiotics fanny pack, ugh artisan vegan vaporware hexagon. Polaroid fixie post-ironic venmo wolf ramps **kale chips**. - -> There should be no margin above this first sentence. -> -> Blockquotes should be a lighter gray with a border along the left side in the secondary color. -> -> There should be no margin below this final sentence. - -## First Header 2 - -This is a normal paragraph following a header. Knausgaard kale chips snackwave microdosing cronut copper mug swag synth bitters letterpress glossier **craft beer**. Mumblecore bushwick authentic gochujang vegan chambray meditation jean shorts irony. Viral farm-to-table kale chips, pork belly palo santo distillery activated charcoal aesthetic jianbing air plant woke lomo VHS organic. Tattooed locavore succulents heirloom, small batch sriracha echo park DIY af. Shaman you probably haven't heard of them copper mug, crucifix green juice vape *single-origin coffee* brunch actually. Mustache etsy vexillologist raclette authentic fam. Tousled beard humblebrag asymmetrical. I love turkey, I love my job, I love my friends, I love Chardonnay! - -Deae legum paulatimque terra, non vos mutata tacet: dic. Vocant docuique me plumas fila quin afuerunt copia haec o neque. - -On big screens, paragraphs and headings should not take up the full container width, but we want tables, code blocks and similar to take the full width. - -Scenester tumeric pickled, authentic crucifix post-ironic fam freegan VHS pork belly 8-bit yuccie PBR&B. **I love this life we live in**. - - -## Second Header 2 - -> This is a blockquote following a header. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. - -### Header 3 - -``` -This is a code block following a header. -``` - -Next level leggings before they sold out, PBR&B church-key shaman echo park. Kale chips occupy godard whatever pop-up freegan pork belly selfies. Gastropub Belinda subway tile woke post-ironic seitan. Shabby chic man bun semiotics vape, chia messenger bag plaid cardigan. - -#### Header 4 - -* This is an unordered list following a header. -* This is an unordered list following a header. -* This is an unordered list following a header. - -##### Header 5 - -1. This is an ordered list following a header. -2. This is an ordered list following a header. -3. This is an ordered list following a header. - -###### Header 6 - -| What | Follows | -|-----------|-----------------| -| A table | A header | -| A table | A header | -| A table | A header | - ----------------- - -There's a horizontal rule above and below this. - ----------------- - -Here is an unordered list: - -* Liverpool F.C. -* Chelsea F.C. -* Manchester United F.C. - -And an ordered list: - -1. Michael Brecker -2. Seamus Blake -3. Branford Marsalis - -And an unordered task list: - -- [x] Create a Hugo theme -- [x] Add task lists to it -- [ ] Take a vacation - -And a "mixed" task list: - -- [ ] Pack bags -- ? -- [ ] Travel! - -And a nested list: - -* Jackson 5 - * Michael - * Tito - * Jackie - * Marlon - * Jermaine -* TMNT - * Leonardo - * Michelangelo - * Donatello - * Raphael - -Definition lists can be used with Markdown syntax. Definition headers are bold. - -Name -: Godzilla - -Born -: 1952 - -Birthplace -: Japan - -Color -: Green - - ----------------- - -Tables should have bold headings and alternating shaded rows. - -| Artist | Album | Year | -|-------------------|-----------------|------| -| Michael Jackson | Thriller | 1982 | -| Prince | Purple Rain | 1984 | -| Beastie Boys | License to Ill | 1986 | - -If a table is too wide, it should scroll horizontally. - -| Artist | Album | Year | Label | Awards | Songs | -|-------------------|-----------------|------|-------------|----------|-----------| -| Michael Jackson | Thriller | 1982 | Epic Records | Grammy Award for Album of the Year, American Music Award for Favorite Pop/Rock Album, American Music Award for Favorite Soul/R&B Album, Brit Award for Best Selling Album, Grammy Award for Best Engineered Album, Non-Classical | Wanna Be Startin' Somethin', Baby Be Mine, The Girl Is Mine, Thriller, Beat It, Billie Jean, Human Nature, P.Y.T. (Pretty Young Thing), The Lady in My Life | -| Prince | Purple Rain | 1984 | Warner Brothers Records | Grammy Award for Best Score Soundtrack for Visual Media, American Music Award for Favorite Pop/Rock Album, American Music Award for Favorite Soul/R&B Album, Brit Award for Best Soundtrack/Cast Recording, Grammy Award for Best Rock Performance by a Duo or Group with Vocal | Let's Go Crazy, Take Me With U, The Beautiful Ones, Computer Blue, Darling Nikki, When Doves Cry, I Would Die 4 U, Baby I'm a Star, Purple Rain | -| Beastie Boys | License to Ill | 1986 | Mercury Records | noawardsbutthistablecelliswide | Rhymin & Stealin, The New Style, She's Crafty, Posse in Effect, Slow Ride, Girls, (You Gotta) Fight for Your Right, No Sleep Till Brooklyn, Paul Revere, Hold It Now, Hit It, Brass Monkey, Slow and Low, Time to Get Ill | - ----------------- - -Code snippets like `var foo = "bar";` can be shown inline. - -Also, `this should vertically align` ~~`with this`~~ ~~and this~~. - -Code can also be shown in a block element. - -``` -foo := "bar"; -bar := "foo"; -``` - -Code can also use syntax highlighting. - -```go -func main() { - input := `var foo = "bar";` - - lexer := lexers.Get("javascript") - iterator, _ := lexer.Tokenise(nil, input) - style := styles.Get("github") - formatter := html.New(html.WithLineNumbers()) - - var buff bytes.Buffer - formatter.Format(&buff, style, iterator) - - fmt.Println(buff.String()) -} -``` - -``` -Long, single-line code blocks should not wrap. They should horizontally scroll if they are too long. This line should be long enough to demonstrate this. -``` - -Inline code inside table cells should still be distinguishable. - -| Language | Code | -|-------------|--------------------| -| Javascript | `var foo = "bar";` | -| Ruby | `foo = "bar"{` | - ----------------- - -Small images should be shown at their actual size. - -![](https://upload.wikimedia.org/wikipedia/commons/thumb/9/9e/Picea_abies_shoot_with_buds%2C_Sogndal%2C_Norway.jpg/240px-Picea_abies_shoot_with_buds%2C_Sogndal%2C_Norway.jpg) - -Large images should always scale down and fit in the content container. - -![](https://upload.wikimedia.org/wikipedia/commons/thumb/9/9e/Picea_abies_shoot_with_buds%2C_Sogndal%2C_Norway.jpg/1024px-Picea_abies_shoot_with_buds%2C_Sogndal%2C_Norway.jpg) - -_The photo above of the Spruce Picea abies shoot with foliage buds: Bjørn Erik Pedersen, CC-BY-SA._ - - -## Components - -### Alerts - -{{< alert >}}This is an alert.{{< /alert >}} -{{< alert title="Note" >}}This is an alert with a title.{{< /alert >}} -{{% alert title="Note" %}}This is an alert with a title and **Markdown**.{{% /alert %}} -{{< alert color="success" >}}This is a successful alert.{{< /alert >}} -{{< alert color="warning" >}}This is a warning.{{< /alert >}} -{{< alert color="warning" title="Warning" >}}This is a warning with a title.{{< /alert >}} - - -## Another Heading diff --git a/site/content/en/docs/Tasks/Ponycopters/_index.md b/site/content/en/docs/Tasks/Ponycopters/_index.md deleted file mode 100755 index 9582be7eba..0000000000 --- a/site/content/en/docs/Tasks/Ponycopters/_index.md +++ /dev/null @@ -1,16 +0,0 @@ - ---- -title: "Working with Ponycopters" -linkTitle: "Working with Ponycopters" -date: 2017-01-05 -description: > - A short lead descripton about this section page. Text here can also be **bold** or _italic_ and can even be split over multiple paragraphs. ---- - -{{% pageinfo %}} -This is a placeholder page. Replace it with your own content. -{{% /pageinfo %}} - - -This is the section landing page. - diff --git a/site/content/en/docs/Tasks/Ponycopters/configuring-ponycopters.md b/site/content/en/docs/Tasks/Ponycopters/configuring-ponycopters.md deleted file mode 100644 index 2e87bcaeff..0000000000 --- a/site/content/en/docs/Tasks/Ponycopters/configuring-ponycopters.md +++ /dev/null @@ -1,239 +0,0 @@ ---- -title: "Configuring Ponycopters" -linkTitle: "Configuring Ponycopters" -date: 2017-01-05 -weight: 2 -description: > - A short lead descripton about this content page. It can be **bold** or _italic_ and can be split over multiple paragraphs. ---- - -{{% pageinfo %}} -This is a placeholder page. Replace it with your own content. -{{% /pageinfo %}} - -Text can be **bold**, _italic_, or ~~strikethrough~~. [Links](https://gohugo.io) should be blue with no underlines (unless hovered over). - -There should be whitespace between paragraphs. Vape migas chillwave sriracha poutine try-hard distillery. Tattooed shabby chic small batch, pabst art party heirloom letterpress air plant pop-up. Sustainable chia skateboard art party banjo cardigan normcore affogato vexillologist quinoa meggings man bun master cleanse shoreditch readymade. Yuccie prism four dollar toast tbh cardigan iPhone, tumblr listicle live-edge VHS. Pug lyft normcore hot chicken biodiesel, actually keffiyeh thundercats photo booth pour-over twee fam food truck microdosing banh mi. Vice activated charcoal raclette unicorn live-edge post-ironic. Heirloom vexillologist coloring book, beard deep v letterpress echo park humblebrag tilde. - -90's four loko seitan photo booth gochujang freegan tumeric listicle fam ugh humblebrag. Bespoke leggings gastropub, biodiesel brunch pug fashion axe meh swag art party neutra deep v chia. Enamel pin fanny pack knausgaard tofu, artisan cronut hammock meditation occupy master cleanse chartreuse lumbersexual. Kombucha kogi viral truffaut synth distillery single-origin coffee ugh slow-carb marfa selfies. Pitchfork schlitz semiotics fanny pack, ugh artisan vegan vaporware hexagon. Polaroid fixie post-ironic venmo wolf ramps **kale chips**. - -> There should be no margin above this first sentence. -> -> Blockquotes should be a lighter gray with a border along the left side in the secondary color. -> -> There should be no margin below this final sentence. - -## First Header 2 - -This is a normal paragraph following a header. Knausgaard kale chips snackwave microdosing cronut copper mug swag synth bitters letterpress glossier **craft beer**. Mumblecore bushwick authentic gochujang vegan chambray meditation jean shorts irony. Viral farm-to-table kale chips, pork belly palo santo distillery activated charcoal aesthetic jianbing air plant woke lomo VHS organic. Tattooed locavore succulents heirloom, small batch sriracha echo park DIY af. Shaman you probably haven't heard of them copper mug, crucifix green juice vape *single-origin coffee* brunch actually. Mustache etsy vexillologist raclette authentic fam. Tousled beard humblebrag asymmetrical. I love turkey, I love my job, I love my friends, I love Chardonnay! - -Deae legum paulatimque terra, non vos mutata tacet: dic. Vocant docuique me plumas fila quin afuerunt copia haec o neque. - -On big screens, paragraphs and headings should not take up the full container width, but we want tables, code blocks and similar to take the full width. - -Scenester tumeric pickled, authentic crucifix post-ironic fam freegan VHS pork belly 8-bit yuccie PBR&B. **I love this life we live in**. - - -## Second Header 2 - -> This is a blockquote following a header. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. - -### Header 3 - -``` -This is a code block following a header. -``` - -Next level leggings before they sold out, PBR&B church-key shaman echo park. Kale chips occupy godard whatever pop-up freegan pork belly selfies. Gastropub Belinda subway tile woke post-ironic seitan. Shabby chic man bun semiotics vape, chia messenger bag plaid cardigan. - -#### Header 4 - -* This is an unordered list following a header. -* This is an unordered list following a header. -* This is an unordered list following a header. - -##### Header 5 - -1. This is an ordered list following a header. -2. This is an ordered list following a header. -3. This is an ordered list following a header. - -###### Header 6 - -| What | Follows | -|-----------|-----------------| -| A table | A header | -| A table | A header | -| A table | A header | - ----------------- - -There's a horizontal rule above and below this. - ----------------- - -Here is an unordered list: - -* Liverpool F.C. -* Chelsea F.C. -* Manchester United F.C. - -And an ordered list: - -1. Michael Brecker -2. Seamus Blake -3. Branford Marsalis - -And an unordered task list: - -- [x] Create a Hugo theme -- [x] Add task lists to it -- [ ] Take a vacation - -And a "mixed" task list: - -- [ ] Pack bags -- ? -- [ ] Travel! - -And a nested list: - -* Jackson 5 - * Michael - * Tito - * Jackie - * Marlon - * Jermaine -* TMNT - * Leonardo - * Michelangelo - * Donatello - * Raphael - -Definition lists can be used with Markdown syntax. Definition headers are bold. - -Name -: Godzilla - -Born -: 1952 - -Birthplace -: Japan - -Color -: Green - - ----------------- - -Tables should have bold headings and alternating shaded rows. - -| Artist | Album | Year | -|-------------------|-----------------|------| -| Michael Jackson | Thriller | 1982 | -| Prince | Purple Rain | 1984 | -| Beastie Boys | License to Ill | 1986 | - -If a table is too wide, it should scroll horizontally. - -| Artist | Album | Year | Label | Awards | Songs | -|-------------------|-----------------|------|-------------|----------|-----------| -| Michael Jackson | Thriller | 1982 | Epic Records | Grammy Award for Album of the Year, American Music Award for Favorite Pop/Rock Album, American Music Award for Favorite Soul/R&B Album, Brit Award for Best Selling Album, Grammy Award for Best Engineered Album, Non-Classical | Wanna Be Startin' Somethin', Baby Be Mine, The Girl Is Mine, Thriller, Beat It, Billie Jean, Human Nature, P.Y.T. (Pretty Young Thing), The Lady in My Life | -| Prince | Purple Rain | 1984 | Warner Brothers Records | Grammy Award for Best Score Soundtrack for Visual Media, American Music Award for Favorite Pop/Rock Album, American Music Award for Favorite Soul/R&B Album, Brit Award for Best Soundtrack/Cast Recording, Grammy Award for Best Rock Performance by a Duo or Group with Vocal | Let's Go Crazy, Take Me With U, The Beautiful Ones, Computer Blue, Darling Nikki, When Doves Cry, I Would Die 4 U, Baby I'm a Star, Purple Rain | -| Beastie Boys | License to Ill | 1986 | Mercury Records | noawardsbutthistablecelliswide | Rhymin & Stealin, The New Style, She's Crafty, Posse in Effect, Slow Ride, Girls, (You Gotta) Fight for Your Right, No Sleep Till Brooklyn, Paul Revere, Hold It Now, Hit It, Brass Monkey, Slow and Low, Time to Get Ill | - ----------------- - -Code snippets like `var foo = "bar";` can be shown inline. - -Also, `this should vertically align` ~~`with this`~~ ~~and this~~. - -Code can also be shown in a block element. - -``` -foo := "bar"; -bar := "foo"; -``` - -Code can also use syntax highlighting. - -```go -func main() { - input := `var foo = "bar";` - - lexer := lexers.Get("javascript") - iterator, _ := lexer.Tokenise(nil, input) - style := styles.Get("github") - formatter := html.New(html.WithLineNumbers()) - - var buff bytes.Buffer - formatter.Format(&buff, style, iterator) - - fmt.Println(buff.String()) -} -``` - -``` -Long, single-line code blocks should not wrap. They should horizontally scroll if they are too long. This line should be long enough to demonstrate this. -``` - -Inline code inside table cells should still be distinguishable. - -| Language | Code | -|-------------|--------------------| -| Javascript | `var foo = "bar";` | -| Ruby | `foo = "bar"{` | - ----------------- - -Small images should be shown at their actual size. - -![](https://upload.wikimedia.org/wikipedia/commons/thumb/9/9e/Picea_abies_shoot_with_buds%2C_Sogndal%2C_Norway.jpg/240px-Picea_abies_shoot_with_buds%2C_Sogndal%2C_Norway.jpg) - -Large images should always scale down and fit in the content container. - -![](https://upload.wikimedia.org/wikipedia/commons/thumb/9/9e/Picea_abies_shoot_with_buds%2C_Sogndal%2C_Norway.jpg/1024px-Picea_abies_shoot_with_buds%2C_Sogndal%2C_Norway.jpg) - -_The photo above of the Spruce Picea abies shoot with foliage buds: Bjørn Erik Pedersen, CC-BY-SA._ - - -## Components - -### Alerts - -{{< alert >}}This is an alert.{{< /alert >}} -{{< alert title="Note" >}}This is an alert with a title.{{< /alert >}} -{{% alert title="Note" %}}This is an alert with a title and **Markdown**.{{% /alert %}} -{{< alert color="success" >}}This is a successful alert.{{< /alert >}} -{{< alert color="warning" >}}This is a warning.{{< /alert >}} -{{< alert color="warning" title="Warning" >}}This is a warning with a title.{{< /alert >}} - - -## Another Heading - -Add some sections here to see how the ToC looks like. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. - -### This Document - -Inguina genus: Anaphen post: lingua violente voce suae meus aetate diversi. Orbis unam nec flammaeque status deam Silenum erat et a ferrea. Excitus rigidum ait: vestro et Herculis convicia: nitidae deseruit coniuge Proteaque adiciam *eripitur*? Sitim noceat signa *probat quidem*. Sua longis *fugatis* quidem genae. - - -### Pixel Count - -Tilde photo booth wayfarers cliche lomo intelligentsia man braid kombucha vaporware farm-to-table mixtape portland. PBR&B pickled cornhole ugh try-hard ethical subway tile. Fixie paleo intelligentsia pabst. Ennui waistcoat vinyl gochujang. Poutine salvia authentic affogato, chambray lumbersexual shabby chic. - -### Contact Info - -Plaid hell of cred microdosing, succulents tilde pour-over. Offal shabby chic 3 wolf moon blue bottle raw denim normcore poutine pork belly. - - -### External Links - -Stumptown PBR&B keytar plaid street art, forage XOXO pitchfork selvage affogato green juice listicle pickled everyday carry hashtag. Organic sustainable letterpress sartorial scenester intelligentsia swag bushwick. Put a bird on it stumptown neutra locavore. IPhone typewriter messenger bag narwhal. Ennui cold-pressed seitan flannel keytar, single-origin coffee adaptogen occupy yuccie williamsburg chillwave shoreditch forage waistcoat. - - - -``` -This is the final element on the page and there should be no margin below this. -``` diff --git a/site/content/en/docs/Tasks/Ponycopters/launching-ponycopters.md b/site/content/en/docs/Tasks/Ponycopters/launching-ponycopters.md deleted file mode 100644 index 0735cabca9..0000000000 --- a/site/content/en/docs/Tasks/Ponycopters/launching-ponycopters.md +++ /dev/null @@ -1,239 +0,0 @@ ---- -title: "Launching Ponycopters" -linkTitle: "Launching Ponycopters" -date: 2017-01-05 -weight: 3 -description: > - A short lead descripton about this content page. It can be **bold** or _italic_ and can be split over multiple paragraphs. ---- - -{{% pageinfo %}} -This is a placeholder page. Replace it with your own content. -{{% /pageinfo %}} - -Text can be **bold**, _italic_, or ~~strikethrough~~. [Links](https://gohugo.io) should be blue with no underlines (unless hovered over). - -There should be whitespace between paragraphs. Vape migas chillwave sriracha poutine try-hard distillery. Tattooed shabby chic small batch, pabst art party heirloom letterpress air plant pop-up. Sustainable chia skateboard art party banjo cardigan normcore affogato vexillologist quinoa meggings man bun master cleanse shoreditch readymade. Yuccie prism four dollar toast tbh cardigan iPhone, tumblr listicle live-edge VHS. Pug lyft normcore hot chicken biodiesel, actually keffiyeh thundercats photo booth pour-over twee fam food truck microdosing banh mi. Vice activated charcoal raclette unicorn live-edge post-ironic. Heirloom vexillologist coloring book, beard deep v letterpress echo park humblebrag tilde. - -90's four loko seitan photo booth gochujang freegan tumeric listicle fam ugh humblebrag. Bespoke leggings gastropub, biodiesel brunch pug fashion axe meh swag art party neutra deep v chia. Enamel pin fanny pack knausgaard tofu, artisan cronut hammock meditation occupy master cleanse chartreuse lumbersexual. Kombucha kogi viral truffaut synth distillery single-origin coffee ugh slow-carb marfa selfies. Pitchfork schlitz semiotics fanny pack, ugh artisan vegan vaporware hexagon. Polaroid fixie post-ironic venmo wolf ramps **kale chips**. - -> There should be no margin above this first sentence. -> -> Blockquotes should be a lighter gray with a border along the left side in the secondary color. -> -> There should be no margin below this final sentence. - -## First Header 2 - -This is a normal paragraph following a header. Knausgaard kale chips snackwave microdosing cronut copper mug swag synth bitters letterpress glossier **craft beer**. Mumblecore bushwick authentic gochujang vegan chambray meditation jean shorts irony. Viral farm-to-table kale chips, pork belly palo santo distillery activated charcoal aesthetic jianbing air plant woke lomo VHS organic. Tattooed locavore succulents heirloom, small batch sriracha echo park DIY af. Shaman you probably haven't heard of them copper mug, crucifix green juice vape *single-origin coffee* brunch actually. Mustache etsy vexillologist raclette authentic fam. Tousled beard humblebrag asymmetrical. I love turkey, I love my job, I love my friends, I love Chardonnay! - -Deae legum paulatimque terra, non vos mutata tacet: dic. Vocant docuique me plumas fila quin afuerunt copia haec o neque. - -On big screens, paragraphs and headings should not take up the full container width, but we want tables, code blocks and similar to take the full width. - -Scenester tumeric pickled, authentic crucifix post-ironic fam freegan VHS pork belly 8-bit yuccie PBR&B. **I love this life we live in**. - - -## Second Header 2 - -> This is a blockquote following a header. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. - -### Header 3 - -``` -This is a code block following a header. -``` - -Next level leggings before they sold out, PBR&B church-key shaman echo park. Kale chips occupy godard whatever pop-up freegan pork belly selfies. Gastropub Belinda subway tile woke post-ironic seitan. Shabby chic man bun semiotics vape, chia messenger bag plaid cardigan. - -#### Header 4 - -* This is an unordered list following a header. -* This is an unordered list following a header. -* This is an unordered list following a header. - -##### Header 5 - -1. This is an ordered list following a header. -2. This is an ordered list following a header. -3. This is an ordered list following a header. - -###### Header 6 - -| What | Follows | -|-----------|-----------------| -| A table | A header | -| A table | A header | -| A table | A header | - ----------------- - -There's a horizontal rule above and below this. - ----------------- - -Here is an unordered list: - -* Liverpool F.C. -* Chelsea F.C. -* Manchester United F.C. - -And an ordered list: - -1. Michael Brecker -2. Seamus Blake -3. Branford Marsalis - -And an unordered task list: - -- [x] Create a Hugo theme -- [x] Add task lists to it -- [ ] Take a vacation - -And a "mixed" task list: - -- [ ] Pack bags -- ? -- [ ] Travel! - -And a nested list: - -* Jackson 5 - * Michael - * Tito - * Jackie - * Marlon - * Jermaine -* TMNT - * Leonardo - * Michelangelo - * Donatello - * Raphael - -Definition lists can be used with Markdown syntax. Definition headers are bold. - -Name -: Godzilla - -Born -: 1952 - -Birthplace -: Japan - -Color -: Green - - ----------------- - -Tables should have bold headings and alternating shaded rows. - -| Artist | Album | Year | -|-------------------|-----------------|------| -| Michael Jackson | Thriller | 1982 | -| Prince | Purple Rain | 1984 | -| Beastie Boys | License to Ill | 1986 | - -If a table is too wide, it should scroll horizontally. - -| Artist | Album | Year | Label | Awards | Songs | -|-------------------|-----------------|------|-------------|----------|-----------| -| Michael Jackson | Thriller | 1982 | Epic Records | Grammy Award for Album of the Year, American Music Award for Favorite Pop/Rock Album, American Music Award for Favorite Soul/R&B Album, Brit Award for Best Selling Album, Grammy Award for Best Engineered Album, Non-Classical | Wanna Be Startin' Somethin', Baby Be Mine, The Girl Is Mine, Thriller, Beat It, Billie Jean, Human Nature, P.Y.T. (Pretty Young Thing), The Lady in My Life | -| Prince | Purple Rain | 1984 | Warner Brothers Records | Grammy Award for Best Score Soundtrack for Visual Media, American Music Award for Favorite Pop/Rock Album, American Music Award for Favorite Soul/R&B Album, Brit Award for Best Soundtrack/Cast Recording, Grammy Award for Best Rock Performance by a Duo or Group with Vocal | Let's Go Crazy, Take Me With U, The Beautiful Ones, Computer Blue, Darling Nikki, When Doves Cry, I Would Die 4 U, Baby I'm a Star, Purple Rain | -| Beastie Boys | License to Ill | 1986 | Mercury Records | noawardsbutthistablecelliswide | Rhymin & Stealin, The New Style, She's Crafty, Posse in Effect, Slow Ride, Girls, (You Gotta) Fight for Your Right, No Sleep Till Brooklyn, Paul Revere, Hold It Now, Hit It, Brass Monkey, Slow and Low, Time to Get Ill | - ----------------- - -Code snippets like `var foo = "bar";` can be shown inline. - -Also, `this should vertically align` ~~`with this`~~ ~~and this~~. - -Code can also be shown in a block element. - -``` -foo := "bar"; -bar := "foo"; -``` - -Code can also use syntax highlighting. - -```go -func main() { - input := `var foo = "bar";` - - lexer := lexers.Get("javascript") - iterator, _ := lexer.Tokenise(nil, input) - style := styles.Get("github") - formatter := html.New(html.WithLineNumbers()) - - var buff bytes.Buffer - formatter.Format(&buff, style, iterator) - - fmt.Println(buff.String()) -} -``` - -``` -Long, single-line code blocks should not wrap. They should horizontally scroll if they are too long. This line should be long enough to demonstrate this. -``` - -Inline code inside table cells should still be distinguishable. - -| Language | Code | -|-------------|--------------------| -| Javascript | `var foo = "bar";` | -| Ruby | `foo = "bar"{` | - ----------------- - -Small images should be shown at their actual size. - -![](https://upload.wikimedia.org/wikipedia/commons/thumb/9/9e/Picea_abies_shoot_with_buds%2C_Sogndal%2C_Norway.jpg/240px-Picea_abies_shoot_with_buds%2C_Sogndal%2C_Norway.jpg) - -Large images should always scale down and fit in the content container. - -![](https://upload.wikimedia.org/wikipedia/commons/thumb/9/9e/Picea_abies_shoot_with_buds%2C_Sogndal%2C_Norway.jpg/1024px-Picea_abies_shoot_with_buds%2C_Sogndal%2C_Norway.jpg) - -_The photo above of the Spruce Picea abies shoot with foliage buds: Bjørn Erik Pedersen, CC-BY-SA._ - - -## Components - -### Alerts - -{{< alert >}}This is an alert.{{< /alert >}} -{{< alert title="Note" >}}This is an alert with a title.{{< /alert >}} -{{% alert title="Note" %}}This is an alert with a title and **Markdown**.{{% /alert %}} -{{< alert color="success" >}}This is a successful alert.{{< /alert >}} -{{< alert color="warning" >}}This is a warning.{{< /alert >}} -{{< alert color="warning" title="Warning" >}}This is a warning with a title.{{< /alert >}} - - -## Another Heading - -Add some sections here to see how the ToC looks like. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. - -### This Document - -Inguina genus: Anaphen post: lingua violente voce suae meus aetate diversi. Orbis unam nec flammaeque status deam Silenum erat et a ferrea. Excitus rigidum ait: vestro et Herculis convicia: nitidae deseruit coniuge Proteaque adiciam *eripitur*? Sitim noceat signa *probat quidem*. Sua longis *fugatis* quidem genae. - - -### Pixel Count - -Tilde photo booth wayfarers cliche lomo intelligentsia man braid kombucha vaporware farm-to-table mixtape portland. PBR&B pickled cornhole ugh try-hard ethical subway tile. Fixie paleo intelligentsia pabst. Ennui waistcoat vinyl gochujang. Poutine salvia authentic affogato, chambray lumbersexual shabby chic. - -### Contact Info - -Plaid hell of cred microdosing, succulents tilde pour-over. Offal shabby chic 3 wolf moon blue bottle raw denim normcore poutine pork belly. - - -### External Links - -Stumptown PBR&B keytar plaid street art, forage XOXO pitchfork selvage affogato green juice listicle pickled everyday carry hashtag. Organic sustainable letterpress sartorial scenester intelligentsia swag bushwick. Put a bird on it stumptown neutra locavore. IPhone typewriter messenger bag narwhal. Ennui cold-pressed seitan flannel keytar, single-origin coffee adaptogen occupy yuccie williamsburg chillwave shoreditch forage waistcoat. - - - -``` -This is the final element on the page and there should be no margin below this. -``` diff --git a/site/content/en/docs/Tasks/_index.md b/site/content/en/docs/Tasks/_index.md index e43ab7ca93..b54c4c4475 100755 --- a/site/content/en/docs/Tasks/_index.md +++ b/site/content/en/docs/Tasks/_index.md @@ -1,25 +1,16 @@ - --- title: "Core Tasks" linkTitle: "Core Tasks" weight: 6 date: 2017-01-05 description: > - What can your user do with your project? + What can your user do with minikube? --- -{{% pageinfo %}} -This is a placeholder page that shows you how to use this template site. -{{% /pageinfo %}} - -Think about your project’s features and use cases. Use these to choose your core tasks. Each granular use case (enable x, configure y) should have a corresponding tasks page or tasks page section. Users should be able to quickly refer to your core tasks when they need to find out how to do one specific thing, rather than having to look for the instructions in a bigger tutorial or example. Think of your tasks pages as a cookbook with different procedures your users can combine to create something more substantial. - -You can give each task a page, or you can group related tasks together in a page, such as tasks related to a particular feature. As well as grouping related tasks in single pages, you can also group task pages in nested folders with an index page as an overview, as seen in this example site. Or if you have a small docset like the [Docsy User Guide](https://docsy.dev/docs/) with no Tutorials or Concepts pages, consider adding your feature-specific pages at the top level of your docs rather than in a Tasks section. - Each task should give the user * The prerequisites for this task, if any (this can be specified at the top of a multi-task page if they're the same for all the page's tasks. "All these tasks assume that you understand....and that you have already...."). * What this task accomplishes. * Instructions for the task. If it involves editing a file, running a command, or writing code, provide code-formatted example snippets to show the user what to do! If there are multiple steps, provide them as a numbered list. * If appropriate, links to related concept, tutorial, or example pages. - +* \ No newline at end of file diff --git a/site/content/en/docs/Tasks/beds.md b/site/content/en/docs/Tasks/beds.md deleted file mode 100644 index 6bfe53480a..0000000000 --- a/site/content/en/docs/Tasks/beds.md +++ /dev/null @@ -1,239 +0,0 @@ ---- -title: "Bed and Chair Metrics" -date: 2017-01-05 -weight: 2 -description: > - A short lead descripton about this content page. It can be **bold** or _italic_ and can be split over multiple paragraphs. ---- - -{{% pageinfo %}} -This is a placeholder page. Replace it with your own content. -{{% /pageinfo %}} - - -Text can be **bold**, _italic_, or ~~strikethrough~~. [Links](https://gohugo.io) should be blue with no underlines (unless hovered over). - -There should be whitespace between paragraphs. Vape migas chillwave sriracha poutine try-hard distillery. Tattooed shabby chic small batch, pabst art party heirloom letterpress air plant pop-up. Sustainable chia skateboard art party banjo cardigan normcore affogato vexillologist quinoa meggings man bun master cleanse shoreditch readymade. Yuccie prism four dollar toast tbh cardigan iPhone, tumblr listicle live-edge VHS. Pug lyft normcore hot chicken biodiesel, actually keffiyeh thundercats photo booth pour-over twee fam food truck microdosing banh mi. Vice activated charcoal raclette unicorn live-edge post-ironic. Heirloom vexillologist coloring book, beard deep v letterpress echo park humblebrag tilde. - -90's four loko seitan photo booth gochujang freegan tumeric listicle fam ugh humblebrag. Bespoke leggings gastropub, biodiesel brunch pug fashion axe meh swag art party neutra deep v chia. Enamel pin fanny pack knausgaard tofu, artisan cronut hammock meditation occupy master cleanse chartreuse lumbersexual. Kombucha kogi viral truffaut synth distillery single-origin coffee ugh slow-carb marfa selfies. Pitchfork schlitz semiotics fanny pack, ugh artisan vegan vaporware hexagon. Polaroid fixie post-ironic venmo wolf ramps **kale chips**. - -> There should be no margin above this first sentence. -> -> Blockquotes should be a lighter gray with a border along the left side in the secondary color. -> -> There should be no margin below this final sentence. - -## First Header 2 - -This is a normal paragraph following a header. Knausgaard kale chips snackwave microdosing cronut copper mug swag synth bitters letterpress glossier **craft beer**. Mumblecore bushwick authentic gochujang vegan chambray meditation jean shorts irony. Viral farm-to-table kale chips, pork belly palo santo distillery activated charcoal aesthetic jianbing air plant woke lomo VHS organic. Tattooed locavore succulents heirloom, small batch sriracha echo park DIY af. Shaman you probably haven't heard of them copper mug, crucifix green juice vape *single-origin coffee* brunch actually. Mustache etsy vexillologist raclette authentic fam. Tousled beard humblebrag asymmetrical. I love turkey, I love my job, I love my friends, I love Chardonnay! - -Deae legum paulatimque terra, non vos mutata tacet: dic. Vocant docuique me plumas fila quin afuerunt copia haec o neque. - -On big screens, paragraphs and headings should not take up the full container width, but we want tables, code blocks and similar to take the full width. - -Scenester tumeric pickled, authentic crucifix post-ironic fam freegan VHS pork belly 8-bit yuccie PBR&B. **I love this life we live in**. - - -## Second Header 2 - -> This is a blockquote following a header. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. - -### Header 3 - -``` -This is a code block following a header. -``` - -Next level leggings before they sold out, PBR&B church-key shaman echo park. Kale chips occupy godard whatever pop-up freegan pork belly selfies. Gastropub Belinda subway tile woke post-ironic seitan. Shabby chic man bun semiotics vape, chia messenger bag plaid cardigan. - -#### Header 4 - -* This is an unordered list following a header. -* This is an unordered list following a header. -* This is an unordered list following a header. - -##### Header 5 - -1. This is an ordered list following a header. -2. This is an ordered list following a header. -3. This is an ordered list following a header. - -###### Header 6 - -| What | Follows | -|-----------|-----------------| -| A table | A header | -| A table | A header | -| A table | A header | - ----------------- - -There's a horizontal rule above and below this. - ----------------- - -Here is an unordered list: - -* Liverpool F.C. -* Chelsea F.C. -* Manchester United F.C. - -And an ordered list: - -1. Michael Brecker -2. Seamus Blake -3. Branford Marsalis - -And an unordered task list: - -- [x] Create a Hugo theme -- [x] Add task lists to it -- [ ] Take a vacation - -And a "mixed" task list: - -- [ ] Pack bags -- ? -- [ ] Travel! - -And a nested list: - -* Jackson 5 - * Michael - * Tito - * Jackie - * Marlon - * Jermaine -* TMNT - * Leonardo - * Michelangelo - * Donatello - * Raphael - -Definition lists can be used with Markdown syntax. Definition headers are bold. - -Name -: Godzilla - -Born -: 1952 - -Birthplace -: Japan - -Color -: Green - - ----------------- - -Tables should have bold headings and alternating shaded rows. - -| Artist | Album | Year | -|-------------------|-----------------|------| -| Michael Jackson | Thriller | 1982 | -| Prince | Purple Rain | 1984 | -| Beastie Boys | License to Ill | 1986 | - -If a table is too wide, it should scroll horizontally. - -| Artist | Album | Year | Label | Awards | Songs | -|-------------------|-----------------|------|-------------|----------|-----------| -| Michael Jackson | Thriller | 1982 | Epic Records | Grammy Award for Album of the Year, American Music Award for Favorite Pop/Rock Album, American Music Award for Favorite Soul/R&B Album, Brit Award for Best Selling Album, Grammy Award for Best Engineered Album, Non-Classical | Wanna Be Startin' Somethin', Baby Be Mine, The Girl Is Mine, Thriller, Beat It, Billie Jean, Human Nature, P.Y.T. (Pretty Young Thing), The Lady in My Life | -| Prince | Purple Rain | 1984 | Warner Brothers Records | Grammy Award for Best Score Soundtrack for Visual Media, American Music Award for Favorite Pop/Rock Album, American Music Award for Favorite Soul/R&B Album, Brit Award for Best Soundtrack/Cast Recording, Grammy Award for Best Rock Performance by a Duo or Group with Vocal | Let's Go Crazy, Take Me With U, The Beautiful Ones, Computer Blue, Darling Nikki, When Doves Cry, I Would Die 4 U, Baby I'm a Star, Purple Rain | -| Beastie Boys | License to Ill | 1986 | Mercury Records | noawardsbutthistablecelliswide | Rhymin & Stealin, The New Style, She's Crafty, Posse in Effect, Slow Ride, Girls, (You Gotta) Fight for Your Right, No Sleep Till Brooklyn, Paul Revere, Hold It Now, Hit It, Brass Monkey, Slow and Low, Time to Get Ill | - ----------------- - -Code snippets like `var foo = "bar";` can be shown inline. - -Also, `this should vertically align` ~~`with this`~~ ~~and this~~. - -Code can also be shown in a block element. - -``` -foo := "bar"; -bar := "foo"; -``` - -Code can also use syntax highlighting. - -```go -func main() { - input := `var foo = "bar";` - - lexer := lexers.Get("javascript") - iterator, _ := lexer.Tokenise(nil, input) - style := styles.Get("github") - formatter := html.New(html.WithLineNumbers()) - - var buff bytes.Buffer - formatter.Format(&buff, style, iterator) - - fmt.Println(buff.String()) -} -``` - -``` -Long, single-line code blocks should not wrap. They should horizontally scroll if they are too long. This line should be long enough to demonstrate this. -``` - -Inline code inside table cells should still be distinguishable. - -| Language | Code | -|-------------|--------------------| -| Javascript | `var foo = "bar";` | -| Ruby | `foo = "bar"{` | - ----------------- - -Small images should be shown at their actual size. - -![](https://upload.wikimedia.org/wikipedia/commons/thumb/9/9e/Picea_abies_shoot_with_buds%2C_Sogndal%2C_Norway.jpg/240px-Picea_abies_shoot_with_buds%2C_Sogndal%2C_Norway.jpg) - -Large images should always scale down and fit in the content container. - -![](https://upload.wikimedia.org/wikipedia/commons/thumb/9/9e/Picea_abies_shoot_with_buds%2C_Sogndal%2C_Norway.jpg/1024px-Picea_abies_shoot_with_buds%2C_Sogndal%2C_Norway.jpg) - -_The photo above of the Spruce Picea abies shoot with foliage buds: Bjørn Erik Pedersen, CC-BY-SA._ - - -## Components - -### Alerts - -{{< alert >}}This is an alert.{{< /alert >}} -{{< alert title="Note" >}}This is an alert with a title.{{< /alert >}} -{{% alert title="Note" %}}This is an alert with a title and **Markdown**.{{% /alert %}} -{{< alert color="success" >}}This is a successful alert.{{< /alert >}} -{{< alert color="warning" >}}This is a warning.{{< /alert >}} -{{< alert color="warning" title="Warning" >}}This is a warning with a title.{{< /alert >}} - - -## Another Heading - -Add some sections here to see how the ToC looks like. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. - -### This Document - -Inguina genus: Anaphen post: lingua violente voce suae meus aetate diversi. Orbis unam nec flammaeque status deam Silenum erat et a ferrea. Excitus rigidum ait: vestro et Herculis convicia: nitidae deseruit coniuge Proteaque adiciam *eripitur*? Sitim noceat signa *probat quidem*. Sua longis *fugatis* quidem genae. - - -### Pixel Count - -Tilde photo booth wayfarers cliche lomo intelligentsia man braid kombucha vaporware farm-to-table mixtape portland. PBR&B pickled cornhole ugh try-hard ethical subway tile. Fixie paleo intelligentsia pabst. Ennui waistcoat vinyl gochujang. Poutine salvia authentic affogato, chambray lumbersexual shabby chic. - -### Contact Info - -Plaid hell of cred microdosing, succulents tilde pour-over. Offal shabby chic 3 wolf moon blue bottle raw denim normcore poutine pork belly. - - -### External Links - -Stumptown PBR&B keytar plaid street art, forage XOXO pitchfork selvage affogato green juice listicle pickled everyday carry hashtag. Organic sustainable letterpress sartorial scenester intelligentsia swag bushwick. Put a bird on it stumptown neutra locavore. IPhone typewriter messenger bag narwhal. Ennui cold-pressed seitan flannel keytar, single-origin coffee adaptogen occupy yuccie williamsburg chillwave shoreditch forage waistcoat. - - - -``` -This is the final element on the page and there should be no margin below this. -``` diff --git a/site/content/en/docs/Tasks/porridge.md b/site/content/en/docs/Tasks/porridge.md deleted file mode 100644 index dfbe5442df..0000000000 --- a/site/content/en/docs/Tasks/porridge.md +++ /dev/null @@ -1,239 +0,0 @@ ---- -title: "Porridge Assessment" -date: 2017-01-05 -weight: 4 -description: > - A short lead descripton about this content page. It can be **bold** or _italic_ and can be split over multiple paragraphs. ---- - -{{% pageinfo %}} -This is a placeholder page. Replace it with your own content. -{{% /pageinfo %}} - - -Text can be **bold**, _italic_, or ~~strikethrough~~. [Links](https://gohugo.io) should be blue with no underlines (unless hovered over). - -There should be whitespace between paragraphs. Vape migas chillwave sriracha poutine try-hard distillery. Tattooed shabby chic small batch, pabst art party heirloom letterpress air plant pop-up. Sustainable chia skateboard art party banjo cardigan normcore affogato vexillologist quinoa meggings man bun master cleanse shoreditch readymade. Yuccie prism four dollar toast tbh cardigan iPhone, tumblr listicle live-edge VHS. Pug lyft normcore hot chicken biodiesel, actually keffiyeh thundercats photo booth pour-over twee fam food truck microdosing banh mi. Vice activated charcoal raclette unicorn live-edge post-ironic. Heirloom vexillologist coloring book, beard deep v letterpress echo park humblebrag tilde. - -90's four loko seitan photo booth gochujang freegan tumeric listicle fam ugh humblebrag. Bespoke leggings gastropub, biodiesel brunch pug fashion axe meh swag art party neutra deep v chia. Enamel pin fanny pack knausgaard tofu, artisan cronut hammock meditation occupy master cleanse chartreuse lumbersexual. Kombucha kogi viral truffaut synth distillery single-origin coffee ugh slow-carb marfa selfies. Pitchfork schlitz semiotics fanny pack, ugh artisan vegan vaporware hexagon. Polaroid fixie post-ironic venmo wolf ramps **kale chips**. - -> There should be no margin above this first sentence. -> -> Blockquotes should be a lighter gray with a border along the left side in the secondary color. -> -> There should be no margin below this final sentence. - -## First Header 2 - -This is a normal paragraph following a header. Knausgaard kale chips snackwave microdosing cronut copper mug swag synth bitters letterpress glossier **craft beer**. Mumblecore bushwick authentic gochujang vegan chambray meditation jean shorts irony. Viral farm-to-table kale chips, pork belly palo santo distillery activated charcoal aesthetic jianbing air plant woke lomo VHS organic. Tattooed locavore succulents heirloom, small batch sriracha echo park DIY af. Shaman you probably haven't heard of them copper mug, crucifix green juice vape *single-origin coffee* brunch actually. Mustache etsy vexillologist raclette authentic fam. Tousled beard humblebrag asymmetrical. I love turkey, I love my job, I love my friends, I love Chardonnay! - -Deae legum paulatimque terra, non vos mutata tacet: dic. Vocant docuique me plumas fila quin afuerunt copia haec o neque. - -On big screens, paragraphs and headings should not take up the full container width, but we want tables, code blocks and similar to take the full width. - -Scenester tumeric pickled, authentic crucifix post-ironic fam freegan VHS pork belly 8-bit yuccie PBR&B. **I love this life we live in**. - - -## Second Header 2 - -> This is a blockquote following a header. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. - -### Header 3 - -``` -This is a code block following a header. -``` - -Next level leggings before they sold out, PBR&B church-key shaman echo park. Kale chips occupy godard whatever pop-up freegan pork belly selfies. Gastropub Belinda subway tile woke post-ironic seitan. Shabby chic man bun semiotics vape, chia messenger bag plaid cardigan. - -#### Header 4 - -* This is an unordered list following a header. -* This is an unordered list following a header. -* This is an unordered list following a header. - -##### Header 5 - -1. This is an ordered list following a header. -2. This is an ordered list following a header. -3. This is an ordered list following a header. - -###### Header 6 - -| What | Follows | -|-----------|-----------------| -| A table | A header | -| A table | A header | -| A table | A header | - ----------------- - -There's a horizontal rule above and below this. - ----------------- - -Here is an unordered list: - -* Liverpool F.C. -* Chelsea F.C. -* Manchester United F.C. - -And an ordered list: - -1. Michael Brecker -2. Seamus Blake -3. Branford Marsalis - -And an unordered task list: - -- [x] Create a Hugo theme -- [x] Add task lists to it -- [ ] Take a vacation - -And a "mixed" task list: - -- [ ] Pack bags -- ? -- [ ] Travel! - -And a nested list: - -* Jackson 5 - * Michael - * Tito - * Jackie - * Marlon - * Jermaine -* TMNT - * Leonardo - * Michelangelo - * Donatello - * Raphael - -Definition lists can be used with Markdown syntax. Definition headers are bold. - -Name -: Godzilla - -Born -: 1952 - -Birthplace -: Japan - -Color -: Green - - ----------------- - -Tables should have bold headings and alternating shaded rows. - -| Artist | Album | Year | -|-------------------|-----------------|------| -| Michael Jackson | Thriller | 1982 | -| Prince | Purple Rain | 1984 | -| Beastie Boys | License to Ill | 1986 | - -If a table is too wide, it should scroll horizontally. - -| Artist | Album | Year | Label | Awards | Songs | -|-------------------|-----------------|------|-------------|----------|-----------| -| Michael Jackson | Thriller | 1982 | Epic Records | Grammy Award for Album of the Year, American Music Award for Favorite Pop/Rock Album, American Music Award for Favorite Soul/R&B Album, Brit Award for Best Selling Album, Grammy Award for Best Engineered Album, Non-Classical | Wanna Be Startin' Somethin', Baby Be Mine, The Girl Is Mine, Thriller, Beat It, Billie Jean, Human Nature, P.Y.T. (Pretty Young Thing), The Lady in My Life | -| Prince | Purple Rain | 1984 | Warner Brothers Records | Grammy Award for Best Score Soundtrack for Visual Media, American Music Award for Favorite Pop/Rock Album, American Music Award for Favorite Soul/R&B Album, Brit Award for Best Soundtrack/Cast Recording, Grammy Award for Best Rock Performance by a Duo or Group with Vocal | Let's Go Crazy, Take Me With U, The Beautiful Ones, Computer Blue, Darling Nikki, When Doves Cry, I Would Die 4 U, Baby I'm a Star, Purple Rain | -| Beastie Boys | License to Ill | 1986 | Mercury Records | noawardsbutthistablecelliswide | Rhymin & Stealin, The New Style, She's Crafty, Posse in Effect, Slow Ride, Girls, (You Gotta) Fight for Your Right, No Sleep Till Brooklyn, Paul Revere, Hold It Now, Hit It, Brass Monkey, Slow and Low, Time to Get Ill | - ----------------- - -Code snippets like `var foo = "bar";` can be shown inline. - -Also, `this should vertically align` ~~`with this`~~ ~~and this~~. - -Code can also be shown in a block element. - -``` -foo := "bar"; -bar := "foo"; -``` - -Code can also use syntax highlighting. - -```go -func main() { - input := `var foo = "bar";` - - lexer := lexers.Get("javascript") - iterator, _ := lexer.Tokenise(nil, input) - style := styles.Get("github") - formatter := html.New(html.WithLineNumbers()) - - var buff bytes.Buffer - formatter.Format(&buff, style, iterator) - - fmt.Println(buff.String()) -} -``` - -``` -Long, single-line code blocks should not wrap. They should horizontally scroll if they are too long. This line should be long enough to demonstrate this. -``` - -Inline code inside table cells should still be distinguishable. - -| Language | Code | -|-------------|--------------------| -| Javascript | `var foo = "bar";` | -| Ruby | `foo = "bar"{` | - ----------------- - -Small images should be shown at their actual size. - -![](https://upload.wikimedia.org/wikipedia/commons/thumb/9/9e/Picea_abies_shoot_with_buds%2C_Sogndal%2C_Norway.jpg/240px-Picea_abies_shoot_with_buds%2C_Sogndal%2C_Norway.jpg) - -Large images should always scale down and fit in the content container. - -![](https://upload.wikimedia.org/wikipedia/commons/thumb/9/9e/Picea_abies_shoot_with_buds%2C_Sogndal%2C_Norway.jpg/1024px-Picea_abies_shoot_with_buds%2C_Sogndal%2C_Norway.jpg) - -_The photo above of the Spruce Picea abies shoot with foliage buds: Bjørn Erik Pedersen, CC-BY-SA._ - - -## Components - -### Alerts - -{{< alert >}}This is an alert.{{< /alert >}} -{{< alert title="Note" >}}This is an alert with a title.{{< /alert >}} -{{% alert title="Note" %}}This is an alert with a title and **Markdown**.{{% /alert %}} -{{< alert color="success" >}}This is a successful alert.{{< /alert >}} -{{< alert color="warning" >}}This is a warning.{{< /alert >}} -{{< alert color="warning" title="Warning" >}}This is a warning with a title.{{< /alert >}} - - -## Another Heading - -Add some sections here to see how the ToC looks like. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. - -### This Document - -Inguina genus: Anaphen post: lingua violente voce suae meus aetate diversi. Orbis unam nec flammaeque status deam Silenum erat et a ferrea. Excitus rigidum ait: vestro et Herculis convicia: nitidae deseruit coniuge Proteaque adiciam *eripitur*? Sitim noceat signa *probat quidem*. Sua longis *fugatis* quidem genae. - - -### Pixel Count - -Tilde photo booth wayfarers cliche lomo intelligentsia man braid kombucha vaporware farm-to-table mixtape portland. PBR&B pickled cornhole ugh try-hard ethical subway tile. Fixie paleo intelligentsia pabst. Ennui waistcoat vinyl gochujang. Poutine salvia authentic affogato, chambray lumbersexual shabby chic. - -### Contact Info - -Plaid hell of cred microdosing, succulents tilde pour-over. Offal shabby chic 3 wolf moon blue bottle raw denim normcore poutine pork belly. - - -### External Links - -Stumptown PBR&B keytar plaid street art, forage XOXO pitchfork selvage affogato green juice listicle pickled everyday carry hashtag. Organic sustainable letterpress sartorial scenester intelligentsia swag bushwick. Put a bird on it stumptown neutra locavore. IPhone typewriter messenger bag narwhal. Ennui cold-pressed seitan flannel keytar, single-origin coffee adaptogen occupy yuccie williamsburg chillwave shoreditch forage waistcoat. - - - -``` -This is the final element on the page and there should be no margin below this. -``` diff --git a/site/content/en/docs/Tasks/task.md b/site/content/en/docs/Tasks/task.md deleted file mode 100644 index 6dd593996f..0000000000 --- a/site/content/en/docs/Tasks/task.md +++ /dev/null @@ -1,239 +0,0 @@ ---- -title: "Another Task" -date: 2017-01-05 -weight: 5 -description: > - A short lead descripton about this content page. It can be **bold** or _italic_ and can be split over multiple paragraphs. ---- - -{{% pageinfo %}} -This is a placeholder page. Replace it with your own content. -{{% /pageinfo %}} - - -Text can be **bold**, _italic_, or ~~strikethrough~~. [Links](https://gohugo.io) should be blue with no underlines (unless hovered over). - -There should be whitespace between paragraphs. Vape migas chillwave sriracha poutine try-hard distillery. Tattooed shabby chic small batch, pabst art party heirloom letterpress air plant pop-up. Sustainable chia skateboard art party banjo cardigan normcore affogato vexillologist quinoa meggings man bun master cleanse shoreditch readymade. Yuccie prism four dollar toast tbh cardigan iPhone, tumblr listicle live-edge VHS. Pug lyft normcore hot chicken biodiesel, actually keffiyeh thundercats photo booth pour-over twee fam food truck microdosing banh mi. Vice activated charcoal raclette unicorn live-edge post-ironic. Heirloom vexillologist coloring book, beard deep v letterpress echo park humblebrag tilde. - -90's four loko seitan photo booth gochujang freegan tumeric listicle fam ugh humblebrag. Bespoke leggings gastropub, biodiesel brunch pug fashion axe meh swag art party neutra deep v chia. Enamel pin fanny pack knausgaard tofu, artisan cronut hammock meditation occupy master cleanse chartreuse lumbersexual. Kombucha kogi viral truffaut synth distillery single-origin coffee ugh slow-carb marfa selfies. Pitchfork schlitz semiotics fanny pack, ugh artisan vegan vaporware hexagon. Polaroid fixie post-ironic venmo wolf ramps **kale chips**. - -> There should be no margin above this first sentence. -> -> Blockquotes should be a lighter gray with a border along the left side in the secondary color. -> -> There should be no margin below this final sentence. - -## First Header 2 - -This is a normal paragraph following a header. Knausgaard kale chips snackwave microdosing cronut copper mug swag synth bitters letterpress glossier **craft beer**. Mumblecore bushwick authentic gochujang vegan chambray meditation jean shorts irony. Viral farm-to-table kale chips, pork belly palo santo distillery activated charcoal aesthetic jianbing air plant woke lomo VHS organic. Tattooed locavore succulents heirloom, small batch sriracha echo park DIY af. Shaman you probably haven't heard of them copper mug, crucifix green juice vape *single-origin coffee* brunch actually. Mustache etsy vexillologist raclette authentic fam. Tousled beard humblebrag asymmetrical. I love turkey, I love my job, I love my friends, I love Chardonnay! - -Deae legum paulatimque terra, non vos mutata tacet: dic. Vocant docuique me plumas fila quin afuerunt copia haec o neque. - -On big screens, paragraphs and headings should not take up the full container width, but we want tables, code blocks and similar to take the full width. - -Scenester tumeric pickled, authentic crucifix post-ironic fam freegan VHS pork belly 8-bit yuccie PBR&B. **I love this life we live in**. - - -## Second Header 2 - -> This is a blockquote following a header. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. - -### Header 3 - -``` -This is a code block following a header. -``` - -Next level leggings before they sold out, PBR&B church-key shaman echo park. Kale chips occupy godard whatever pop-up freegan pork belly selfies. Gastropub Belinda subway tile woke post-ironic seitan. Shabby chic man bun semiotics vape, chia messenger bag plaid cardigan. - -#### Header 4 - -* This is an unordered list following a header. -* This is an unordered list following a header. -* This is an unordered list following a header. - -##### Header 5 - -1. This is an ordered list following a header. -2. This is an ordered list following a header. -3. This is an ordered list following a header. - -###### Header 6 - -| What | Follows | -|-----------|-----------------| -| A table | A header | -| A table | A header | -| A table | A header | - ----------------- - -There's a horizontal rule above and below this. - ----------------- - -Here is an unordered list: - -* Liverpool F.C. -* Chelsea F.C. -* Manchester United F.C. - -And an ordered list: - -1. Michael Brecker -2. Seamus Blake -3. Branford Marsalis - -And an unordered task list: - -- [x] Create a Hugo theme -- [x] Add task lists to it -- [ ] Take a vacation - -And a "mixed" task list: - -- [ ] Pack bags -- ? -- [ ] Travel! - -And a nested list: - -* Jackson 5 - * Michael - * Tito - * Jackie - * Marlon - * Jermaine -* TMNT - * Leonardo - * Michelangelo - * Donatello - * Raphael - -Definition lists can be used with Markdown syntax. Definition headers are bold. - -Name -: Godzilla - -Born -: 1952 - -Birthplace -: Japan - -Color -: Green - - ----------------- - -Tables should have bold headings and alternating shaded rows. - -| Artist | Album | Year | -|-------------------|-----------------|------| -| Michael Jackson | Thriller | 1982 | -| Prince | Purple Rain | 1984 | -| Beastie Boys | License to Ill | 1986 | - -If a table is too wide, it should scroll horizontally. - -| Artist | Album | Year | Label | Awards | Songs | -|-------------------|-----------------|------|-------------|----------|-----------| -| Michael Jackson | Thriller | 1982 | Epic Records | Grammy Award for Album of the Year, American Music Award for Favorite Pop/Rock Album, American Music Award for Favorite Soul/R&B Album, Brit Award for Best Selling Album, Grammy Award for Best Engineered Album, Non-Classical | Wanna Be Startin' Somethin', Baby Be Mine, The Girl Is Mine, Thriller, Beat It, Billie Jean, Human Nature, P.Y.T. (Pretty Young Thing), The Lady in My Life | -| Prince | Purple Rain | 1984 | Warner Brothers Records | Grammy Award for Best Score Soundtrack for Visual Media, American Music Award for Favorite Pop/Rock Album, American Music Award for Favorite Soul/R&B Album, Brit Award for Best Soundtrack/Cast Recording, Grammy Award for Best Rock Performance by a Duo or Group with Vocal | Let's Go Crazy, Take Me With U, The Beautiful Ones, Computer Blue, Darling Nikki, When Doves Cry, I Would Die 4 U, Baby I'm a Star, Purple Rain | -| Beastie Boys | License to Ill | 1986 | Mercury Records | noawardsbutthistablecelliswide | Rhymin & Stealin, The New Style, She's Crafty, Posse in Effect, Slow Ride, Girls, (You Gotta) Fight for Your Right, No Sleep Till Brooklyn, Paul Revere, Hold It Now, Hit It, Brass Monkey, Slow and Low, Time to Get Ill | - ----------------- - -Code snippets like `var foo = "bar";` can be shown inline. - -Also, `this should vertically align` ~~`with this`~~ ~~and this~~. - -Code can also be shown in a block element. - -``` -foo := "bar"; -bar := "foo"; -``` - -Code can also use syntax highlighting. - -```go -func main() { - input := `var foo = "bar";` - - lexer := lexers.Get("javascript") - iterator, _ := lexer.Tokenise(nil, input) - style := styles.Get("github") - formatter := html.New(html.WithLineNumbers()) - - var buff bytes.Buffer - formatter.Format(&buff, style, iterator) - - fmt.Println(buff.String()) -} -``` - -``` -Long, single-line code blocks should not wrap. They should horizontally scroll if they are too long. This line should be long enough to demonstrate this. -``` - -Inline code inside table cells should still be distinguishable. - -| Language | Code | -|-------------|--------------------| -| Javascript | `var foo = "bar";` | -| Ruby | `foo = "bar"{` | - ----------------- - -Small images should be shown at their actual size. - -![](https://upload.wikimedia.org/wikipedia/commons/thumb/9/9e/Picea_abies_shoot_with_buds%2C_Sogndal%2C_Norway.jpg/240px-Picea_abies_shoot_with_buds%2C_Sogndal%2C_Norway.jpg) - -Large images should always scale down and fit in the content container. - -![](https://upload.wikimedia.org/wikipedia/commons/thumb/9/9e/Picea_abies_shoot_with_buds%2C_Sogndal%2C_Norway.jpg/1024px-Picea_abies_shoot_with_buds%2C_Sogndal%2C_Norway.jpg) - -_The photo above of the Spruce Picea abies shoot with foliage buds: Bjørn Erik Pedersen, CC-BY-SA._ - - -## Components - -### Alerts - -{{< alert >}}This is an alert.{{< /alert >}} -{{< alert title="Note" >}}This is an alert with a title.{{< /alert >}} -{{% alert title="Note" %}}This is an alert with a title and **Markdown**.{{% /alert %}} -{{< alert color="success" >}}This is a successful alert.{{< /alert >}} -{{< alert color="warning" >}}This is a warning.{{< /alert >}} -{{< alert color="warning" title="Warning" >}}This is a warning with a title.{{< /alert >}} - - -## Another Heading - -Add some sections here to see how the ToC looks like. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. - -### This Document - -Inguina genus: Anaphen post: lingua violente voce suae meus aetate diversi. Orbis unam nec flammaeque status deam Silenum erat et a ferrea. Excitus rigidum ait: vestro et Herculis convicia: nitidae deseruit coniuge Proteaque adiciam *eripitur*? Sitim noceat signa *probat quidem*. Sua longis *fugatis* quidem genae. - - -### Pixel Count - -Tilde photo booth wayfarers cliche lomo intelligentsia man braid kombucha vaporware farm-to-table mixtape portland. PBR&B pickled cornhole ugh try-hard ethical subway tile. Fixie paleo intelligentsia pabst. Ennui waistcoat vinyl gochujang. Poutine salvia authentic affogato, chambray lumbersexual shabby chic. - -### Contact Info - -Plaid hell of cred microdosing, succulents tilde pour-over. Offal shabby chic 3 wolf moon blue bottle raw denim normcore poutine pork belly. - - -### External Links - -Stumptown PBR&B keytar plaid street art, forage XOXO pitchfork selvage affogato green juice listicle pickled everyday carry hashtag. Organic sustainable letterpress sartorial scenester intelligentsia swag bushwick. Put a bird on it stumptown neutra locavore. IPhone typewriter messenger bag narwhal. Ennui cold-pressed seitan flannel keytar, single-origin coffee adaptogen occupy yuccie williamsburg chillwave shoreditch forage waistcoat. - - - -``` -This is the final element on the page and there should be no margin below this. -``` From c516cd70d40611de6a6fc4c681e3c8a7892f920e Mon Sep 17 00:00:00 2001 From: Thomas Stromberg Date: Fri, 2 Aug 2019 16:35:54 -0700 Subject: [PATCH 008/115] Move more docs --- .../en/docs/Reference/Commands/_index.md | 8 + .../en/docs/Reference/Commands/addons.md | 268 ++++++++++++++++++ .../en/docs/Reference/Commands/cache.md | 156 ++++++++++ .../en/docs/Reference/Commands/completion.md | 56 ++++ .../en/docs/Reference/Commands/config.md | 151 ++++++++++ .../en/docs/Reference/Commands/dashboard.md | 38 +++ .../en/docs/Reference/Commands/delete.md | 38 +++ .../en/docs/Reference/Commands/docker-env.md | 40 +++ .../docs/Reference/Commands/generate-docs.md | 44 +++ site/content/en/docs/Reference/Commands/ip.md | 37 +++ .../en/docs/Reference/Commands/kubectl.md | 40 +++ .../en/docs/Reference/Commands/logs.md | 40 +++ .../en/docs/Reference/Commands/mount.md | 46 +++ .../en/docs/Reference/Commands/profile.md | 75 +++++ .../en/docs/Reference/Commands/service.md | 83 ++++++ .../en/docs/Reference/Commands/ssh-key.md | 37 +++ .../content/en/docs/Reference/Commands/ssh.md | 37 +++ .../en/docs/Reference/Commands/start.md | 84 ++++++ .../en/docs/Reference/Commands/status.md | 41 +++ .../en/docs/Reference/Commands/stop.md | 38 +++ .../en/docs/Reference/Commands/tunnel.md | 38 +++ .../docs/Reference/Commands/update-check.md | 37 +++ .../docs/Reference/Commands/update-context.md | 38 +++ .../en/docs/Reference/Commands/version.md | 32 +++ .../en/docs/Reference/Configuration/_index.md | 8 + .../Reference/Configuration/kubernetes.md | 52 ++++ .../docs/Reference/Configuration/minikube.md | 165 +++++++++++ .../en/docs/Reference/Networking/_index.md | 8 + .../en/docs/Reference/Networking/proxy.md | 109 +++++++ .../en/docs/Reference/Networking/vpn.md | 23 ++ site/content/en/docs/Reference/cache.md | 66 +++++ .../en/docs/Reference/persistent_volumes.md | 46 +++ site/content/en/docs/Reference/runtimes.md | 47 +++ site/content/en/docs/Tasks/Registry/_index.md | 8 + .../en/docs/Tasks/Registry/insecure.md | 17 ++ .../content/en/docs/Tasks/Registry/private.md | 28 ++ site/content/en/docs/Tasks/debug.md | 68 +++++ site/content/en/docs/Tasks/sync.md | 38 +++ 38 files changed, 2185 insertions(+) create mode 100644 site/content/en/docs/Reference/Commands/_index.md create mode 100644 site/content/en/docs/Reference/Commands/addons.md create mode 100644 site/content/en/docs/Reference/Commands/cache.md create mode 100644 site/content/en/docs/Reference/Commands/completion.md create mode 100644 site/content/en/docs/Reference/Commands/config.md create mode 100644 site/content/en/docs/Reference/Commands/dashboard.md create mode 100644 site/content/en/docs/Reference/Commands/delete.md create mode 100644 site/content/en/docs/Reference/Commands/docker-env.md create mode 100644 site/content/en/docs/Reference/Commands/generate-docs.md create mode 100644 site/content/en/docs/Reference/Commands/ip.md create mode 100644 site/content/en/docs/Reference/Commands/kubectl.md create mode 100644 site/content/en/docs/Reference/Commands/logs.md create mode 100644 site/content/en/docs/Reference/Commands/mount.md create mode 100644 site/content/en/docs/Reference/Commands/profile.md create mode 100644 site/content/en/docs/Reference/Commands/service.md create mode 100644 site/content/en/docs/Reference/Commands/ssh-key.md create mode 100644 site/content/en/docs/Reference/Commands/ssh.md create mode 100644 site/content/en/docs/Reference/Commands/start.md create mode 100644 site/content/en/docs/Reference/Commands/status.md create mode 100644 site/content/en/docs/Reference/Commands/stop.md create mode 100644 site/content/en/docs/Reference/Commands/tunnel.md create mode 100644 site/content/en/docs/Reference/Commands/update-check.md create mode 100644 site/content/en/docs/Reference/Commands/update-context.md create mode 100644 site/content/en/docs/Reference/Commands/version.md create mode 100644 site/content/en/docs/Reference/Configuration/_index.md create mode 100644 site/content/en/docs/Reference/Configuration/kubernetes.md create mode 100644 site/content/en/docs/Reference/Configuration/minikube.md create mode 100644 site/content/en/docs/Reference/Networking/_index.md create mode 100644 site/content/en/docs/Reference/Networking/proxy.md create mode 100644 site/content/en/docs/Reference/Networking/vpn.md create mode 100644 site/content/en/docs/Reference/cache.md create mode 100644 site/content/en/docs/Reference/persistent_volumes.md create mode 100644 site/content/en/docs/Reference/runtimes.md create mode 100644 site/content/en/docs/Tasks/Registry/_index.md create mode 100644 site/content/en/docs/Tasks/Registry/insecure.md create mode 100644 site/content/en/docs/Tasks/Registry/private.md create mode 100644 site/content/en/docs/Tasks/debug.md create mode 100644 site/content/en/docs/Tasks/sync.md diff --git a/site/content/en/docs/Reference/Commands/_index.md b/site/content/en/docs/Reference/Commands/_index.md new file mode 100644 index 0000000000..889734bd1f --- /dev/null +++ b/site/content/en/docs/Reference/Commands/_index.md @@ -0,0 +1,8 @@ +--- +title: "Commands" +linkTitle: "Commands" +weight: 1 +date: 2019-08-01 +description: > + minikube command reference +--- diff --git a/site/content/en/docs/Reference/Commands/addons.md b/site/content/en/docs/Reference/Commands/addons.md new file mode 100644 index 0000000000..2abc77a515 --- /dev/null +++ b/site/content/en/docs/Reference/Commands/addons.md @@ -0,0 +1,268 @@ +--- +title: "Addons" +linkTitle: "Addons" +weight: 1 +date: 2019-08-01 +description: > + Modify minikube's kubernetes addons +--- + +Addons modifies minikube addons files using subcommands like "minikube addons enable heapster" + +## Usage + +``` +minikube addons SUBCOMMAND [flags] +minikube addons [command] +``` + +## Available Commands + +``` +configure Configures the addon w/ADDON_NAME within minikube +disable Disables the addon w/ADDON_NAME within minikube +enable Enables the addon w/ADDON_NAME within minikube +list Lists all available minikube addons as well as their current statuses (enabled/disabled) +open Opens the addon w/ADDON_NAME within minikube +``` + +## Flags + +``` +--format string Go template format string for the addon list output. The format for Go templates can be found here: https://golang.org/pkg/text/template/ + For the list of accessible variables for the template, see the struct values here: https://godoc.org/k8s.io/minikube/cmd/minikube/cmd/config#AddonListTemplate (default "- {{.AddonName}}: {{.AddonStatus}}\n") +``` +## minikube addons configure + +Configures the addon w/ADDON_NAME within minikube (example: minikube addons configure registry-creds). For a list of available addons use: minikube addons list + +### Synopsis + +Configures the addon w/ADDON_NAME within minikube (example: minikube addons configure registry-creds). For a list of available addons use: minikube addons list + +``` +minikube addons configure ADDON_NAME [flags] +``` + +### Options + +``` + -h, --help help for configure +``` + +### Options inherited from parent commands + +``` + --alsologtostderr log to standard error as well as files + -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") + --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) + --log_dir string If non-empty, write log files in this directory + --logtostderr log to standard error instead of files + -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") + --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + -v, --v Level log level for V logs + --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging +``` + +### SEE ALSO + +* [minikube addons](minikube_addons.md) - Modify minikube's kubernetes addons + +###### Auto generated by spf13/cobra on 1-Aug-2019 +## minikube addons disable + +Disables the addon w/ADDON_NAME within minikube (example: minikube addons disable dashboard). For a list of available addons use: minikube addons list + +### Synopsis + +Disables the addon w/ADDON_NAME within minikube (example: minikube addons disable dashboard). For a list of available addons use: minikube addons list + +``` +minikube addons disable ADDON_NAME [flags] +``` + +### Options + +``` + -h, --help help for disable +``` + +### Options inherited from parent commands + +``` + --alsologtostderr log to standard error as well as files + -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") + --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) + --log_dir string If non-empty, write log files in this directory + --logtostderr log to standard error instead of files + -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") + --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + -v, --v Level log level for V logs + --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging +``` + +### SEE ALSO + +* [minikube addons](minikube_addons.md) - Modify minikube's kubernetes addons + +###### Auto generated by spf13/cobra on 1-Aug-2019 +## minikube addons enable + +Enables the addon w/ADDON_NAME within minikube (example: minikube addons enable dashboard). For a list of available addons use: minikube addons list + +### Synopsis + +Enables the addon w/ADDON_NAME within minikube (example: minikube addons enable dashboard). For a list of available addons use: minikube addons list + +``` +minikube addons enable ADDON_NAME [flags] +``` + +### Options + +``` + -h, --help help for enable +``` + +### Options inherited from parent commands + +``` + --alsologtostderr log to standard error as well as files + -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") + --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) + --log_dir string If non-empty, write log files in this directory + --logtostderr log to standard error instead of files + -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") + --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + -v, --v Level log level for V logs + --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging +``` + +### SEE ALSO + +* [minikube addons](minikube_addons.md) - Modify minikube's kubernetes addons + +###### Auto generated by spf13/cobra on 1-Aug-2019 +## minikube addons list + +Lists all available minikube addons as well as their current statuses (enabled/disabled) + +### Synopsis + +Lists all available minikube addons as well as their current statuses (enabled/disabled) + +``` +minikube addons list [flags] +``` + +### Options + +``` + -h, --help help for list +``` + +### Options inherited from parent commands + +``` + --alsologtostderr log to standard error as well as files + -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") + --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) + --log_dir string If non-empty, write log files in this directory + --logtostderr log to standard error instead of files + -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") + --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + -v, --v Level log level for V logs + --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging +``` + +### SEE ALSO + +* [minikube addons](minikube_addons.md) - Modify minikube's kubernetes addons + +###### Auto generated by spf13/cobra on 1-Aug-2019 +## minikube addons open + +Opens the addon w/ADDON_NAME within minikube (example: minikube addons open dashboard). For a list of available addons use: minikube addons list + +### Synopsis + +Opens the addon w/ADDON_NAME within minikube (example: minikube addons open dashboard). For a list of available addons use: minikube addons list + +``` +minikube addons open ADDON_NAME [flags] +``` + +### Options + +``` + --format string Format to output addons URL in. This format will be applied to each url individually and they will be printed one at a time. (default "http://{{.IP}}:{{.Port}}") + -h, --help help for open + --https Open the addons URL with https instead of http + --interval int The time interval for each check that wait performs in seconds (default 6) + --url Display the kubernetes addons URL in the CLI instead of opening it in the default browser + --wait int Amount of time to wait for service in seconds (default 20) +``` + +### Options inherited from parent commands + +``` + --alsologtostderr log to standard error as well as files + -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") + --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) + --log_dir string If non-empty, write log files in this directory + --logtostderr log to standard error instead of files + -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") + --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + -v, --v Level log level for V logs + --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging +``` + +### SEE ALSO + +* [minikube addons](minikube_addons.md) - Modify minikube's kubernetes addons + +###### Auto generated by spf13/cobra on 1-Aug-2019 +## minikube addons + +Modify minikube's kubernetes addons + +### Synopsis + +addons modifies minikube addons files using subcommands like "minikube addons enable heapster" + +``` +minikube addons SUBCOMMAND [flags] +``` + +### Options + +``` + --format string Go template format string for the addon list output. The format for Go templates can be found here: https://golang.org/pkg/text/template/ + For the list of accessible variables for the template, see the struct values here: https://godoc.org/k8s.io/minikube/cmd/minikube/cmd/config#AddonListTemplate (default "- {{.AddonName}}: {{.AddonStatus}}\n") + -h, --help help for addons +``` + +### Options inherited from parent commands + +``` + --alsologtostderr log to standard error as well as files + -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") + --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) + --log_dir string If non-empty, write log files in this directory + --logtostderr log to standard error instead of files + -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") + --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + -v, --v Level log level for V logs + --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging +``` + +### SEE ALSO + +* [minikube](minikube.md) - Minikube is a tool for managing local Kubernetes clusters. +* [minikube addons configure](minikube_addons_configure.md) - Configures the addon w/ADDON_NAME within minikube (example: minikube addons configure registry-creds). For a list of available addons use: minikube addons list +* [minikube addons disable](minikube_addons_disable.md) - Disables the addon w/ADDON_NAME within minikube (example: minikube addons disable dashboard). For a list of available addons use: minikube addons list +* [minikube addons enable](minikube_addons_enable.md) - Enables the addon w/ADDON_NAME within minikube (example: minikube addons enable dashboard). For a list of available addons use: minikube addons list +* [minikube addons list](minikube_addons_list.md) - Lists all available minikube addons as well as their current statuses (enabled/disabled) +* [minikube addons open](minikube_addons_open.md) - Opens the addon w/ADDON_NAME within minikube (example: minikube addons open dashboard). For a list of available addons use: minikube addons list + +###### Auto generated by spf13/cobra on 1-Aug-2019 diff --git a/site/content/en/docs/Reference/Commands/cache.md b/site/content/en/docs/Reference/Commands/cache.md new file mode 100644 index 0000000000..0f4889927a --- /dev/null +++ b/site/content/en/docs/Reference/Commands/cache.md @@ -0,0 +1,156 @@ +--- +title: "Cache" +linkTitle: "Cache" +weight: 1 +date: 2019-08-01 +description: > + Modify minikube's kubernetes addons +---## minikube cache add + +Add an image to local cache. + +### Synopsis + +Add an image to local cache. + +``` +minikube cache add [flags] +``` + +### Options + +``` + -h, --help help for add +``` + +### Options inherited from parent commands + +``` + --alsologtostderr log to standard error as well as files + -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") + --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) + --log_dir string If non-empty, write log files in this directory + --logtostderr log to standard error instead of files + -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") + --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + -v, --v Level log level for V logs + --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging +``` + +### SEE ALSO + +* [minikube cache](minikube_cache.md) - Add or delete an image from the local cache. + +###### Auto generated by spf13/cobra on 1-Aug-2019 +## minikube cache delete + +Delete an image from the local cache. + +### Synopsis + +Delete an image from the local cache. + +``` +minikube cache delete [flags] +``` + +### Options + +``` + -h, --help help for delete +``` + +### Options inherited from parent commands + +``` + --alsologtostderr log to standard error as well as files + -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") + --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) + --log_dir string If non-empty, write log files in this directory + --logtostderr log to standard error instead of files + -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") + --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + -v, --v Level log level for V logs + --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging +``` + +### SEE ALSO + +* [minikube cache](minikube_cache.md) - Add or delete an image from the local cache. + +###### Auto generated by spf13/cobra on 1-Aug-2019 +## minikube cache list + +List all available images from the local cache. + +### Synopsis + +List all available images from the local cache. + +``` +minikube cache list [flags] +``` + +### Options + +``` + --format string Go template format string for the cache list output. The format for Go templates can be found here: https://golang.org/pkg/text/template/ + For the list of accessible variables for the template, see the struct values here: https://godoc.org/k8s.io/minikube/cmd/minikube/cmd#CacheListTemplate (default "{{.CacheImage}}\n") + -h, --help help for list +``` + +### Options inherited from parent commands + +``` + --alsologtostderr log to standard error as well as files + -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") + --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) + --log_dir string If non-empty, write log files in this directory + --logtostderr log to standard error instead of files + -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") + --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + -v, --v Level log level for V logs + --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging +``` + +### SEE ALSO + +* [minikube cache](minikube_cache.md) - Add or delete an image from the local cache. + +###### Auto generated by spf13/cobra on 1-Aug-2019 +## minikube cache + +Add or delete an image from the local cache. + +### Synopsis + +Add or delete an image from the local cache. + +### Options + +``` + -h, --help help for cache +``` + +### Options inherited from parent commands + +``` + --alsologtostderr log to standard error as well as files + -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") + --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) + --log_dir string If non-empty, write log files in this directory + --logtostderr log to standard error instead of files + -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") + --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + -v, --v Level log level for V logs + --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging +``` + +### SEE ALSO + +* [minikube](minikube.md) - Minikube is a tool for managing local Kubernetes clusters. +* [minikube cache add](minikube_cache_add.md) - Add an image to local cache. +* [minikube cache delete](minikube_cache_delete.md) - Delete an image from the local cache. +* [minikube cache list](minikube_cache_list.md) - List all available images from the local cache. + +###### Auto generated by spf13/cobra on 1-Aug-2019 diff --git a/site/content/en/docs/Reference/Commands/completion.md b/site/content/en/docs/Reference/Commands/completion.md new file mode 100644 index 0000000000..bdcba5fa1b --- /dev/null +++ b/site/content/en/docs/Reference/Commands/completion.md @@ -0,0 +1,56 @@ +## minikube completion + +Outputs minikube shell completion for the given shell (bash or zsh) + +### Synopsis + + + Outputs minikube shell completion for the given shell (bash or zsh) + + This depends on the bash-completion binary. Example installation instructions: + OS X: + $ brew install bash-completion + $ source $(brew --prefix)/etc/bash_completion + $ minikube completion bash > ~/.minikube-completion # for bash users + $ minikube completion zsh > ~/.minikube-completion # for zsh users + $ source ~/.minikube-completion + Ubuntu: + $ apt-get install bash-completion + $ source /etc/bash-completion + $ source <(minikube completion bash) # for bash users + $ source <(minikube completion zsh) # for zsh users + + Additionally, you may want to output the completion to a file and source in your .bashrc + + Note for zsh users: [1] zsh completions are only supported in versions of zsh >= 5.2 + + +``` +minikube completion SHELL [flags] +``` + +### Options + +``` + -h, --help help for completion +``` + +### Options inherited from parent commands + +``` + --alsologtostderr log to standard error as well as files + -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") + --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) + --log_dir string If non-empty, write log files in this directory + --logtostderr log to standard error instead of files + -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") + --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + -v, --v Level log level for V logs + --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging +``` + +### SEE ALSO + +* [minikube](minikube.md) - Minikube is a tool for managing local Kubernetes clusters. + +###### Auto generated by spf13/cobra on 1-Aug-2019 diff --git a/site/content/en/docs/Reference/Commands/config.md b/site/content/en/docs/Reference/Commands/config.md new file mode 100644 index 0000000000..5a933d9837 --- /dev/null +++ b/site/content/en/docs/Reference/Commands/config.md @@ -0,0 +1,151 @@ +## minikube config get + +Gets the value of PROPERTY_NAME from the minikube config file + +### Synopsis + +Returns the value of PROPERTY_NAME from the minikube config file. Can be overwritten at runtime by flags or environmental variables. + +``` +minikube config get PROPERTY_NAME [flags] +``` + +### Options + +``` + -h, --help help for get +``` + +### Options inherited from parent commands + +``` + --alsologtostderr log to standard error as well as files + -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") + --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) + --log_dir string If non-empty, write log files in this directory + --logtostderr log to standard error instead of files + -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") + --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + -v, --v Level log level for V logs + --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging +``` + +### SEE ALSO + +* [minikube config](minikube_config.md) - Modify minikube config + +###### Auto generated by spf13/cobra on 1-Aug-2019 +## minikube config set + +Sets an individual value in a minikube config file + +### Synopsis + +Sets the PROPERTY_NAME config value to PROPERTY_VALUE + These values can be overwritten by flags or environment variables at runtime. + +``` +minikube config set PROPERTY_NAME PROPERTY_VALUE [flags] +``` + +### Options + +``` + -h, --help help for set +``` + +### Options inherited from parent commands + +``` + --alsologtostderr log to standard error as well as files + -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") + --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) + --log_dir string If non-empty, write log files in this directory + --logtostderr log to standard error instead of files + -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") + --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + -v, --v Level log level for V logs + --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging +``` + +### SEE ALSO + +* [minikube config](minikube_config.md) - Modify minikube config + +###### Auto generated by spf13/cobra on 1-Aug-2019 +## minikube config unset + +unsets an individual value in a minikube config file + +### Synopsis + +unsets PROPERTY_NAME from the minikube config file. Can be overwritten by flags or environmental variables + +``` +minikube config unset PROPERTY_NAME [flags] +``` + +### Options + +``` + -h, --help help for unset +``` + +### Options inherited from parent commands + +``` + --alsologtostderr log to standard error as well as files + -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") + --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) + --log_dir string If non-empty, write log files in this directory + --logtostderr log to standard error instead of files + -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") + --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + -v, --v Level log level for V logs + --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging +``` + +### SEE ALSO + +* [minikube config](minikube_config.md) - Modify minikube config + +###### Auto generated by spf13/cobra on 1-Aug-2019 +## minikube config view + +Display values currently set in the minikube config file + +### Synopsis + +Display values currently set in the minikube config file. + +``` +minikube config view [flags] +``` + +### Options + +``` + --format string Go template format string for the config view output. The format for Go templates can be found here: https://golang.org/pkg/text/template/ + For the list of accessible variables for the template, see the struct values here: https://godoc.org/k8s.io/minikube/cmd/minikube/cmd/config#ConfigViewTemplate (default "- {{.ConfigKey}}: {{.ConfigValue}}\n") + -h, --help help for view +``` + +### Options inherited from parent commands + +``` + --alsologtostderr log to standard error as well as files + -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") + --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) + --log_dir string If non-empty, write log files in this directory + --logtostderr log to standard error instead of files + -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") + --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + -v, --v Level log level for V logs + --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging +``` + +### SEE ALSO + +* [minikube config](minikube_config.md) - Modify minikube config + +###### Auto generated by spf13/cobra on 1-Aug-2019 diff --git a/site/content/en/docs/Reference/Commands/dashboard.md b/site/content/en/docs/Reference/Commands/dashboard.md new file mode 100644 index 0000000000..5c74cc9541 --- /dev/null +++ b/site/content/en/docs/Reference/Commands/dashboard.md @@ -0,0 +1,38 @@ +## minikube dashboard + +Access the kubernetes dashboard running within the minikube cluster + +### Synopsis + +Access the kubernetes dashboard running within the minikube cluster + +``` +minikube dashboard [flags] +``` + +### Options + +``` + -h, --help help for dashboard + --url Display dashboard URL instead of opening a browser +``` + +### Options inherited from parent commands + +``` + --alsologtostderr log to standard error as well as files + -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") + --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) + --log_dir string If non-empty, write log files in this directory + --logtostderr log to standard error instead of files + -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") + --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + -v, --v Level log level for V logs + --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging +``` + +### SEE ALSO + +* [minikube](minikube.md) - Minikube is a tool for managing local Kubernetes clusters. + +###### Auto generated by spf13/cobra on 1-Aug-2019 diff --git a/site/content/en/docs/Reference/Commands/delete.md b/site/content/en/docs/Reference/Commands/delete.md new file mode 100644 index 0000000000..e21fe4a057 --- /dev/null +++ b/site/content/en/docs/Reference/Commands/delete.md @@ -0,0 +1,38 @@ +## minikube delete + +Deletes a local kubernetes cluster + +### Synopsis + +Deletes a local kubernetes cluster. This command deletes the VM, and removes all +associated files. + +``` +minikube delete [flags] +``` + +### Options + +``` + -h, --help help for delete +``` + +### Options inherited from parent commands + +``` + --alsologtostderr log to standard error as well as files + -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") + --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) + --log_dir string If non-empty, write log files in this directory + --logtostderr log to standard error instead of files + -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") + --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + -v, --v Level log level for V logs + --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging +``` + +### SEE ALSO + +* [minikube](minikube.md) - Minikube is a tool for managing local Kubernetes clusters. + +###### Auto generated by spf13/cobra on 1-Aug-2019 diff --git a/site/content/en/docs/Reference/Commands/docker-env.md b/site/content/en/docs/Reference/Commands/docker-env.md new file mode 100644 index 0000000000..bf4d2720b5 --- /dev/null +++ b/site/content/en/docs/Reference/Commands/docker-env.md @@ -0,0 +1,40 @@ +## minikube docker-env + +Sets up docker env variables; similar to '$(docker-machine env)' + +### Synopsis + +Sets up docker env variables; similar to '$(docker-machine env)'. + +``` +minikube docker-env [flags] +``` + +### Options + +``` + -h, --help help for docker-env + --no-proxy Add machine IP to NO_PROXY environment variable + --shell string Force environment to be configured for a specified shell: [fish, cmd, powershell, tcsh, bash, zsh], default is auto-detect + -u, --unset Unset variables instead of setting them +``` + +### Options inherited from parent commands + +``` + --alsologtostderr log to standard error as well as files + -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") + --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) + --log_dir string If non-empty, write log files in this directory + --logtostderr log to standard error instead of files + -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") + --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + -v, --v Level log level for V logs + --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging +``` + +### SEE ALSO + +* [minikube](minikube.md) - Minikube is a tool for managing local Kubernetes clusters. + +###### Auto generated by spf13/cobra on 1-Aug-2019 diff --git a/site/content/en/docs/Reference/Commands/generate-docs.md b/site/content/en/docs/Reference/Commands/generate-docs.md new file mode 100644 index 0000000000..a22742d22b --- /dev/null +++ b/site/content/en/docs/Reference/Commands/generate-docs.md @@ -0,0 +1,44 @@ +## minikube generate-docs + +Populates the specified folder with documentation in markdown about minikube + +### Synopsis + +Populates the specified folder with documentation in markdown about minikube + +``` +minikube generate-docs [flags] +``` + +### Examples + +``` +minikube generate-docs --path +``` + +### Options + +``` + -h, --help help for generate-docs + --path string The path on the file system where the docs in markdown need to be saved +``` + +### Options inherited from parent commands + +``` + --alsologtostderr log to standard error as well as files + -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") + --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) + --log_dir string If non-empty, write log files in this directory + --logtostderr log to standard error instead of files + -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") + --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + -v, --v Level log level for V logs + --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging +``` + +### SEE ALSO + +* [minikube](minikube.md) - Minikube is a tool for managing local Kubernetes clusters. + +###### Auto generated by spf13/cobra on 1-Aug-2019 diff --git a/site/content/en/docs/Reference/Commands/ip.md b/site/content/en/docs/Reference/Commands/ip.md new file mode 100644 index 0000000000..49c37aa01e --- /dev/null +++ b/site/content/en/docs/Reference/Commands/ip.md @@ -0,0 +1,37 @@ +## minikube ip + +Retrieves the IP address of the running cluster + +### Synopsis + +Retrieves the IP address of the running cluster, and writes it to STDOUT. + +``` +minikube ip [flags] +``` + +### Options + +``` + -h, --help help for ip +``` + +### Options inherited from parent commands + +``` + --alsologtostderr log to standard error as well as files + -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") + --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) + --log_dir string If non-empty, write log files in this directory + --logtostderr log to standard error instead of files + -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") + --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + -v, --v Level log level for V logs + --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging +``` + +### SEE ALSO + +* [minikube](minikube.md) - Minikube is a tool for managing local Kubernetes clusters. + +###### Auto generated by spf13/cobra on 1-Aug-2019 diff --git a/site/content/en/docs/Reference/Commands/kubectl.md b/site/content/en/docs/Reference/Commands/kubectl.md new file mode 100644 index 0000000000..a16468abb1 --- /dev/null +++ b/site/content/en/docs/Reference/Commands/kubectl.md @@ -0,0 +1,40 @@ +## minikube kubectl + +Run kubectl + +### Synopsis + +Run the kubernetes client, download it if necessary. +Examples: +minikube kubectl -- --help +kubectl get pods --namespace kube-system + +``` +minikube kubectl [flags] +``` + +### Options + +``` + -h, --help help for kubectl +``` + +### Options inherited from parent commands + +``` + --alsologtostderr log to standard error as well as files + -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") + --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) + --log_dir string If non-empty, write log files in this directory + --logtostderr log to standard error instead of files + -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") + --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + -v, --v Level log level for V logs + --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging +``` + +### SEE ALSO + +* [minikube](minikube.md) - Minikube is a tool for managing local Kubernetes clusters. + +###### Auto generated by spf13/cobra on 1-Aug-2019 diff --git a/site/content/en/docs/Reference/Commands/logs.md b/site/content/en/docs/Reference/Commands/logs.md new file mode 100644 index 0000000000..a373563dcc --- /dev/null +++ b/site/content/en/docs/Reference/Commands/logs.md @@ -0,0 +1,40 @@ +## minikube logs + +Gets the logs of the running instance, used for debugging minikube, not user code + +### Synopsis + +Gets the logs of the running instance, used for debugging minikube, not user code. + +``` +minikube logs [flags] +``` + +### Options + +``` + -f, --follow Show only the most recent journal entries, and continuously print new entries as they are appended to the journal. + -h, --help help for logs + -n, --length int Number of lines back to go within the log (default 50) + --problems Show only log entries which point to known problems +``` + +### Options inherited from parent commands + +``` + --alsologtostderr log to standard error as well as files + -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") + --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) + --log_dir string If non-empty, write log files in this directory + --logtostderr log to standard error instead of files + -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") + --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + -v, --v Level log level for V logs + --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging +``` + +### SEE ALSO + +* [minikube](minikube.md) - Minikube is a tool for managing local Kubernetes clusters. + +###### Auto generated by spf13/cobra on 1-Aug-2019 diff --git a/site/content/en/docs/Reference/Commands/mount.md b/site/content/en/docs/Reference/Commands/mount.md new file mode 100644 index 0000000000..0b5a2d6700 --- /dev/null +++ b/site/content/en/docs/Reference/Commands/mount.md @@ -0,0 +1,46 @@ +## minikube mount + +Mounts the specified directory into minikube + +### Synopsis + +Mounts the specified directory into minikube. + +``` +minikube mount [flags] : +``` + +### Options + +``` + --9p-version string Specify the 9p version that the mount should use (default "9p2000.L") + --gid string Default group id used for the mount (default "docker") + -h, --help help for mount + --ip string Specify the ip that the mount should be setup on + --kill Kill the mount process spawned by minikube start + --mode uint File permissions used for the mount (default 493) + --msize int The number of bytes to use for 9p packet payload (default 262144) + --options strings Additional mount options, such as cache=fscache + --type string Specify the mount filesystem type (supported types: 9p) (default "9p") + --uid string Default user id used for the mount (default "docker") +``` + +### Options inherited from parent commands + +``` + --alsologtostderr log to standard error as well as files + -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") + --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) + --log_dir string If non-empty, write log files in this directory + --logtostderr log to standard error instead of files + -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") + --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + -v, --v Level log level for V logs + --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging +``` + +### SEE ALSO + +* [minikube](minikube.md) - Minikube is a tool for managing local Kubernetes clusters. + +###### Auto generated by spf13/cobra on 1-Aug-2019 diff --git a/site/content/en/docs/Reference/Commands/profile.md b/site/content/en/docs/Reference/Commands/profile.md new file mode 100644 index 0000000000..075b00d1c3 --- /dev/null +++ b/site/content/en/docs/Reference/Commands/profile.md @@ -0,0 +1,75 @@ +## minikube profile + +Profile gets or sets the current minikube profile + +### Synopsis + +profile sets the current minikube profile, or gets the current profile if no arguments are provided. This is used to run and manage multiple minikube instance. You can return to the default minikube profile by running `minikube profile default` + +``` +minikube profile [MINIKUBE_PROFILE_NAME]. You can return to the default minikube profile by running `minikube profile default` [flags] +``` + +### Options + +``` + -h, --help help for profile +``` + +### Options inherited from parent commands + +``` + --alsologtostderr log to standard error as well as files + -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") + --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) + --log_dir string If non-empty, write log files in this directory + --logtostderr log to standard error instead of files + -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") + --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + -v, --v Level log level for V logs + --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging +``` + +### SEE ALSO + +* [minikube](minikube.md) - Minikube is a tool for managing local Kubernetes clusters. +* [minikube profile list](minikube_profile_list.md) - Lists all minikube profiles. + +###### Auto generated by spf13/cobra on 1-Aug-2019 +## minikube profile list + +Lists all minikube profiles. + +### Synopsis + +Lists all valid minikube profiles and detects all possible invalid profiles. + +``` +minikube profile list [flags] +``` + +### Options + +``` + -h, --help help for list +``` + +### Options inherited from parent commands + +``` + --alsologtostderr log to standard error as well as files + -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") + --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) + --log_dir string If non-empty, write log files in this directory + --logtostderr log to standard error instead of files + -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") + --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + -v, --v Level log level for V logs + --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging +``` + +### SEE ALSO + +* [minikube profile](minikube_profile.md) - Profile gets or sets the current minikube profile + +###### Auto generated by spf13/cobra on 1-Aug-2019 diff --git a/site/content/en/docs/Reference/Commands/service.md b/site/content/en/docs/Reference/Commands/service.md new file mode 100644 index 0000000000..057956b942 --- /dev/null +++ b/site/content/en/docs/Reference/Commands/service.md @@ -0,0 +1,83 @@ +## minikube service + +Gets the kubernetes URL(s) for the specified service in your local cluster + +### Synopsis + +Gets the kubernetes URL(s) for the specified service in your local cluster. In the case of multiple URLs they will be printed one at a time. + +``` +minikube service [flags] SERVICE +``` + +### Options + +``` + --format string Format to output service URL in. This format will be applied to each url individually and they will be printed one at a time. (default "http://{{.IP}}:{{.Port}}") + -h, --help help for service + --https Open the service URL with https instead of http + --interval int The time interval for each check that wait performs in seconds (default 6) + -n, --namespace string The service namespace (default "default") + --url Display the kubernetes service URL in the CLI instead of opening it in the default browser + --wait int Amount of time to wait for a service in seconds (default 20) +``` + +### Options inherited from parent commands + +``` + --alsologtostderr log to standard error as well as files + -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") + --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) + --log_dir string If non-empty, write log files in this directory + --logtostderr log to standard error instead of files + -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") + --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + -v, --v Level log level for V logs + --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging +``` + +### SEE ALSO + +* [minikube](minikube.md) - Minikube is a tool for managing local Kubernetes clusters. +* [minikube service list](minikube_service_list.md) - Lists the URLs for the services in your local cluster + +###### Auto generated by spf13/cobra on 1-Aug-2019 +## minikube service list + +Lists the URLs for the services in your local cluster + +### Synopsis + +Lists the URLs for the services in your local cluster + +``` +minikube service list [flags] +``` + +### Options + +``` + -h, --help help for list + -n, --namespace string The services namespace +``` + +### Options inherited from parent commands + +``` + --alsologtostderr log to standard error as well as files + -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") + --format string Format to output service URL in. This format will be applied to each url individually and they will be printed one at a time. (default "http://{{.IP}}:{{.Port}}") + --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) + --log_dir string If non-empty, write log files in this directory + --logtostderr log to standard error instead of files + -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") + --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + -v, --v Level log level for V logs + --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging +``` + +### SEE ALSO + +* [minikube service](minikube_service.md) - Gets the kubernetes URL(s) for the specified service in your local cluster + +###### Auto generated by spf13/cobra on 1-Aug-2019 diff --git a/site/content/en/docs/Reference/Commands/ssh-key.md b/site/content/en/docs/Reference/Commands/ssh-key.md new file mode 100644 index 0000000000..30084dbc24 --- /dev/null +++ b/site/content/en/docs/Reference/Commands/ssh-key.md @@ -0,0 +1,37 @@ +## minikube ssh-key + +Retrieve the ssh identity key path of the specified cluster + +### Synopsis + +Retrieve the ssh identity key path of the specified cluster. + +``` +minikube ssh-key [flags] +``` + +### Options + +``` + -h, --help help for ssh-key +``` + +### Options inherited from parent commands + +``` + --alsologtostderr log to standard error as well as files + -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") + --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) + --log_dir string If non-empty, write log files in this directory + --logtostderr log to standard error instead of files + -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") + --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + -v, --v Level log level for V logs + --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging +``` + +### SEE ALSO + +* [minikube](minikube.md) - Minikube is a tool for managing local Kubernetes clusters. + +###### Auto generated by spf13/cobra on 1-Aug-2019 diff --git a/site/content/en/docs/Reference/Commands/ssh.md b/site/content/en/docs/Reference/Commands/ssh.md new file mode 100644 index 0000000000..1f36a66911 --- /dev/null +++ b/site/content/en/docs/Reference/Commands/ssh.md @@ -0,0 +1,37 @@ +## minikube ssh + +Log into or run a command on a machine with SSH; similar to 'docker-machine ssh' + +### Synopsis + +Log into or run a command on a machine with SSH; similar to 'docker-machine ssh'. + +``` +minikube ssh [flags] +``` + +### Options + +``` + -h, --help help for ssh +``` + +### Options inherited from parent commands + +``` + --alsologtostderr log to standard error as well as files + -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") + --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) + --log_dir string If non-empty, write log files in this directory + --logtostderr log to standard error instead of files + -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") + --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + -v, --v Level log level for V logs + --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging +``` + +### SEE ALSO + +* [minikube](minikube.md) - Minikube is a tool for managing local Kubernetes clusters. + +###### Auto generated by spf13/cobra on 1-Aug-2019 diff --git a/site/content/en/docs/Reference/Commands/start.md b/site/content/en/docs/Reference/Commands/start.md new file mode 100644 index 0000000000..d53ede084d --- /dev/null +++ b/site/content/en/docs/Reference/Commands/start.md @@ -0,0 +1,84 @@ +## minikube start + +Starts a local kubernetes cluster + +### Synopsis + +Starts a local kubernetes cluster + +``` +minikube start [flags] +``` + +### Options + +``` + --apiserver-ips ipSlice A set of apiserver IP Addresses which are used in the generated certificate for kubernetes. This can be used if you want to make the apiserver available from outside the machine (default []) + --apiserver-name string The apiserver name which is used in the generated certificate for kubernetes. This can be used if you want to make the apiserver available from outside the machine (default "minikubeCA") + --apiserver-names stringArray A set of apiserver names which are used in the generated certificate for kubernetes. This can be used if you want to make the apiserver available from outside the machine + --apiserver-port int The apiserver listening port (default 8443) + --cache-images If true, cache docker images for the current bootstrapper and load them into the machine. Always false with --vm-driver=none. (default true) + --container-runtime string The container runtime to be used (docker, crio, containerd) (default "docker") + --cpus int Number of CPUs allocated to the minikube VM (default 2) + --cri-socket string The cri socket path to be used + --disk-size string Disk size allocated to the minikube VM (format: [], where unit = b, k, m or g) (default "20000mb") + --dns-domain string The cluster dns domain name used in the kubernetes cluster (default "cluster.local") + --dns-proxy Enable proxy for NAT DNS requests (virtualbox) + --docker-env stringArray Environment variables to pass to the Docker daemon. (format: key=value) + --docker-opt stringArray Specify arbitrary flags to pass to the Docker daemon. (format: key=value) + --download-only If true, only download and cache files for later use - don't install or start anything. + --enable-default-cni Enable the default CNI plugin (/etc/cni/net.d/k8s.conf). Used in conjunction with "--network-plugin=cni" + --extra-config ExtraOption A set of key=value pairs that describe configuration that may be passed to different components. + The key should be '.' separated, and the first part before the dot is the component to apply the configuration to. + Valid components are: kubelet, kubeadm, apiserver, controller-manager, etcd, proxy, scheduler + Valid kubeadm parameters: ignore-preflight-errors, dry-run, kubeconfig, kubeconfig-dir, node-name, cri-socket, experimental-upload-certs, certificate-key, rootfs, pod-network-cidr + --feature-gates string A set of key=value pairs that describe feature gates for alpha/experimental features. + -h, --help help for start + --host-dns-resolver Enable host resolver for NAT DNS requests (virtualbox) (default true) + --host-only-cidr string The CIDR to be used for the minikube VM (only supported with Virtualbox driver) (default "192.168.99.1/24") + --hyperkit-vpnkit-sock string Location of the VPNKit socket used for networking. If empty, disables Hyperkit VPNKitSock, if 'auto' uses Docker for Mac VPNKit connection, otherwise uses the specified VSock. + --hyperkit-vsock-ports strings List of guest VSock ports that should be exposed as sockets on the host (Only supported on with hyperkit now). + --hyperv-virtual-switch string The hyperv virtual switch name. Defaults to first found. (only supported with HyperV driver) + --image-mirror-country string Country code of the image mirror to be used. Leave empty to use the global one. For Chinese mainland users, set it to cn + --image-repository string Alternative image repository to pull docker images from. This can be used when you have limited access to gcr.io. Set it to "auto" to let minikube decide one for you. For Chinese mainland users, you may use local gcr.io mirrors such as registry.cn-hangzhou.aliyuncs.com/google_containers + --insecure-registry strings Insecure Docker registries to pass to the Docker daemon. The default service CIDR range will automatically be added. + --iso-url string Location of the minikube iso (default "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso") + --keep-context This will keep the existing kubectl context and will create a minikube context. + --kubernetes-version string The kubernetes version that the minikube VM will use (ex: v1.2.3) (default "v1.15.1") + --kvm-gpu Enable experimental NVIDIA GPU support in minikube + --kvm-hidden Hide the hypervisor signature from the guest in minikube + --kvm-network string The KVM network name. (only supported with KVM driver) (default "default") + --kvm-qemu-uri string The KVM QEMU connection URI. (works only with kvm2 driver on linux) (default "qemu:///system") + --memory string Amount of RAM allocated to the minikube VM (format: [], where unit = b, k, m or g) (default "2000mb") + --mount This will start the mount daemon and automatically mount files into minikube + --mount-string string The argument to pass the minikube mount command on start (default "/Users:/minikube-host") + --network-plugin string The name of the network plugin + --nfs-share strings Local folders to share with Guest via NFS mounts (Only supported on with hyperkit now) + --nfs-shares-root string Where to root the NFS Shares (defaults to /nfsshares, only supported with hyperkit now) (default "/nfsshares") + --no-vtx-check Disable checking for the availability of hardware virtualization before the vm is started (virtualbox) + --registry-mirror strings Registry mirrors to pass to the Docker daemon + --service-cluster-ip-range string The CIDR to be used for service cluster IPs. (default "10.96.0.0/12") + --uuid string Provide VM UUID to restore MAC address (only supported with Hyperkit driver). + --vm-driver string VM driver is one of: [virtualbox parallels vmwarefusion hyperkit vmware] (default "virtualbox") + --wait Wait until Kubernetes core services are healthy before exiting (default true) +``` + +### Options inherited from parent commands + +``` + --alsologtostderr log to standard error as well as files + -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") + --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) + --log_dir string If non-empty, write log files in this directory + --logtostderr log to standard error instead of files + -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") + --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + -v, --v Level log level for V logs + --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging +``` + +### SEE ALSO + +* [minikube](minikube.md) - Minikube is a tool for managing local Kubernetes clusters. + +###### Auto generated by spf13/cobra on 1-Aug-2019 diff --git a/site/content/en/docs/Reference/Commands/status.md b/site/content/en/docs/Reference/Commands/status.md new file mode 100644 index 0000000000..7486971d4d --- /dev/null +++ b/site/content/en/docs/Reference/Commands/status.md @@ -0,0 +1,41 @@ +## minikube status + +Gets the status of a local kubernetes cluster + +### Synopsis + +Gets the status of a local kubernetes cluster. + Exit status contains the status of minikube's VM, cluster and kubernetes encoded on it's bits in this order from right to left. + Eg: 7 meaning: 1 (for minikube NOK) + 2 (for cluster NOK) + 4 (for kubernetes NOK) + +``` +minikube status [flags] +``` + +### Options + +``` + --format string Go template format string for the status output. The format for Go templates can be found here: https://golang.org/pkg/text/template/ + For the list accessible variables for the template, see the struct values here: https://godoc.org/k8s.io/minikube/cmd/minikube/cmd#Status (default "host: {{.Host}}\nkubelet: {{.Kubelet}}\napiserver: {{.APIServer}}\nkubectl: {{.Kubeconfig}}\n") + -h, --help help for status +``` + +### Options inherited from parent commands + +``` + --alsologtostderr log to standard error as well as files + -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") + --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) + --log_dir string If non-empty, write log files in this directory + --logtostderr log to standard error instead of files + -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") + --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + -v, --v Level log level for V logs + --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging +``` + +### SEE ALSO + +* [minikube](minikube.md) - Minikube is a tool for managing local Kubernetes clusters. + +###### Auto generated by spf13/cobra on 1-Aug-2019 diff --git a/site/content/en/docs/Reference/Commands/stop.md b/site/content/en/docs/Reference/Commands/stop.md new file mode 100644 index 0000000000..67ce9b1012 --- /dev/null +++ b/site/content/en/docs/Reference/Commands/stop.md @@ -0,0 +1,38 @@ +## minikube stop + +Stops a running local kubernetes cluster + +### Synopsis + +Stops a local kubernetes cluster running in Virtualbox. This command stops the VM +itself, leaving all files intact. The cluster can be started again with the "start" command. + +``` +minikube stop [flags] +``` + +### Options + +``` + -h, --help help for stop +``` + +### Options inherited from parent commands + +``` + --alsologtostderr log to standard error as well as files + -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") + --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) + --log_dir string If non-empty, write log files in this directory + --logtostderr log to standard error instead of files + -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") + --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + -v, --v Level log level for V logs + --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging +``` + +### SEE ALSO + +* [minikube](minikube.md) - Minikube is a tool for managing local Kubernetes clusters. + +###### Auto generated by spf13/cobra on 1-Aug-2019 diff --git a/site/content/en/docs/Reference/Commands/tunnel.md b/site/content/en/docs/Reference/Commands/tunnel.md new file mode 100644 index 0000000000..24e14a7df6 --- /dev/null +++ b/site/content/en/docs/Reference/Commands/tunnel.md @@ -0,0 +1,38 @@ +## minikube tunnel + +tunnel makes services of type LoadBalancer accessible on localhost + +### Synopsis + +tunnel creates a route to services deployed with type LoadBalancer and sets their Ingress to their ClusterIP + +``` +minikube tunnel [flags] +``` + +### Options + +``` + -c, --cleanup call with cleanup=true to remove old tunnels + -h, --help help for tunnel +``` + +### Options inherited from parent commands + +``` + --alsologtostderr log to standard error as well as files + -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") + --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) + --log_dir string If non-empty, write log files in this directory + --logtostderr log to standard error instead of files + -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") + --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + -v, --v Level log level for V logs + --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging +``` + +### SEE ALSO + +* [minikube](minikube.md) - Minikube is a tool for managing local Kubernetes clusters. + +###### Auto generated by spf13/cobra on 1-Aug-2019 diff --git a/site/content/en/docs/Reference/Commands/update-check.md b/site/content/en/docs/Reference/Commands/update-check.md new file mode 100644 index 0000000000..49eeca5f8e --- /dev/null +++ b/site/content/en/docs/Reference/Commands/update-check.md @@ -0,0 +1,37 @@ +## minikube update-check + +Print current and latest version number + +### Synopsis + +Print current and latest version number + +``` +minikube update-check [flags] +``` + +### Options + +``` + -h, --help help for update-check +``` + +### Options inherited from parent commands + +``` + --alsologtostderr log to standard error as well as files + -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") + --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) + --log_dir string If non-empty, write log files in this directory + --logtostderr log to standard error instead of files + -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") + --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + -v, --v Level log level for V logs + --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging +``` + +### SEE ALSO + +* [minikube](minikube.md) - Minikube is a tool for managing local Kubernetes clusters. + +###### Auto generated by spf13/cobra on 1-Aug-2019 diff --git a/site/content/en/docs/Reference/Commands/update-context.md b/site/content/en/docs/Reference/Commands/update-context.md new file mode 100644 index 0000000000..19b0db39a9 --- /dev/null +++ b/site/content/en/docs/Reference/Commands/update-context.md @@ -0,0 +1,38 @@ +## minikube update-context + +Verify the IP address of the running cluster in kubeconfig. + +### Synopsis + +Retrieves the IP address of the running cluster, checks it + with IP in kubeconfig, and corrects kubeconfig if incorrect. + +``` +minikube update-context [flags] +``` + +### Options + +``` + -h, --help help for update-context +``` + +### Options inherited from parent commands + +``` + --alsologtostderr log to standard error as well as files + -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") + --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) + --log_dir string If non-empty, write log files in this directory + --logtostderr log to standard error instead of files + -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") + --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + -v, --v Level log level for V logs + --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging +``` + +### SEE ALSO + +* [minikube](minikube.md) - Minikube is a tool for managing local Kubernetes clusters. + +###### Auto generated by spf13/cobra on 1-Aug-2019 diff --git a/site/content/en/docs/Reference/Commands/version.md b/site/content/en/docs/Reference/Commands/version.md new file mode 100644 index 0000000000..e0e94daf68 --- /dev/null +++ b/site/content/en/docs/Reference/Commands/version.md @@ -0,0 +1,32 @@ +## minikube version + +Print the version of minikube + +### Synopsis + +Print the version of minikube. + +``` +minikube version [flags] +``` + +### Options + +``` + -h, --help help for version +``` + +### Options inherited from parent commands + +``` + --alsologtostderr log to standard error as well as files + -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") + --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) + --log_dir string If non-empty, write log files in this directory + --logtostderr log to standard error instead of files + -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") + --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + -v, --v Level log level for V logs + --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging +``` + diff --git a/site/content/en/docs/Reference/Configuration/_index.md b/site/content/en/docs/Reference/Configuration/_index.md new file mode 100644 index 0000000000..1615c60d70 --- /dev/null +++ b/site/content/en/docs/Reference/Configuration/_index.md @@ -0,0 +1,8 @@ +--- +title: "Configuration" +linkTitle: "Configuration" +weight: 1 +date: 2019-08-01 +description: > + minikube configuration reference +--- \ No newline at end of file diff --git a/site/content/en/docs/Reference/Configuration/kubernetes.md b/site/content/en/docs/Reference/Configuration/kubernetes.md new file mode 100644 index 0000000000..1ef79adebf --- /dev/null +++ b/site/content/en/docs/Reference/Configuration/kubernetes.md @@ -0,0 +1,52 @@ +--- +title: "Kubernetes" +linkTitle: "Kubernetes" +weight: 3 +date: 2019-08-01 +description: > + Kubernetes configuration reference +--- + +minikube allows users to configure the Kubernetes components with arbitrary values. To use this feature, you can use the `--extra-config` flag on the `minikube start` command. + +This flag is repeated, so you can pass it several times with several different values to set multiple options. + +## Selecting a Kubernetes version + +minikube defaults to the latest stable version of Kubernetes. You may select a different Kubernetes release by using the `--kubernetes-version` flag, for example: + + `minikube start --kubernetes-version=v1.10.13` + +minikube follows the [Kubernetes Version and Version Skew Support Policy](https://kubernetes.io/docs/setup/version-skew-policy/), so we guarantee support for the latest build for the last 3 minor Kubernetes releases. When practical, minikube extends this policy two additional minor releases so that users can emulate legacy environments. + +As of April 2019, this means that minikube supports and actively tests against the latest builds of: + +* v1.14 (default) +* v1.13 +* v1.12 +* v1.11 (best effort) +* v1.10 (best effort) + +For more up to date information, see `OldestKubernetesVersion` and `NewestKubernetesVersion` in [constants.go](https://github.com/kubernetes/minikube/blob/master/pkg/minikube/constants/constants.go) + +## Modifying Kubernetes defaults + +The kubeadm bootstrapper can be configured by the `--extra-config` flag on the `minikube start` command. It takes a string of the form `component.key=value` where `component` is one of the strings + +* kubeadm +* kubelet +* apiserver +* controller-manager +* scheduler + +and `key=value` is a flag=value pair for the component being configured. For example, + +```shell +minikube start --extra-config=apiserver.v=10 --extra-config=kubelet.max-pods=100 +``` + +For instance, to allow Kubernetes to launch on an unsupported Docker release: + +```shell +minikube start --extra-config=kubeadm.ignore-preflight-errors=SystemVerification +``` \ No newline at end of file diff --git a/site/content/en/docs/Reference/Configuration/minikube.md b/site/content/en/docs/Reference/Configuration/minikube.md new file mode 100644 index 0000000000..9b8a6f6d39 --- /dev/null +++ b/site/content/en/docs/Reference/Configuration/minikube.md @@ -0,0 +1,165 @@ +--- +title: "minikube" +linkTitle: "minikube" +weight: 2 +date: 2019-08-01 +description: > + minikube configuration reference +--- + +## Flags + +Most minikube configuration is done via the flags interface. To see which flags are possible for the start command, run: + +```shell +minikube start --help +``` + +For example: + +```shell +minikube start --apiserver-port 9999 +``` + +Many of these flags are also available to be set via persistent configuration or environment variables. +While most flags are applicable to any command, some are globally scoped: + +``` +Flags: + --alsologtostderr log to standard error as well as files + -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") + -h, --help help for minikube + --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) + --log_dir string If non-empty, write log files in this directory + --logtostderr log to standard error instead of files + -p, --profile string The name of the minikube VM being used. + This can be modified to allow for multiple minikube instances to be run independently (default "minikube") + --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + -v, --v Level log level for V logs + --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging +``` + +## Persistent Configuration + +minikube allows users to persistently store new default values to be used across all profiles, using the `minikube config` command. This is done providing a property name, and a property value. + +### Listing config properties + +```shell +minikube config +``` + +Example: + +```shell +Configurable fields: + + * vm-driver + * feature-gates + * v + * cpus + * disk-size + * host-only-cidr + * memory + * log_dir + * kubernetes-version + * iso-url + * WantUpdateNotification + * ReminderWaitPeriodInHours + * WantReportError + * WantReportErrorPrompt + * WantKubectlDownloadMsg + * WantNoneDriverWarning + * profile + * bootstrapper + * ShowDriverDeprecationNotification + * ShowBootstrapperDeprecationNotification + * dashboard + * addon-manager + * default-storageclass + * heapster + * efk + * ingress + * registry + * registry-creds + * freshpod + * default-storageclass + * storage-provisioner + * storage-provisioner-gluster + * metrics-server + * nvidia-driver-installer + * nvidia-gpu-device-plugin + * logviewer + * gvisor + * hyperv-virtual-switch + * disable-driver-mounts + * cache + * embed-certs +``` + +### Listing your property overrides + +```shell +minikube config view +``` + +Example output: + +```shell +- memory: 4096 +- registry: true +- vm-driver: vmware +- dashboard: true +- gvisor: true +``` + +### Setting a new property override + + +```shell +minikube config set +``` + +For example: + +```shell +minikube config set vm-driver hyperkit +``` + +## Environment Configuration + +### Config variables + +minikube supports passing environment variables instead of flags for every value listed in `minikube config list`. This is done by passing an environment variable with the prefix `MINIKUBE_`. + +For example the `minikube start --iso-url="$ISO_URL"` flag can also be set by setting the `MINIKUBE_ISO_URL="$ISO_URL"` environment variable. + +### Other variables + +Some features can only be accessed by environment variables, here is a list of these features: + +* **MINIKUBE_HOME** - (string) sets the path for the .minikube directory that minikube uses for state/configuration + +* **MINIKUBE_IN_STYLE** - (bool) manually sets whether or not emoji and colors should appear in minikube. Set to false or 0 to disable this feature, true or 1 to force it to be turned on. + +* **MINIKUBE_WANTUPDATENOTIFICATION** - (bool) sets whether the user wants an update notification for new minikube versions + +* **MINIKUBE_REMINDERWAITPERIODINHOURS** - (int) sets the number of hours to check for an update notification + +* **CHANGE_MINIKUBE_NONE_USER** - (bool) automatically change ownership of ~/.minikube to the value of $SUDO_USER + +* **MINIKUBE_ENABLE_PROFILING** - (int, `1` enables it) enables trace profiling to be generated for minikube + +### Making environment variables persistent + +To make the exported variables persistent: + +* Linux and macOS: Add these declarations to `~/.bashrc` or wherever your shells environment variables are stored. +* Windows: Add these declarations via [system settings](https://support.microsoft.com/en-au/help/310519/how-to-manage-environment-variables-in-windows-xp) or using [setx](https://stackoverflow.com/questions/5898131/set-a-persistent-environment-variable-from-cmd-exe) + +#### Example: Disabling emoji + +```shell +export MINIKUBE_IN_STYLE=false +minikube start +``` diff --git a/site/content/en/docs/Reference/Networking/_index.md b/site/content/en/docs/Reference/Networking/_index.md new file mode 100644 index 0000000000..90a2a86f66 --- /dev/null +++ b/site/content/en/docs/Reference/Networking/_index.md @@ -0,0 +1,8 @@ +--- +title: "Networking" +linkTitle: "Networking" +weight: 6 +date: 2018-08-01 +description: > + How minikube interacts with networks. +--- \ No newline at end of file diff --git a/site/content/en/docs/Reference/Networking/proxy.md b/site/content/en/docs/Reference/Networking/proxy.md new file mode 100644 index 0000000000..043ce16c48 --- /dev/null +++ b/site/content/en/docs/Reference/Networking/proxy.md @@ -0,0 +1,109 @@ +--- +title: "Proxy Support" +linkTitle: "Proxy Support" +weight: 6 +date: 2017-01-05 +description: > + How to use an HTTP proxy with minikube +--- + +minikube requires access to the internet via HTTP, HTTPS, and DNS protocols. If a HTTP proxy is required to access the internet, you may need to pass the proxy connection information to both minikube and Docker using environment variables: + +* `HTTP_PROXY` - The URL to your HTTP proxy +* `HTTPS_PROXY` - The URL to your HTTPS proxy +* `NO_PROXY` - A comma-separated list of hosts which should not go through the proxy. + +The NO_PROXY variable here is important: Without setting it, minikube may not be able to access resources within the VM. minikube uses two IP ranges, which should not go through the proxy: + +* **192.168.99.0/24**: Used by the minikube VM. Configurable for some hypervisors via `--host-only-cidr` +* **192.168.39.0/24**: Used by the minikube kvm2 driver. +* **10.96.0.0/12**: Used by service cluster IP's. Configurable via `--service-cluster-ip-range` + +One important note: If NO_PROXY is required by non-Kubernetes applications, such as Firefox or Chrome, you may want to specifically add the minikube IP to the comma-separated list, as they may not understand IP ranges ([#3827](https://github.com/kubernetes/minikube/issues/3827)). + +## Example Usage + +### macOS and Linux + +```shell +export HTTP_PROXY=http:// +export HTTPS_PROXY=https:// +export NO_PROXY=localhost,127.0.0.1,10.96.0.0/12,192.168.99.0/24,192.168.39.0/24 + +minikube start +``` + +To make the exported variables permanent, consider adding the declarations to ~/.bashrc or wherever your user-set environment variables are stored. + +### Windows + +```shell +set HTTP_PROXY=http:// +set HTTPS_PROXY=https:// +set NO_PROXY=localhost,127.0.0.1,10.96.0.0/12,192.168.99.1/24,192.168.39.0/24 + +minikube start +``` + +To set these environment variables permanently, consider adding these to your [system settings](https://support.microsoft.com/en-au/help/310519/how-to-manage-environment-variables-in-windows-xp) or using [setx](https://stackoverflow.com/questions/5898131/set-a-persistent-environment-variable-from-cmd-exe) + +## Configuring Docker to use a proxy + +As of v1.0, minikube automatically configures the Docker instance inside of the VM to use the proxy environment variables, unless you have specified a `--docker-env` override. If you need to manually configure Docker for a set of proxies, use: + +```shell +minikube start \ + --docker-env=HTTP_PROXY=$HTTP_PROXY \ + --docker-env HTTPS_PROXY=$HTTPS_PROXY \ + --docker-env NO_PROXY=$NO_PROXY +``` + +## Troubleshooting + +### unable to cache ISO... connection refused + +```text +Unable to start VM: unable to cache ISO: https://storage.googleapis.com/minikube/iso/minikube.iso: +failed to download: failed to download to temp file: download failed: 5 error(s) occurred: + +* Temporary download error: Get https://storage.googleapis.com/minikube/iso/minikube.iso: +proxyconnect tcp: dial tcp :: connect: connection refused +``` + +This error indicates that the host:port combination defined by HTTPS_PROXY or HTTP_PROXY is incorrect, or that the proxy is unavailable. + +## Unable to pull images..Client.Timeout exceeded while awaiting headers + +```text +Unable to pull images, which may be OK: + +failed to pull image "k8s.gcr.io/kube-apiserver:v1.13.3": output: Error response from daemon: +Get https://k8s.gcr.io/v2/: net/http: request canceled while waiting for connection +(Client.Timeout exceeded while awaiting headers) +``` + +This error indicates that the container runtime running within the VM does not have access to the internet. Verify that you are passing the appropriate value to `--docker-env HTTPS_PROXY`. + +## x509: certificate signed by unknown authority + +```text +[ERROR ImagePull]: failed to pull image k8s.gcr.io/kube-apiserver:v1.13.3: +output: Error response from daemon: +Get https://k8s.gcr.io/v2/: x509: certificate signed by unknown authority +``` + +This is because minikube VM is stuck behind a proxy that rewrites HTTPS responses to contain its own TLS certificate. The [solution](https://github.com/kubernetes/minikube/issues/3613#issuecomment-461034222) is to install the proxy certificate into a location that is copied to the VM at startup, so that it can be validated. + +Ask your IT department for the appropriate PEM file, and add it to: + +`~/.minikube/files/etc/ssl/certs` + +Then run `minikube delete` and `minikube start`. + +## downloading binaries: proxyconnect tcp: tls: oversized record received with length 20527 + +Your need to set a correct `HTTPS_PROXY` value. + +## Additional Information + +* [Configure Docker to use a proxy server](https://docs.docker.com/network/proxy/) diff --git a/site/content/en/docs/Reference/Networking/vpn.md b/site/content/en/docs/Reference/Networking/vpn.md new file mode 100644 index 0000000000..0992e30f44 --- /dev/null +++ b/site/content/en/docs/Reference/Networking/vpn.md @@ -0,0 +1,23 @@ +--- +title: "VPN Support" +linkTitle: "VPN Support" +weight: 6 +date: 2019-08-01 +description: > + How to use a VPN with minikube +--- + +minikube requires access from the host to the following IP ranges: + +* **192.168.99.0/24**: Used by the minikube VM. Configurable for some hypervisors via `--host-only-cidr` +* **192.168.39.0/24**: Used by the minikube kvm2 driver. +* **10.96.0.0/12**: Used by service cluster IP's. Configurable via `--service-cluster-ip-range` + +Unfortunately, many VPN configurations route packets to these destinations through an encrypted tunnel, rather than allowing the packets to go to the minikube VM. + +### Possible workarounds + +1. If you have access, whitelist the above IP ranges in your VPN software +2. In your VPN software, select an option similar to "Allow local (LAN) access when using VPN" [(Cisco VPN example)](https://superuser.com/questions/987150/virtualbox-guest-os-through-vpn) +3. You may have luck selecting alternate values to the `--host-only-cidr` and `--service-cluster-ip-range` flags. +4. Turn off the VPN diff --git a/site/content/en/docs/Reference/cache.md b/site/content/en/docs/Reference/cache.md new file mode 100644 index 0000000000..0cb6f7fa52 --- /dev/null +++ b/site/content/en/docs/Reference/cache.md @@ -0,0 +1,66 @@ +--- +title: "Caching" +linkTitle: "Caching" +weight: 6 +date: 2019-08-01 +description: > + Cache Rules Everything Around Minikube +--- + +minikube has built-in support for caching downloaded resources into `$MINIKUBE_HOME/cache`. Here are the important file locations: + +* `~/.minikube/cache` - Top-level folder +* `~/.minikube/cache/iso` - VM ISO image. Typically updated once per major minikube release. +* `~/.minikube/cache/images` - Docker images used by Kubernetes. +* `~/.minikube/cache/` - Kubernetes binaries, such as `kubeadm` and `kubelet` + +## Caching arbitrary Docker images + +minikube supports caching arbitrary images using the `minikube cache` command. Cached images are stored in `$MINIKUBE_HOME/cache/images`, and loaded into the VM's container runtime on `minikube start`. + +### Adding an image + +```shell +minikube cache add ubuntu:16.04 +``` + +### Listing images + +```shell +minikube cache list +``` + +### Deleting an image + +```shell +minikube cache delete +``` + +## Built-in Kubernetes image caching + +`minikube start` caches all required Kubernetes images by default. This default may be changed by setting `--cache-images=false`. These images are not displayed by the `minikube cache` command. + +## Sharing the minikube cache + +For offline use on other hosts, one can copy the contents of `~/.minikube/cache`. As of the v1.0 release, this directory contains 685MB of data: + +```text +cache/iso/minikube-v1.0.0.iso +cache/images/gcr.io/k8s-minikube/storage-provisioner_v1.8.1 +cache/images/k8s.gcr.io/k8s-dns-sidecar-amd64_1.14.13 +cache/images/k8s.gcr.io/k8s-dns-dnsmasq-nanny-amd64_1.14.13 +cache/images/k8s.gcr.io/kubernetes-dashboard-amd64_v1.10.1 +cache/images/k8s.gcr.io/kube-scheduler_v1.14.0 +cache/images/k8s.gcr.io/coredns_1.3.1 +cache/images/k8s.gcr.io/kube-controller-manager_v1.14.0 +cache/images/k8s.gcr.io/kube-apiserver_v1.14.0 +cache/images/k8s.gcr.io/pause_3.1 +cache/images/k8s.gcr.io/etcd_3.3.10 +cache/images/k8s.gcr.io/kube-addon-manager_v9.0 +cache/images/k8s.gcr.io/k8s-dns-kube-dns-amd64_1.14.13 +cache/images/k8s.gcr.io/kube-proxy_v1.14.0 +cache/v1.14.0/kubeadm +cache/v1.14.0/kubelet +``` + +If any of these files exist, minikube will use copy them into the VM directly rather than pulling them from the internet. diff --git a/site/content/en/docs/Reference/persistent_volumes.md b/site/content/en/docs/Reference/persistent_volumes.md new file mode 100644 index 0000000000..fd7a82b456 --- /dev/null +++ b/site/content/en/docs/Reference/persistent_volumes.md @@ -0,0 +1,46 @@ +--- +title: "Persistent Volumes" +linkTitle: "Persistent Volumes" +weight: 6 +date: 2019-08-01 +description: > + About persistent volumes (hostPath) +--- + +minikube supports [PersistentVolumes](https://kubernetes.io/docs/concepts/storage/persistent-volumes/) of type `hostPath` out of the box. These PersistentVolumes are mapped to a directory inside the running Minikube instance (usually a VM, unless you use `--vm-driver=none`). For more information on how this works, read the Dynamic Provisioning section below. + +## A note on mounts, persistence, and minikube hosts + +minikube is configured to persist files stored under the following directories, which are made in the Minikube VM (or on your localhost if running on bare metal). You may lose data from other directories on reboots. + +* `/data` +* `/var/lib/minikube` +* `/var/lib/docker` +* `/tmp/hostpath_pv` +* `/tmp/hostpath-provisioner` + +Here is an example PersistentVolume config to persist data in the '/data' directory: + +```yaml +apiVersion: v1 +kind: PersistentVolume +metadata: + name: pv0001 +spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 5Gi + hostPath: + path: /data/pv0001/ +``` + +You can also achieve persistence by creating a PV in a mounted host folder. + +## Dynamic provisioning and CSI + +In addition, minikube implements a very simple, canonical implementation of dynamic storage controller that runs alongside its deployment. This manages provisioning of *hostPath* volumes (rather then via the previous, in-tree hostPath provider). + +The default [Storage Provisioner Controller](https://github.com/kubernetes/minikube/blob/master/pkg/storage/storage_provisioner.go) is managed internally, in the minikube codebase, demonstrating how easy it is to plug a custom storage controller into kubernetes as a storage component of the system, and provides pods with dynamically, to test your pod's behaviour when persistent storage is mapped to it. + +Note that this is not a CSI based storage provider, rather, it simply declares a PersistentVolume object of type hostpath dynamically when the controller see's that there is an outstanding storage request. diff --git a/site/content/en/docs/Reference/runtimes.md b/site/content/en/docs/Reference/runtimes.md new file mode 100644 index 0000000000..5973040ff7 --- /dev/null +++ b/site/content/en/docs/Reference/runtimes.md @@ -0,0 +1,47 @@ +--- +title: "Container Runtimes" +linkTitle: "Container Runtimes" +weight: 6 +date: 2019-08-01 +description: > + Available container runtimes +--- + +### Docker + +The default container runtime in minikube is Docker. You can select it explicitly by using: + +```shell +minikube start --container-runtime=docker +``` + +### CRI-O + +To use [CRI-O](https://github.com/kubernetes-sigs/cri-o): + +```shell +minikube start --container-runtime=cri-o +``` + +## containerd + +To use [containerd](https://github.com/containerd/containerd): + +```shell +minikube start --container-runtime=containerd +``` + +## gvisor + +To use [gvisor](https://gvisor.dev): + +```shell +minikube start --container-runtime=containerd +minikube addons enable gvisor +``` + +## Kata + +Native support for [Kata containers](https://katacontainers.io) is a work-in-progress. See [#4347](https://github.com/kubernetes/minikube/issues/4347) for details. + +In the mean time, it's possible to make Kata containers work within minikube using a bit of [elbow grease](https://gist.github.com/olberger/0413cfb0769dcdc34c83788ced583fa9). diff --git a/site/content/en/docs/Tasks/Registry/_index.md b/site/content/en/docs/Tasks/Registry/_index.md new file mode 100644 index 0000000000..cdecd6eff2 --- /dev/null +++ b/site/content/en/docs/Tasks/Registry/_index.md @@ -0,0 +1,8 @@ +--- +title: "Working with Registries" +linkTitle: "Working with Registries" +weight: 6 +date: 2017-01-05 +description: > + How to interact with Docker registries. +--- \ No newline at end of file diff --git a/site/content/en/docs/Tasks/Registry/insecure.md b/site/content/en/docs/Tasks/Registry/insecure.md new file mode 100644 index 0000000000..aceba59e66 --- /dev/null +++ b/site/content/en/docs/Tasks/Registry/insecure.md @@ -0,0 +1,17 @@ +--- +title: "Insecure" +linkTitle: "Insecure" +weight: 6 +date: 2019-08-1 +description: > + How to enable insecure registry support within minikube +--- + +minikube allows users to configure the docker engine's `--insecure-registry` flag. + +You can use the `--insecure-registry` flag on the +`minikube start` command to enable insecure communication between the docker engine and registries listening to requests from the CIDR range. + +One nifty hack is to allow the kubelet running in minikube to talk to registries deployed inside a pod in the cluster without backing them +with TLS certificates. Because the default service cluster IP is known to be available at 10.0.0.1, users can pull images from registries +deployed inside the cluster by creating the cluster with `minikube start --insecure-registry "10.0.0.0/24"`. diff --git a/site/content/en/docs/Tasks/Registry/private.md b/site/content/en/docs/Tasks/Registry/private.md new file mode 100644 index 0000000000..b2a835e7e8 --- /dev/null +++ b/site/content/en/docs/Tasks/Registry/private.md @@ -0,0 +1,28 @@ +--- +title: "Private" +linkTitle: "Private" +weight: 6 +date: 2019-08-01 +description: > + How to use a private registry within minikube +--- + + +**GCR/ECR/Docker**: minikube has an addon, `registry-creds` which maps credentials into minikube to support pulling from Google Container Registry (GCR), Amazon's EC2 Container Registry (ECR), and Private Docker registries. You will need to run `minikube addons configure registry-creds` and `minikube addons enable registry-creds` to get up and running. An example of this is below: + +```shell +$ minikube addons configure registry-creds +Do you want to enable AWS Elastic Container Registry? [y/n]: n + +Do you want to enable Google Container Registry? [y/n]: y +-- Enter path to credentials (e.g. /home/user/.config/gcloud/application_default_credentials.json):/home/user/.config/gcloud/application_default_credentials.json + +Do you want to enable Docker Registry? [y/n]: n +registry-creds was successfully configured +$ minikube addons enable registry-creds +``` + +For additional information on private container registries, see [this page](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/). + +We recommend you use _ImagePullSecrets_, but if you would like to configure access on the minikube VM you can place the `.dockercfg` in the `/home/docker` directory or the `config.json` in the `/var/lib/kubelet` directory. Make sure to restart your kubelet (for kubeadm) process with `sudo systemctl restart kubelet`. + diff --git a/site/content/en/docs/Tasks/debug.md b/site/content/en/docs/Tasks/debug.md new file mode 100644 index 0000000000..2adfeb0a54 --- /dev/null +++ b/site/content/en/docs/Tasks/debug.md @@ -0,0 +1,68 @@ +--- +title: "Debugging" +linkTitle: "Debugging" +weight: 9 +date: 2019-08-01 +description: > + How to debug issues within minikube +--- + +## Enabling debug logs + +To debug issues with minikube (not *Kubernetes* but **minikube** itself), you can use the `-v` flag to see debug level info. The specified values for `-v` will do the following (the values are all encompassing in that higher values will give you all lower value outputs as well): + +* `--v=0` will output **INFO** level logs +* `--v=1` will output **WARNING** level logs +* `--v=2` will output **ERROR** level logs + +* `--v=3` will output *libmachine* logging +* `--v=7` will output *libmachine --debug* level logging + +Example: + +`minikube start --v=7` Will start minikube and output all the important debug logs to stdout. + +## Gathering VM logs + +To debug issues where Kubernetes failed to deploy, it is very useful to collect the Kubernetes pod and kernel logs: + +```shell +minikube logs +``` + +## Viewing Pod Status + +To view the deployment state of all Kubernetes pods, use: + +```shell +kubectl get po -A +``` + +Example output: + +```shell +NAMESPACE NAME READY STATUS RESTARTS AGE +kube-system coredns-5c98db65d4-299md 1/1 Running 0 11m +kube-system coredns-5c98db65d4-qlpkd 1/1 Running 0 11m +kube-system etcd-minikube 1/1 Running 0 10m +kube-system gvisor 1/1 Running 0 11m +... +kube-system storage-provisioner 1/1 Running 0 11m +``` + +To view more detailed information about a pod, use: + +```shell +kubectl describe pod -n +``` + +## Debugging hung start-up + +minikube will wait ~8 minutes before giving up on a Kubernetes deployment. If you want to see startup fails more immediately, consider using: + +```shell +minikube logs --problems +``` + +This will attempt to surface known errors, such as invalid configuration flags. If nothing interesting shows up, try `minikube logs`. + diff --git a/site/content/en/docs/Tasks/sync.md b/site/content/en/docs/Tasks/sync.md new file mode 100644 index 0000000000..ad4cc0eafb --- /dev/null +++ b/site/content/en/docs/Tasks/sync.md @@ -0,0 +1,38 @@ +--- +title: "File Sync" +linkTitle: "File Sync" +weight: 6 +date: 2019-08-01 +description: > + How to sync files into minikube +--- + +## Built-in sync + +minikube has a built-in file sync mechanism, but it only syncs when `minikube start` is run, though before Kubernetes is started. Examples where this may be useful are custom versions of system or Kubernetes configuration files, such as: + +- DNS configuration +- SSL certificates +- Kubernetes service metadata + +### Adding files + +Place files to be synced in `$MINIKUBE_HOME/files` + +For example, running the following will result in the deployment of a custom /etc/resolv.conf: + +``` +mkdir -p ~/.minikube/files/etc +echo nameserver 8.8.8.8 > ~/.minikube/files/etc/resolv.conf +minikube start +``` + +## Other approaches + +With a bit of work, one could setup [Syncthing](https://syncthing.net) between the host and the guest VM for persistent file synchronization. + +If you are looking for a solution tuned for iterative application development, consider using a Kubernetes tool that is known to work well with minikube: + +- [Draft](https://draft.sh): see specific [minikube instructions](https://github.com/Azure/draft/blob/master/docs/install-minikube.md) +- [Oketo](https://github.com/okteto/okteto) +- [Skaffold](http://github.com/ContainerTools/skaffold) From 5e4696fd006184d4ab5a5433e52651fabf00f487 Mon Sep 17 00:00:00 2001 From: Thomas Stromberg Date: Fri, 2 Aug 2019 18:04:09 -0700 Subject: [PATCH 009/115] Massage autogenerated output to Hugo form --- .../en/docs/Reference/Commands/addons.md | 197 ++---------------- .../en/docs/Reference/Commands/cache.md | 126 +---------- .../en/docs/Reference/Commands/completion.md | 30 +-- .../en/docs/Reference/Commands/config.md | 161 ++++++-------- .../en/docs/Reference/Commands/dashboard.md | 23 +- .../en/docs/Reference/Commands/delete.md | 25 +-- .../en/docs/Reference/Commands/docker-env.md | 21 +- .../docs/Reference/Commands/generate-docs.md | 44 ---- site/content/en/docs/Reference/Commands/ip.md | 25 +-- .../en/docs/Reference/Commands/kubectl.md | 27 +-- .../en/docs/Reference/Commands/logs.md | 21 +- .../en/docs/Reference/Commands/mount.md | 21 +- .../en/docs/Reference/Commands/profile.md | 56 ++--- .../en/docs/Reference/Commands/service.md | 47 ++--- .../en/docs/Reference/Commands/ssh-key.md | 27 +-- .../content/en/docs/Reference/Commands/ssh.md | 25 +-- .../en/docs/Reference/Commands/start.md | 21 +- .../en/docs/Reference/Commands/status.md | 18 +- .../en/docs/Reference/Commands/stop.md | 25 +-- .../en/docs/Reference/Commands/tunnel.md | 18 +- .../docs/Reference/Commands/update-check.md | 41 +--- .../docs/Reference/Commands/update-context.md | 28 +-- 22 files changed, 281 insertions(+), 746 deletions(-) delete mode 100644 site/content/en/docs/Reference/Commands/generate-docs.md diff --git a/site/content/en/docs/Reference/Commands/addons.md b/site/content/en/docs/Reference/Commands/addons.md index 2abc77a515..37326a6f25 100644 --- a/site/content/en/docs/Reference/Commands/addons.md +++ b/site/content/en/docs/Reference/Commands/addons.md @@ -1,14 +1,12 @@ --- -title: "Addons" -linkTitle: "Addons" +title: "addons" +linkTitle: "addons" weight: 1 date: 2019-08-01 description: > - Modify minikube's kubernetes addons + Modifies minikube addons files using subcommands like "minikube addons enable heapster" --- -Addons modifies minikube addons files using subcommands like "minikube addons enable heapster" - ## Usage ``` @@ -16,177 +14,59 @@ minikube addons SUBCOMMAND [flags] minikube addons [command] ``` -## Available Commands +## Subcommands -``` -configure Configures the addon w/ADDON_NAME within minikube -disable Disables the addon w/ADDON_NAME within minikube -enable Enables the addon w/ADDON_NAME within minikube -list Lists all available minikube addons as well as their current statuses (enabled/disabled) -open Opens the addon w/ADDON_NAME within minikube -``` +* **configure**: Configures the addon w/ADDON_NAME within minikube +* **disable**: Disables the addon w/ADDON_NAME within minikube +* **enable**: Enables the addon w/ADDON_NAME within minikube +* **list**: Lists all available minikube addons as well as their current statuses (enabled/disabled) +* **open**: Opens the addon w/ADDON_NAME within minikube -## Flags -``` ---format string Go template format string for the addon list output. The format for Go templates can be found here: https://golang.org/pkg/text/template/ - For the list of accessible variables for the template, see the struct values here: https://godoc.org/k8s.io/minikube/cmd/minikube/cmd/config#AddonListTemplate (default "- {{.AddonName}}: {{.AddonStatus}}\n") -``` ## minikube addons configure Configures the addon w/ADDON_NAME within minikube (example: minikube addons configure registry-creds). For a list of available addons use: minikube addons list -### Synopsis - -Configures the addon w/ADDON_NAME within minikube (example: minikube addons configure registry-creds). For a list of available addons use: minikube addons list +### Usage ``` minikube addons configure ADDON_NAME [flags] ``` -### Options - -``` - -h, --help help for configure -``` - -### Options inherited from parent commands - -``` - --alsologtostderr log to standard error as well as files - -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") - --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) - --log_dir string If non-empty, write log files in this directory - --logtostderr log to standard error instead of files - -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") - --stderrthreshold severity logs at or above this threshold go to stderr (default 2) - -v, --v Level log level for V logs - --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging -``` - -### SEE ALSO - -* [minikube addons](minikube_addons.md) - Modify minikube's kubernetes addons - -###### Auto generated by spf13/cobra on 1-Aug-2019 ## minikube addons disable Disables the addon w/ADDON_NAME within minikube (example: minikube addons disable dashboard). For a list of available addons use: minikube addons list -### Synopsis - -Disables the addon w/ADDON_NAME within minikube (example: minikube addons disable dashboard). For a list of available addons use: minikube addons list +### Usage ``` minikube addons disable ADDON_NAME [flags] ``` -### Options - -``` - -h, --help help for disable -``` - -### Options inherited from parent commands - -``` - --alsologtostderr log to standard error as well as files - -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") - --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) - --log_dir string If non-empty, write log files in this directory - --logtostderr log to standard error instead of files - -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") - --stderrthreshold severity logs at or above this threshold go to stderr (default 2) - -v, --v Level log level for V logs - --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging -``` - -### SEE ALSO - -* [minikube addons](minikube_addons.md) - Modify minikube's kubernetes addons - -###### Auto generated by spf13/cobra on 1-Aug-2019 ## minikube addons enable Enables the addon w/ADDON_NAME within minikube (example: minikube addons enable dashboard). For a list of available addons use: minikube addons list -### Synopsis - -Enables the addon w/ADDON_NAME within minikube (example: minikube addons enable dashboard). For a list of available addons use: minikube addons list +### Usage ``` minikube addons enable ADDON_NAME [flags] ``` -### Options - -``` - -h, --help help for enable -``` - -### Options inherited from parent commands - -``` - --alsologtostderr log to standard error as well as files - -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") - --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) - --log_dir string If non-empty, write log files in this directory - --logtostderr log to standard error instead of files - -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") - --stderrthreshold severity logs at or above this threshold go to stderr (default 2) - -v, --v Level log level for V logs - --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging -``` - -### SEE ALSO - -* [minikube addons](minikube_addons.md) - Modify minikube's kubernetes addons - -###### Auto generated by spf13/cobra on 1-Aug-2019 ## minikube addons list Lists all available minikube addons as well as their current statuses (enabled/disabled) -### Synopsis - -Lists all available minikube addons as well as their current statuses (enabled/disabled) +### Usage ``` minikube addons list [flags] ``` - -### Options - -``` - -h, --help help for list -``` - -### Options inherited from parent commands - -``` - --alsologtostderr log to standard error as well as files - -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") - --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) - --log_dir string If non-empty, write log files in this directory - --logtostderr log to standard error instead of files - -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") - --stderrthreshold severity logs at or above this threshold go to stderr (default 2) - -v, --v Level log level for V logs - --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging -``` - -### SEE ALSO - -* [minikube addons](minikube_addons.md) - Modify minikube's kubernetes addons - -###### Auto generated by spf13/cobra on 1-Aug-2019 ## minikube addons open Opens the addon w/ADDON_NAME within minikube (example: minikube addons open dashboard). For a list of available addons use: minikube addons list -### Synopsis - -Opens the addon w/ADDON_NAME within minikube (example: minikube addons open dashboard). For a list of available addons use: minikube addons list +### Usage ``` minikube addons open ADDON_NAME [flags] @@ -203,44 +83,6 @@ minikube addons open ADDON_NAME [flags] --wait int Amount of time to wait for service in seconds (default 20) ``` -### Options inherited from parent commands - -``` - --alsologtostderr log to standard error as well as files - -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") - --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) - --log_dir string If non-empty, write log files in this directory - --logtostderr log to standard error instead of files - -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") - --stderrthreshold severity logs at or above this threshold go to stderr (default 2) - -v, --v Level log level for V logs - --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging -``` - -### SEE ALSO - -* [minikube addons](minikube_addons.md) - Modify minikube's kubernetes addons - -###### Auto generated by spf13/cobra on 1-Aug-2019 -## minikube addons - -Modify minikube's kubernetes addons - -### Synopsis - -addons modifies minikube addons files using subcommands like "minikube addons enable heapster" - -``` -minikube addons SUBCOMMAND [flags] -``` - -### Options - -``` - --format string Go template format string for the addon list output. The format for Go templates can be found here: https://golang.org/pkg/text/template/ - For the list of accessible variables for the template, see the struct values here: https://godoc.org/k8s.io/minikube/cmd/minikube/cmd/config#AddonListTemplate (default "- {{.AddonName}}: {{.AddonStatus}}\n") - -h, --help help for addons -``` ### Options inherited from parent commands @@ -255,14 +97,3 @@ minikube addons SUBCOMMAND [flags] -v, --v Level log level for V logs --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` - -### SEE ALSO - -* [minikube](minikube.md) - Minikube is a tool for managing local Kubernetes clusters. -* [minikube addons configure](minikube_addons_configure.md) - Configures the addon w/ADDON_NAME within minikube (example: minikube addons configure registry-creds). For a list of available addons use: minikube addons list -* [minikube addons disable](minikube_addons_disable.md) - Disables the addon w/ADDON_NAME within minikube (example: minikube addons disable dashboard). For a list of available addons use: minikube addons list -* [minikube addons enable](minikube_addons_enable.md) - Enables the addon w/ADDON_NAME within minikube (example: minikube addons enable dashboard). For a list of available addons use: minikube addons list -* [minikube addons list](minikube_addons_list.md) - Lists all available minikube addons as well as their current statuses (enabled/disabled) -* [minikube addons open](minikube_addons_open.md) - Opens the addon w/ADDON_NAME within minikube (example: minikube addons open dashboard). For a list of available addons use: minikube addons list - -###### Auto generated by spf13/cobra on 1-Aug-2019 diff --git a/site/content/en/docs/Reference/Commands/cache.md b/site/content/en/docs/Reference/Commands/cache.md index 0f4889927a..141c878eea 100644 --- a/site/content/en/docs/Reference/Commands/cache.md +++ b/site/content/en/docs/Reference/Commands/cache.md @@ -1,15 +1,15 @@ --- -title: "Cache" -linkTitle: "Cache" +title: "cache" +linkTitle: "cache" weight: 1 date: 2019-08-01 description: > - Modify minikube's kubernetes addons ----## minikube cache add + Add or delete an image from the local cache. +--- -Add an image to local cache. +### Subcommands -### Synopsis +## minikube cache add Add an image to local cache. @@ -17,76 +17,18 @@ Add an image to local cache. minikube cache add [flags] ``` -### Options - -``` - -h, --help help for add -``` - -### Options inherited from parent commands - -``` - --alsologtostderr log to standard error as well as files - -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") - --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) - --log_dir string If non-empty, write log files in this directory - --logtostderr log to standard error instead of files - -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") - --stderrthreshold severity logs at or above this threshold go to stderr (default 2) - -v, --v Level log level for V logs - --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging -``` - -### SEE ALSO - -* [minikube cache](minikube_cache.md) - Add or delete an image from the local cache. - -###### Auto generated by spf13/cobra on 1-Aug-2019 ## minikube cache delete Delete an image from the local cache. -### Synopsis - -Delete an image from the local cache. - ``` minikube cache delete [flags] ``` -### Options - -``` - -h, --help help for delete -``` - -### Options inherited from parent commands - -``` - --alsologtostderr log to standard error as well as files - -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") - --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) - --log_dir string If non-empty, write log files in this directory - --logtostderr log to standard error instead of files - -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") - --stderrthreshold severity logs at or above this threshold go to stderr (default 2) - -v, --v Level log level for V logs - --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging -``` - -### SEE ALSO - -* [minikube cache](minikube_cache.md) - Add or delete an image from the local cache. - -###### Auto generated by spf13/cobra on 1-Aug-2019 ## minikube cache list List all available images from the local cache. -### Synopsis - -List all available images from the local cache. - ``` minikube cache list [flags] ``` @@ -98,59 +40,3 @@ minikube cache list [flags] For the list of accessible variables for the template, see the struct values here: https://godoc.org/k8s.io/minikube/cmd/minikube/cmd#CacheListTemplate (default "{{.CacheImage}}\n") -h, --help help for list ``` - -### Options inherited from parent commands - -``` - --alsologtostderr log to standard error as well as files - -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") - --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) - --log_dir string If non-empty, write log files in this directory - --logtostderr log to standard error instead of files - -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") - --stderrthreshold severity logs at or above this threshold go to stderr (default 2) - -v, --v Level log level for V logs - --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging -``` - -### SEE ALSO - -* [minikube cache](minikube_cache.md) - Add or delete an image from the local cache. - -###### Auto generated by spf13/cobra on 1-Aug-2019 -## minikube cache - -Add or delete an image from the local cache. - -### Synopsis - -Add or delete an image from the local cache. - -### Options - -``` - -h, --help help for cache -``` - -### Options inherited from parent commands - -``` - --alsologtostderr log to standard error as well as files - -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") - --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) - --log_dir string If non-empty, write log files in this directory - --logtostderr log to standard error instead of files - -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") - --stderrthreshold severity logs at or above this threshold go to stderr (default 2) - -v, --v Level log level for V logs - --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging -``` - -### SEE ALSO - -* [minikube](minikube.md) - Minikube is a tool for managing local Kubernetes clusters. -* [minikube cache add](minikube_cache_add.md) - Add an image to local cache. -* [minikube cache delete](minikube_cache_delete.md) - Delete an image from the local cache. -* [minikube cache list](minikube_cache_list.md) - List all available images from the local cache. - -###### Auto generated by spf13/cobra on 1-Aug-2019 diff --git a/site/content/en/docs/Reference/Commands/completion.md b/site/content/en/docs/Reference/Commands/completion.md index bdcba5fa1b..4fe4f4dbbf 100644 --- a/site/content/en/docs/Reference/Commands/completion.md +++ b/site/content/en/docs/Reference/Commands/completion.md @@ -1,40 +1,46 @@ -## minikube completion +--- +title: "completion" +linkTitle: "completion" +weight: 1 +date: 2019-08-01 +description: > + Outputs minikube shell completion for the given shell (bash or zsh) +--- -Outputs minikube shell completion for the given shell (bash or zsh) ### Synopsis - Outputs minikube shell completion for the given shell (bash or zsh) This depends on the bash-completion binary. Example installation instructions: OS X: + +```shell $ brew install bash-completion $ source $(brew --prefix)/etc/bash_completion $ minikube completion bash > ~/.minikube-completion # for bash users $ minikube completion zsh > ~/.minikube-completion # for zsh users $ source ~/.minikube-completion +``` + Ubuntu: +```shell $ apt-get install bash-completion $ source /etc/bash-completion $ source <(minikube completion bash) # for bash users $ source <(minikube completion zsh) # for zsh users +``` Additionally, you may want to output the completion to a file and source in your .bashrc Note for zsh users: [1] zsh completions are only supported in versions of zsh >= 5.2 +### Usage ``` minikube completion SHELL [flags] ``` -### Options - -``` - -h, --help help for completion -``` - ### Options inherited from parent commands ``` @@ -48,9 +54,3 @@ minikube completion SHELL [flags] -v, --v Level log level for V logs --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` - -### SEE ALSO - -* [minikube](minikube.md) - Minikube is a tool for managing local Kubernetes clusters. - -###### Auto generated by spf13/cobra on 1-Aug-2019 diff --git a/site/content/en/docs/Reference/Commands/config.md b/site/content/en/docs/Reference/Commands/config.md index 5a933d9837..785ce97f4a 100644 --- a/site/content/en/docs/Reference/Commands/config.md +++ b/site/content/en/docs/Reference/Commands/config.md @@ -1,123 +1,104 @@ -## minikube config get - -Gets the value of PROPERTY_NAME from the minikube config file +--- +title: "config" +linkTitle: "config" +weight: 1 +date: 2019-08-01 +description: > + Modify minikube config +--- ### Synopsis +config modifies minikube config files using subcommands like "minikube config set vm-driver kvm" + +Configurable fields: + + * vm-driver + * feature-gates + * v + * cpus + * disk-size + * host-only-cidr + * memory + * log_dir + * kubernetes-version + * iso-url + * WantUpdateNotification + * ReminderWaitPeriodInHours + * WantReportError + * WantReportErrorPrompt + * WantKubectlDownloadMsg + * WantNoneDriverWarning + * profile + * bootstrapper + * ShowDriverDeprecationNotification + * ShowBootstrapperDeprecationNotification + * dashboard + * addon-manager + * default-storageclass + * heapster + * efk + * ingress + * registry + * registry-creds + * freshpod + * default-storageclass + * storage-provisioner + * storage-provisioner-gluster + * metrics-server + * nvidia-driver-installer + * nvidia-gpu-device-plugin + * logviewer + * gvisor + * hyperv-virtual-switch + * disable-driver-mounts + * cache + * embed-certs + +### subcommands + +- **get**: Gets the value of PROPERTY_NAME from the minikube config file + +## minikube config get + Returns the value of PROPERTY_NAME from the minikube config file. Can be overwritten at runtime by flags or environmental variables. +### Usage + ``` minikube config get PROPERTY_NAME [flags] ``` -### Options - -``` - -h, --help help for get -``` - -### Options inherited from parent commands - -``` - --alsologtostderr log to standard error as well as files - -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") - --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) - --log_dir string If non-empty, write log files in this directory - --logtostderr log to standard error instead of files - -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") - --stderrthreshold severity logs at or above this threshold go to stderr (default 2) - -v, --v Level log level for V logs - --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging -``` - -### SEE ALSO - -* [minikube config](minikube_config.md) - Modify minikube config - -###### Auto generated by spf13/cobra on 1-Aug-2019 ## minikube config set -Sets an individual value in a minikube config file - -### Synopsis - Sets the PROPERTY_NAME config value to PROPERTY_VALUE These values can be overwritten by flags or environment variables at runtime. +### Usage + ``` minikube config set PROPERTY_NAME PROPERTY_VALUE [flags] ``` -### Options - -``` - -h, --help help for set -``` - -### Options inherited from parent commands - -``` - --alsologtostderr log to standard error as well as files - -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") - --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) - --log_dir string If non-empty, write log files in this directory - --logtostderr log to standard error instead of files - -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") - --stderrthreshold severity logs at or above this threshold go to stderr (default 2) - -v, --v Level log level for V logs - --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging -``` - -### SEE ALSO - -* [minikube config](minikube_config.md) - Modify minikube config - -###### Auto generated by spf13/cobra on 1-Aug-2019 ## minikube config unset -unsets an individual value in a minikube config file - -### Synopsis - unsets PROPERTY_NAME from the minikube config file. Can be overwritten by flags or environmental variables +### Usage + ``` minikube config unset PROPERTY_NAME [flags] ``` -### Options -``` - -h, --help help for unset -``` - -### Options inherited from parent commands - -``` - --alsologtostderr log to standard error as well as files - -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") - --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) - --log_dir string If non-empty, write log files in this directory - --logtostderr log to standard error instead of files - -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") - --stderrthreshold severity logs at or above this threshold go to stderr (default 2) - -v, --v Level log level for V logs - --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging -``` - -### SEE ALSO - -* [minikube config](minikube_config.md) - Modify minikube config - -###### Auto generated by spf13/cobra on 1-Aug-2019 ## minikube config view -Display values currently set in the minikube config file - ### Synopsis Display values currently set in the minikube config file. +### Usage + ``` minikube config view [flags] ``` @@ -143,9 +124,3 @@ minikube config view [flags] -v, --v Level log level for V logs --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` - -### SEE ALSO - -* [minikube config](minikube_config.md) - Modify minikube config - -###### Auto generated by spf13/cobra on 1-Aug-2019 diff --git a/site/content/en/docs/Reference/Commands/dashboard.md b/site/content/en/docs/Reference/Commands/dashboard.md index 5c74cc9541..27a1de5106 100644 --- a/site/content/en/docs/Reference/Commands/dashboard.md +++ b/site/content/en/docs/Reference/Commands/dashboard.md @@ -1,10 +1,13 @@ -## minikube dashboard +--- +title: "dashboard" +linkTitle: "dashboard" +weight: 1 +date: 2019-08-01 +description: > + Access the kubernetes dashboard running within the minikube cluster +--- -Access the kubernetes dashboard running within the minikube cluster - -### Synopsis - -Access the kubernetes dashboard running within the minikube cluster +### Usage ``` minikube dashboard [flags] @@ -29,10 +32,4 @@ minikube dashboard [flags] --stderrthreshold severity logs at or above this threshold go to stderr (default 2) -v, --v Level log level for V logs --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging -``` - -### SEE ALSO - -* [minikube](minikube.md) - Minikube is a tool for managing local Kubernetes clusters. - -###### Auto generated by spf13/cobra on 1-Aug-2019 +``` \ No newline at end of file diff --git a/site/content/en/docs/Reference/Commands/delete.md b/site/content/en/docs/Reference/Commands/delete.md index e21fe4a057..a8ef0065bd 100644 --- a/site/content/en/docs/Reference/Commands/delete.md +++ b/site/content/en/docs/Reference/Commands/delete.md @@ -1,22 +1,23 @@ -## minikube delete - -Deletes a local kubernetes cluster +--- +title: "delete" +linkTitle: "delete" +weight: 1 +date: 2019-08-01 +description: > + Deletes a local kubernetes cluster +--- ### Synopsis Deletes a local kubernetes cluster. This command deletes the VM, and removes all associated files. +## Usage + ``` minikube delete [flags] ``` -### Options - -``` - -h, --help help for delete -``` - ### Options inherited from parent commands ``` @@ -30,9 +31,3 @@ minikube delete [flags] -v, --v Level log level for V logs --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` - -### SEE ALSO - -* [minikube](minikube.md) - Minikube is a tool for managing local Kubernetes clusters. - -###### Auto generated by spf13/cobra on 1-Aug-2019 diff --git a/site/content/en/docs/Reference/Commands/docker-env.md b/site/content/en/docs/Reference/Commands/docker-env.md index bf4d2720b5..2260564680 100644 --- a/site/content/en/docs/Reference/Commands/docker-env.md +++ b/site/content/en/docs/Reference/Commands/docker-env.md @@ -1,10 +1,13 @@ -## minikube docker-env +--- +title: "docker-env" +linkTitle: "docker-env" +weight: 1 +date: 2019-08-01 +description: > + Sets up docker env variables; similar to '$(docker-machine env)' +--- -Sets up docker env variables; similar to '$(docker-machine env)' - -### Synopsis - -Sets up docker env variables; similar to '$(docker-machine env)'. +### Usage ``` minikube docker-env [flags] @@ -32,9 +35,3 @@ minikube docker-env [flags] -v, --v Level log level for V logs --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` - -### SEE ALSO - -* [minikube](minikube.md) - Minikube is a tool for managing local Kubernetes clusters. - -###### Auto generated by spf13/cobra on 1-Aug-2019 diff --git a/site/content/en/docs/Reference/Commands/generate-docs.md b/site/content/en/docs/Reference/Commands/generate-docs.md deleted file mode 100644 index a22742d22b..0000000000 --- a/site/content/en/docs/Reference/Commands/generate-docs.md +++ /dev/null @@ -1,44 +0,0 @@ -## minikube generate-docs - -Populates the specified folder with documentation in markdown about minikube - -### Synopsis - -Populates the specified folder with documentation in markdown about minikube - -``` -minikube generate-docs [flags] -``` - -### Examples - -``` -minikube generate-docs --path -``` - -### Options - -``` - -h, --help help for generate-docs - --path string The path on the file system where the docs in markdown need to be saved -``` - -### Options inherited from parent commands - -``` - --alsologtostderr log to standard error as well as files - -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") - --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) - --log_dir string If non-empty, write log files in this directory - --logtostderr log to standard error instead of files - -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") - --stderrthreshold severity logs at or above this threshold go to stderr (default 2) - -v, --v Level log level for V logs - --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging -``` - -### SEE ALSO - -* [minikube](minikube.md) - Minikube is a tool for managing local Kubernetes clusters. - -###### Auto generated by spf13/cobra on 1-Aug-2019 diff --git a/site/content/en/docs/Reference/Commands/ip.md b/site/content/en/docs/Reference/Commands/ip.md index 49c37aa01e..def902bf77 100644 --- a/site/content/en/docs/Reference/Commands/ip.md +++ b/site/content/en/docs/Reference/Commands/ip.md @@ -1,21 +1,22 @@ -## minikube ip - -Retrieves the IP address of the running cluster +--- +title: "ip" +linkTitle: "ip" +weight: 1 +date: 2019-08-01 +description: > + Retrieves the IP address of the running cluster +--- ### Synopsis Retrieves the IP address of the running cluster, and writes it to STDOUT. +### Usage + ``` minikube ip [flags] ``` -### Options - -``` - -h, --help help for ip -``` - ### Options inherited from parent commands ``` @@ -29,9 +30,3 @@ minikube ip [flags] -v, --v Level log level for V logs --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` - -### SEE ALSO - -* [minikube](minikube.md) - Minikube is a tool for managing local Kubernetes clusters. - -###### Auto generated by spf13/cobra on 1-Aug-2019 diff --git a/site/content/en/docs/Reference/Commands/kubectl.md b/site/content/en/docs/Reference/Commands/kubectl.md index a16468abb1..9d0bd069fa 100644 --- a/site/content/en/docs/Reference/Commands/kubectl.md +++ b/site/content/en/docs/Reference/Commands/kubectl.md @@ -1,24 +1,31 @@ -## minikube kubectl +--- +title: "kubectl" +linkTitle: "kubectl" +weight: 1 +date: 2019-08-01 +description: > + Run kubectl +--- -Run kubectl ### Synopsis Run the kubernetes client, download it if necessary. -Examples: -minikube kubectl -- --help -kubectl get pods --namespace kube-system + +### Usage ``` minikube kubectl [flags] ``` -### Options +### Examples: ``` - -h, --help help for kubectl +minikube kubectl -- --help +kubectl get pods --namespace kube-system ``` + ### Options inherited from parent commands ``` @@ -32,9 +39,3 @@ minikube kubectl [flags] -v, --v Level log level for V logs --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` - -### SEE ALSO - -* [minikube](minikube.md) - Minikube is a tool for managing local Kubernetes clusters. - -###### Auto generated by spf13/cobra on 1-Aug-2019 diff --git a/site/content/en/docs/Reference/Commands/logs.md b/site/content/en/docs/Reference/Commands/logs.md index a373563dcc..0466ff747f 100644 --- a/site/content/en/docs/Reference/Commands/logs.md +++ b/site/content/en/docs/Reference/Commands/logs.md @@ -1,10 +1,13 @@ -## minikube logs +--- +title: "logs" +linkTitle: "logs" +weight: 1 +date: 2019-08-01 +description: > + Gets the logs of the running instance, used for debugging minikube, not user code +--- -Gets the logs of the running instance, used for debugging minikube, not user code - -### Synopsis - -Gets the logs of the running instance, used for debugging minikube, not user code. +## Usage ``` minikube logs [flags] @@ -32,9 +35,3 @@ minikube logs [flags] -v, --v Level log level for V logs --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` - -### SEE ALSO - -* [minikube](minikube.md) - Minikube is a tool for managing local Kubernetes clusters. - -###### Auto generated by spf13/cobra on 1-Aug-2019 diff --git a/site/content/en/docs/Reference/Commands/mount.md b/site/content/en/docs/Reference/Commands/mount.md index 0b5a2d6700..fa85b70922 100644 --- a/site/content/en/docs/Reference/Commands/mount.md +++ b/site/content/en/docs/Reference/Commands/mount.md @@ -1,10 +1,13 @@ -## minikube mount +--- +title: "mount" +linkTitle: "mount" +weight: 1 +date: 2019-08-01 +description: > + Mounts the specified directory into minikube +--- -Mounts the specified directory into minikube - -### Synopsis - -Mounts the specified directory into minikube. +### Usage ``` minikube mount [flags] : @@ -38,9 +41,3 @@ minikube mount [flags] : -v, --v Level log level for V logs --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` - -### SEE ALSO - -* [minikube](minikube.md) - Minikube is a tool for managing local Kubernetes clusters. - -###### Auto generated by spf13/cobra on 1-Aug-2019 diff --git a/site/content/en/docs/Reference/Commands/profile.md b/site/content/en/docs/Reference/Commands/profile.md index 075b00d1c3..2c3a713896 100644 --- a/site/content/en/docs/Reference/Commands/profile.md +++ b/site/content/en/docs/Reference/Commands/profile.md @@ -1,21 +1,28 @@ -## minikube profile - -Profile gets or sets the current minikube profile +--- +title: "profile" +linkTitle: "profile" +weight: 1 +date: 2019-08-01 +description: > + Profile gets or sets the current minikube profile +--- ### Synopsis profile sets the current minikube profile, or gets the current profile if no arguments are provided. This is used to run and manage multiple minikube instance. You can return to the default minikube profile by running `minikube profile default` -``` -minikube profile [MINIKUBE_PROFILE_NAME]. You can return to the default minikube profile by running `minikube profile default` [flags] -``` - -### Options +### Usage ``` - -h, --help help for profile +minikube profile [MINIKUBE_PROFILE_NAME] + +You can return to the default minikube profile by running `minikube profile default` [flags] ``` +## Subcommands + +- **list**: Lists all minikube profiles. + ### Options inherited from parent commands ``` @@ -30,12 +37,7 @@ minikube profile [MINIKUBE_PROFILE_NAME]. You can return to the default minikub --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` -### SEE ALSO -* [minikube](minikube.md) - Minikube is a tool for managing local Kubernetes clusters. -* [minikube profile list](minikube_profile_list.md) - Lists all minikube profiles. - -###### Auto generated by spf13/cobra on 1-Aug-2019 ## minikube profile list Lists all minikube profiles. @@ -47,29 +49,3 @@ Lists all valid minikube profiles and detects all possible invalid profiles. ``` minikube profile list [flags] ``` - -### Options - -``` - -h, --help help for list -``` - -### Options inherited from parent commands - -``` - --alsologtostderr log to standard error as well as files - -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") - --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) - --log_dir string If non-empty, write log files in this directory - --logtostderr log to standard error instead of files - -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") - --stderrthreshold severity logs at or above this threshold go to stderr (default 2) - -v, --v Level log level for V logs - --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging -``` - -### SEE ALSO - -* [minikube profile](minikube_profile.md) - Profile gets or sets the current minikube profile - -###### Auto generated by spf13/cobra on 1-Aug-2019 diff --git a/site/content/en/docs/Reference/Commands/service.md b/site/content/en/docs/Reference/Commands/service.md index 057956b942..a9579d67f8 100644 --- a/site/content/en/docs/Reference/Commands/service.md +++ b/site/content/en/docs/Reference/Commands/service.md @@ -1,15 +1,26 @@ -## minikube service - -Gets the kubernetes URL(s) for the specified service in your local cluster +--- +title: "service" +linkTitle: "service" +weight: 1 +date: 2019-08-01 +description: > + Gets the kubernetes URL(s) for the specified service in your local cluster +--- ### Synopsis Gets the kubernetes URL(s) for the specified service in your local cluster. In the case of multiple URLs they will be printed one at a time. +### Usage + ``` minikube service [flags] SERVICE ``` +### Subcommands + +- **list**: Lists the URLs for the services in your local cluster + ### Options ``` @@ -36,20 +47,10 @@ minikube service [flags] SERVICE --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` -### SEE ALSO - -* [minikube](minikube.md) - Minikube is a tool for managing local Kubernetes clusters. -* [minikube service list](minikube_service_list.md) - Lists the URLs for the services in your local cluster - -###### Auto generated by spf13/cobra on 1-Aug-2019 ## minikube service list Lists the URLs for the services in your local cluster -### Synopsis - -Lists the URLs for the services in your local cluster - ``` minikube service list [flags] ``` @@ -61,23 +62,3 @@ minikube service list [flags] -n, --namespace string The services namespace ``` -### Options inherited from parent commands - -``` - --alsologtostderr log to standard error as well as files - -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") - --format string Format to output service URL in. This format will be applied to each url individually and they will be printed one at a time. (default "http://{{.IP}}:{{.Port}}") - --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) - --log_dir string If non-empty, write log files in this directory - --logtostderr log to standard error instead of files - -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") - --stderrthreshold severity logs at or above this threshold go to stderr (default 2) - -v, --v Level log level for V logs - --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging -``` - -### SEE ALSO - -* [minikube service](minikube_service.md) - Gets the kubernetes URL(s) for the specified service in your local cluster - -###### Auto generated by spf13/cobra on 1-Aug-2019 diff --git a/site/content/en/docs/Reference/Commands/ssh-key.md b/site/content/en/docs/Reference/Commands/ssh-key.md index 30084dbc24..271c736878 100644 --- a/site/content/en/docs/Reference/Commands/ssh-key.md +++ b/site/content/en/docs/Reference/Commands/ssh-key.md @@ -1,21 +1,18 @@ -## minikube ssh-key +--- +title: "ssh-key" +linkTitle: "sshs-key" +weight: 1 +date: 2019-08-01 +description: > + Retrieve the ssh identity key path of the specified cluster +--- -Retrieve the ssh identity key path of the specified cluster - -### Synopsis - -Retrieve the ssh identity key path of the specified cluster. +### Usage ``` minikube ssh-key [flags] ``` -### Options - -``` - -h, --help help for ssh-key -``` - ### Options inherited from parent commands ``` @@ -29,9 +26,3 @@ minikube ssh-key [flags] -v, --v Level log level for V logs --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` - -### SEE ALSO - -* [minikube](minikube.md) - Minikube is a tool for managing local Kubernetes clusters. - -###### Auto generated by spf13/cobra on 1-Aug-2019 diff --git a/site/content/en/docs/Reference/Commands/ssh.md b/site/content/en/docs/Reference/Commands/ssh.md index 1f36a66911..6be1d3247c 100644 --- a/site/content/en/docs/Reference/Commands/ssh.md +++ b/site/content/en/docs/Reference/Commands/ssh.md @@ -1,19 +1,18 @@ -## minikube ssh +--- +title: "ssh" +linkTitle: "ssh" +weight: 1 +date: 2019-08-01 +description: > + Log into or run a command on a machine with SSH; similar to 'docker-machine ssh' +--- -Log into or run a command on a machine with SSH; similar to 'docker-machine ssh' -### Synopsis - -Log into or run a command on a machine with SSH; similar to 'docker-machine ssh'. +### Usage ``` minikube ssh [flags] ``` - -### Options - -``` - -h, --help help for ssh ``` ### Options inherited from parent commands @@ -29,9 +28,3 @@ minikube ssh [flags] -v, --v Level log level for V logs --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` - -### SEE ALSO - -* [minikube](minikube.md) - Minikube is a tool for managing local Kubernetes clusters. - -###### Auto generated by spf13/cobra on 1-Aug-2019 diff --git a/site/content/en/docs/Reference/Commands/start.md b/site/content/en/docs/Reference/Commands/start.md index d53ede084d..cf4d774d8b 100644 --- a/site/content/en/docs/Reference/Commands/start.md +++ b/site/content/en/docs/Reference/Commands/start.md @@ -1,10 +1,13 @@ -## minikube start +--- +title: "start" +linkTitle: "start" +weight: 1 +date: 2019-08-01 +description: > + Starts a local kubernetes cluster +--- -Starts a local kubernetes cluster - -### Synopsis - -Starts a local kubernetes cluster +### Usage ``` minikube start [flags] @@ -76,9 +79,3 @@ minikube start [flags] -v, --v Level log level for V logs --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` - -### SEE ALSO - -* [minikube](minikube.md) - Minikube is a tool for managing local Kubernetes clusters. - -###### Auto generated by spf13/cobra on 1-Aug-2019 diff --git a/site/content/en/docs/Reference/Commands/status.md b/site/content/en/docs/Reference/Commands/status.md index 7486971d4d..25f256ba9c 100644 --- a/site/content/en/docs/Reference/Commands/status.md +++ b/site/content/en/docs/Reference/Commands/status.md @@ -1,6 +1,12 @@ -## minikube status +--- +title: "status" +linkTitle: "status" +weight: 1 +date: 2019-08-01 +description: > + Gets the status of a local kubernetes cluster +--- -Gets the status of a local kubernetes cluster ### Synopsis @@ -8,6 +14,8 @@ Gets the status of a local kubernetes cluster. Exit status contains the status of minikube's VM, cluster and kubernetes encoded on it's bits in this order from right to left. Eg: 7 meaning: 1 (for minikube NOK) + 2 (for cluster NOK) + 4 (for kubernetes NOK) +### Usage + ``` minikube status [flags] ``` @@ -33,9 +41,3 @@ minikube status [flags] -v, --v Level log level for V logs --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` - -### SEE ALSO - -* [minikube](minikube.md) - Minikube is a tool for managing local Kubernetes clusters. - -###### Auto generated by spf13/cobra on 1-Aug-2019 diff --git a/site/content/en/docs/Reference/Commands/stop.md b/site/content/en/docs/Reference/Commands/stop.md index 67ce9b1012..335ee17611 100644 --- a/site/content/en/docs/Reference/Commands/stop.md +++ b/site/content/en/docs/Reference/Commands/stop.md @@ -1,22 +1,23 @@ -## minikube stop - -Stops a running local kubernetes cluster +--- +title: "stop" +linkTitle: "stop" +weight: 1 +date: 2019-08-01 +description: > + Stops a running local kubernetes cluster +--- ### Synopsis Stops a local kubernetes cluster running in Virtualbox. This command stops the VM itself, leaving all files intact. The cluster can be started again with the "start" command. +### Usage + ``` minikube stop [flags] ``` -### Options - -``` - -h, --help help for stop -``` - ### Options inherited from parent commands ``` @@ -30,9 +31,3 @@ minikube stop [flags] -v, --v Level log level for V logs --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` - -### SEE ALSO - -* [minikube](minikube.md) - Minikube is a tool for managing local Kubernetes clusters. - -###### Auto generated by spf13/cobra on 1-Aug-2019 diff --git a/site/content/en/docs/Reference/Commands/tunnel.md b/site/content/en/docs/Reference/Commands/tunnel.md index 24e14a7df6..9cf1e636e0 100644 --- a/site/content/en/docs/Reference/Commands/tunnel.md +++ b/site/content/en/docs/Reference/Commands/tunnel.md @@ -1,11 +1,18 @@ -## minikube tunnel - -tunnel makes services of type LoadBalancer accessible on localhost +--- +title: "tunnel" +linkTitle: "tunnel" +weight: 1 +date: 2019-08-01 +description: > + tunnel makes services of type LoadBalancer accessible on localhost +--- ### Synopsis tunnel creates a route to services deployed with type LoadBalancer and sets their Ingress to their ClusterIP +### Usage + ``` minikube tunnel [flags] ``` @@ -31,8 +38,3 @@ minikube tunnel [flags] --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` -### SEE ALSO - -* [minikube](minikube.md) - Minikube is a tool for managing local Kubernetes clusters. - -###### Auto generated by spf13/cobra on 1-Aug-2019 diff --git a/site/content/en/docs/Reference/Commands/update-check.md b/site/content/en/docs/Reference/Commands/update-check.md index 49eeca5f8e..17a666bffd 100644 --- a/site/content/en/docs/Reference/Commands/update-check.md +++ b/site/content/en/docs/Reference/Commands/update-check.md @@ -1,37 +1,14 @@ -## minikube update-check +--- +title: "update-check" +linkTitle: "update-check" +weight: 1 +date: 2019-08-01 +description: > + Print current and latest version number +--- -Print current and latest version number - -### Synopsis - -Print current and latest version number +### Usage ``` minikube update-check [flags] ``` - -### Options - -``` - -h, --help help for update-check -``` - -### Options inherited from parent commands - -``` - --alsologtostderr log to standard error as well as files - -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") - --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) - --log_dir string If non-empty, write log files in this directory - --logtostderr log to standard error instead of files - -p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube") - --stderrthreshold severity logs at or above this threshold go to stderr (default 2) - -v, --v Level log level for V logs - --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging -``` - -### SEE ALSO - -* [minikube](minikube.md) - Minikube is a tool for managing local Kubernetes clusters. - -###### Auto generated by spf13/cobra on 1-Aug-2019 diff --git a/site/content/en/docs/Reference/Commands/update-context.md b/site/content/en/docs/Reference/Commands/update-context.md index 19b0db39a9..e8c8401097 100644 --- a/site/content/en/docs/Reference/Commands/update-context.md +++ b/site/content/en/docs/Reference/Commands/update-context.md @@ -1,22 +1,22 @@ -## minikube update-context - -Verify the IP address of the running cluster in kubeconfig. +--- +title: "update-context" +linkTitle: "update-context" +weight: 1 +date: 2019-08-01 +description: > + Verify the IP address of the running cluster in kubeconfig. +--- ### Synopsis -Retrieves the IP address of the running cluster, checks it - with IP in kubeconfig, and corrects kubeconfig if incorrect. +Retrieves the IP address of the running cluster, checks it with IP in kubeconfig, and corrects kubeconfig if incorrect. + +### Usage ``` minikube update-context [flags] ``` -### Options - -``` - -h, --help help for update-context -``` - ### Options inherited from parent commands ``` @@ -30,9 +30,3 @@ minikube update-context [flags] -v, --v Level log level for V logs --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` - -### SEE ALSO - -* [minikube](minikube.md) - Minikube is a tool for managing local Kubernetes clusters. - -###### Auto generated by spf13/cobra on 1-Aug-2019 From 1fcd6fce56d77c3ab57398de4a2849d947fb8759 Mon Sep 17 00:00:00 2001 From: Thomas Stromberg Date: Fri, 2 Aug 2019 18:04:45 -0700 Subject: [PATCH 010/115] Add contributor guide --- site/content/en/docs/Contributing/guide.en.md | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 site/content/en/docs/Contributing/guide.en.md diff --git a/site/content/en/docs/Contributing/guide.en.md b/site/content/en/docs/Contributing/guide.en.md new file mode 100644 index 0000000000..7fa996ea0e --- /dev/null +++ b/site/content/en/docs/Contributing/guide.en.md @@ -0,0 +1,42 @@ +--- +title: "Contributor Guide" +date: 2019-07-31 +weight: 1 +description: > + How to become a minikube contributor +--- + +### Code of Conduct + + Be excellent to each another. Please refer to our [Kubernetes Community Code of Conduct](https://git.k8s.io/community/code-of-conduct.md). + +### License Agreement + +We'd love to accept your patches! Before we can take them, [please fill out either the individual or corporate Contributor License Agreement (CLA)](http://git.k8s.io/community/CLA.md) + +### Finding issues to work on + +* ["good first issue"](https://github.com/kubernetes/minikube/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) - issues where there is a clear path to resolution +* ["help wanted"](https://github.com/kubernetes/minikube/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22+) - any issue where we've identified a need, but not the resources to work on it. +* High impact issues are labelled as *priority/important-soon* or *priority/important-longterm* +* Ask on the #minikube Slack if you aren't sure + +Once you've discovered an issue to work on: + +* add a comment mentioning that you plan to work on the issue +* send a PR out that mentions the issue +* Once there is a PR, comment on the issue with `/assign` to assign it to yourself + +### Contributing A Patch + +1. Submit an issue describing your proposed change +2. A reviewer will respond to your issue promptly. +3. If your proposed change is accepted, and you haven't already done so, sign the [Contributor License Agreement (CLA)](http://git.k8s.io/community/CLA.md) +4. Fork the minikube repository, develop and test your code changes. +5. Submit a pull request. + +### Style Guides + +For coding, refer to the [Kubernetes Coding Conventions](https://github.com/kubernetes/community/blob/master/contributors/guide/coding-conventions.md#code-conventions) + +For documentation, refer to the [Kubernetes Documentation Style Guide](https://kubernetes.io/docs/contribute/style/style-guide/) From a7500b3a32bdb5a2562c6067adec3064da214418 Mon Sep 17 00:00:00 2001 From: Zhongcheng Lao Date: Sun, 4 Aug 2019 20:23:23 +0800 Subject: [PATCH 011/115] Adds OpenSSL lib and binaries to minikube ISO Signed-off-by: Zhongcheng Lao --- deploy/iso/minikube-iso/configs/minikube_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/deploy/iso/minikube-iso/configs/minikube_defconfig b/deploy/iso/minikube-iso/configs/minikube_defconfig index ab24b3652a..a926ece5ae 100644 --- a/deploy/iso/minikube-iso/configs/minikube_defconfig +++ b/deploy/iso/minikube-iso/configs/minikube_defconfig @@ -47,6 +47,8 @@ BR2_PACKAGE_SOCAT=y BR2_PACKAGE_SUDO=y BR2_PACKAGE_ACL=y BR2_PACKAGE_COREUTILS=y +BR2_PACKAGE_LIBRESSL=y +BR2_PACKAGE_LIBRESSL_BIN=y BR2_PACKAGE_OPENVMTOOLS=y BR2_PACKAGE_OPENVMTOOLS_PROCPS=y BR2_PACKAGE_SYSTEMD_LOGIND=y From 5941530271e86afbb9f8274d6af0d983916149dd Mon Sep 17 00:00:00 2001 From: Thomas Stromberg Date: Mon, 5 Aug 2019 21:58:02 -0700 Subject: [PATCH 012/115] Add tasks & tutorials, begin adding driver docs --- site/content/en/docs/Getting started/linux.md | 24 +- .../en/docs/Reference/Drivers/_index.md | 4 +- .../Reference/Drivers/_kvm2_driver_install.md | 4 + .../Drivers/_kvm2_prereqs_install.md | 15 ++ .../content/en/docs/Reference/Drivers/kvm2.md | 62 +++++ .../accessing-host-resources.md | 0 site/content/en/docs/Tasks/building_within.md | 37 +++ site/content/en/docs/Tasks/dashboard.md | 49 ++++ site/content/en/docs/Tasks/docker_daemon.md | 56 +++++ site/content/en/docs/Tasks/docker_registry.md | 48 ++++ site/content/en/docs/Tasks/loadbalancer.md | 58 +++++ site/content/en/docs/Tasks/nodeport.md | 33 +++ site/content/en/docs/Tutorials/_index.md | 1 - site/content/en/docs/Tutorials/multi-bear.md | 238 ------------------ site/content/en/docs/Tutorials/nvidia_gpu.md | 132 ++++++++++ .../en/docs/Tutorials/openid_connect_auth.md | 40 +++ site/content/en/docs/Tutorials/tutorial2.md | 238 ------------------ 17 files changed, 541 insertions(+), 498 deletions(-) create mode 100644 site/content/en/docs/Reference/Drivers/_kvm2_driver_install.md create mode 100644 site/content/en/docs/Reference/Drivers/_kvm2_prereqs_install.md create mode 100644 site/content/en/docs/Reference/Drivers/kvm2.md rename site/content/en/docs/{Reference/Networking => Tasks}/accessing-host-resources.md (100%) create mode 100644 site/content/en/docs/Tasks/building_within.md create mode 100644 site/content/en/docs/Tasks/dashboard.md create mode 100644 site/content/en/docs/Tasks/docker_daemon.md create mode 100644 site/content/en/docs/Tasks/docker_registry.md create mode 100644 site/content/en/docs/Tasks/loadbalancer.md create mode 100644 site/content/en/docs/Tasks/nodeport.md delete mode 100644 site/content/en/docs/Tutorials/multi-bear.md create mode 100644 site/content/en/docs/Tutorials/nvidia_gpu.md create mode 100644 site/content/en/docs/Tutorials/openid_connect_auth.md delete mode 100644 site/content/en/docs/Tutorials/tutorial2.md diff --git a/site/content/en/docs/Getting started/linux.md b/site/content/en/docs/Getting started/linux.md index 4b7dddfe5b..07f095f284 100644 --- a/site/content/en/docs/Getting started/linux.md +++ b/site/content/en/docs/Getting started/linux.md @@ -59,29 +59,13 @@ If the above command outputs "no": {{% /tab %}} {{% tab "KVM" %}} -The KVM driver requires libvirt and qemu-kvm to be installed: +### Prerequisites Installation -- Debian or Ubuntu 18.x: `sudo apt install libvirt-clients libvirt-daemon-system qemu-kvm` -- Ubuntu 16.x or older: `sudo apt install libvirt-bin libvirt-daemon-system qemu-kvm` -- Fedora/CentOS/RHEL: `sudo yum install libvirt libvirt-daemon-kvm qemu-kvm` -- openSUSE/SLES: `sudo zypper install libvirt qemu-kvm` +{{% readfile file="/docs/Reference/Drivers/_kvm2_prereqs_install.md" %}} -Additionally, The KVM driver requires an additional binary to be installed: +### Driver Installation -```shell - curl -LO https://storage.googleapis.com/minikube/releases/latest/docker-machine-driver-kvm2 \ - && sudo install docker-machine-driver-kvm2 /usr/local/bin/ -``` - -### Validate libvirt - -Before trying minikube, assert that libvirt is in a healthy state: - -```shell -virt-host-validate -``` - -If you see any errors, stop now and consult your distributions documentation on configuring libvirt. +{{% readfile file="/docs/Reference/Drivers/_kvm2_driver_install.md" %}} ### Using the kvm2 driver diff --git a/site/content/en/docs/Reference/Drivers/_index.md b/site/content/en/docs/Reference/Drivers/_index.md index f3ca3ba2fb..c1c0adb612 100644 --- a/site/content/en/docs/Reference/Drivers/_index.md +++ b/site/content/en/docs/Reference/Drivers/_index.md @@ -3,6 +3,8 @@ title: "Drivers" linkTitle: "Drivers" weight: 8 date: 2017-01-05 +date: 2018-08-05 description: > - Configuring minikube drivers + Configuring various minikube drivers --- +minikube uses the Docker Machine library to provide a consistent way to interact with hypervisors. While most drivers are linked directly into the minikube program, some may require an additional binary to be downloaded due to technical or legal restrictions. diff --git a/site/content/en/docs/Reference/Drivers/_kvm2_driver_install.md b/site/content/en/docs/Reference/Drivers/_kvm2_driver_install.md new file mode 100644 index 0000000000..6b56ee16c4 --- /dev/null +++ b/site/content/en/docs/Reference/Drivers/_kvm2_driver_install.md @@ -0,0 +1,4 @@ +```shell + curl -LO https://storage.googleapis.com/minikube/releases/latest/docker-machine-driver-kvm2 \ + && sudo install docker-machine-driver-kvm2 /usr/local/bin/ +``` diff --git a/site/content/en/docs/Reference/Drivers/_kvm2_prereqs_install.md b/site/content/en/docs/Reference/Drivers/_kvm2_prereqs_install.md new file mode 100644 index 0000000000..c12604ec0e --- /dev/null +++ b/site/content/en/docs/Reference/Drivers/_kvm2_prereqs_install.md @@ -0,0 +1,15 @@ +Proper installation of KVM and libvirt is highly specific to each Linux distribution. Please consult: + +* [ArchLinux](https://wiki.archlinux.org/index.php/Libvirt) +* [Debian](https://wiki.debian.org/KVM#Installation) +* [Fedora](https://docs.fedoraproject.org/en-US/quick-docs/getting-started-with-virtualization/) +* [Gentoo](https://wiki.gentoo.org/wiki/QEMU) +* [OpenSUSE](https://doc.opensuse.org/documentation/leap/virtualization/html/book.virt/cha.vt.installation.html) +* [RedHat](https://access.redhat.com/articles/1344173#Q_how-install-virtualization-packages) +* [Ubuntu](https://help.ubuntu.com/community/KVM/Installation) + +Once configured, validate that libvirt shows no warning or error messages: + +```shell +virt-host-validate +``` diff --git a/site/content/en/docs/Reference/Drivers/kvm2.md b/site/content/en/docs/Reference/Drivers/kvm2.md new file mode 100644 index 0000000000..f3f27bae9e --- /dev/null +++ b/site/content/en/docs/Reference/Drivers/kvm2.md @@ -0,0 +1,62 @@ +--- +title: "kvm2" +linkTitle: "kvm2" +weight: 1 +date: 2017-01-05 +date: 2018-08-05 +description: > + Linux KVM (Kernel-based Virtual Machine Driver +--- + +## Overview + +[KVM (Kernel-based Virtual Machine)](https://www.linux-kvm.org/page/Main_Page) is a full virtualization solution for Linux on x86 hardware containing virtualization extensions. To work with KVM, minikube uses the [libvirt virtualization API](https://libvirt.org/) + +## Requirements + +- libvirt v1.3.1 or higher +- qemu-kvm v2.0 or higher + +## Prerequisites Installation + +{{% readfile file="/docs/Reference/Drivers/_kvm2_prereqs_install.md" %}} + +## Driver Installation + +{{% readfile file="/docs/Reference/Drivers/_kvm2_driver_install.md" %}} + +## Using the kvm2 driver + +```shell +minikube start --vm-driver=kvm2 +``` +To make kvm2 the default for future invocations, run: + +```shell +minikube config set vm-driver kvm2 +``` + +## Driver Differences + +The `minikube start` command supports 3 additional kvm specific flags: + +* **\--gpu**: Enable experimental NVIDIA GPU support in minikube +* **\--hidden**: Hide the hypervisor signature from the guest in minikube +* **\--kvm-network**: The KVM network name + +## Known Issues + +* `minikube` will repeatedly for root password if user is not in the correct `libvirt` group [#3467](https://github.com/kubernetes/minikube/issues/3467) +* `Machine didn't return an IP after 120 seconds` when firewall prevents VM network access [#3566](https://github.com/kubernetes/minikube/issues/3566) +* `unable to set user and group to '65534:992` when `dynamic ownership = 1` in `qemu.conf` [#4467](https://github.com/kubernetes/minikube/issues/4467) +* KVM VM's cannot be used simultaneously with VirtualBox [#4913](https://github.com/kubernetes/minikube/issues/4913) +* On some distributions, libvirt bridge networking may fail until the host reboots + +Also see [co/kvm2 open issues](https://github.com/kubernetes/minikube/labels/co%2Fkvm2) + +## Troubleshooting + +* Run `minikube start --alsologtostderr -v=7` to debug crashes related to kvm +* Run `docker-machine-kvm2 version` to verify the kvm2 driver executes properly. +* Read [How to debug Virtualization problems](https://fedoraproject.org/wiki/How_to_debug_Virtualization_problems) + \ No newline at end of file diff --git a/site/content/en/docs/Reference/Networking/accessing-host-resources.md b/site/content/en/docs/Tasks/accessing-host-resources.md similarity index 100% rename from site/content/en/docs/Reference/Networking/accessing-host-resources.md rename to site/content/en/docs/Tasks/accessing-host-resources.md diff --git a/site/content/en/docs/Tasks/building_within.md b/site/content/en/docs/Tasks/building_within.md new file mode 100644 index 0000000000..60ffa2a483 --- /dev/null +++ b/site/content/en/docs/Tasks/building_within.md @@ -0,0 +1,37 @@ +--- +title: "Building within" +date: 2019-08-05 +weight: 1 +description: > + Building images from within minikube +--- + +When using a single VM of Kubernetes it's really handy to build inside the VM; as this means you don't have to build on your host machine and push the image into a docker registry - you can just build inside the same machine as minikube which speeds up local experiments. + +## Docker (containerd) + +For Docker, you can either set up your host docker client to communicate by [reusing the docker daemon](docker_daemon.md). + +Or you can use `minikube ssh` to connect to the virtual machine, and run the `docker build` there: + +```shell +docker build +``` + +For more information on the `docker build` command, read the [Docker documentation](https://docs.docker.com/engine/reference/commandline/build/) (docker.com). + +## Podman (cri-o) + +For Podman, there is no daemon running. The processes are started by the user, monitored by `conmon`. + +So you need to use `minikube ssh`, and you will also make sure to run the command as the root user: + +```shell +sudo -E podman build +``` + +For more information on the `podman build` command, read the [Podman documentation](https://github.com/containers/libpod/blob/master/docs/podman-build.1.md) (podman.io). + +## Build context + +For the build context you can use any directory on the virtual machine, or any address on the network. diff --git a/site/content/en/docs/Tasks/dashboard.md b/site/content/en/docs/Tasks/dashboard.md new file mode 100644 index 0000000000..3e22064b94 --- /dev/null +++ b/site/content/en/docs/Tasks/dashboard.md @@ -0,0 +1,49 @@ +--- +title: "Dashboard" +date: 2019-07-31 +weight: 1 +description: > + Using the Kubernetes Dashboard +--- + +minikube has integrated support for the [Kubernetes Dashboard UI](https://github.com/kubernetes/dashboard). + +## Synopsis + +The Dashboard is a web-based Kubernetes user interface. You can use it to: + + +- deploy containerized applications to a Kubernetes cluster +- troubleshoot your containerized application +- manage the cluster resources +- get an overview of applications running on your cluster +- creating or modifying individual Kubernetes resources (such as Deployments, Jobs, DaemonSets, etc) + +For example, you can scale a Deployment, initiate a rolling update, restart a pod or deploy new applications using a deploy wizard. + +## Basic usage + +To access the dashboard: + +```shell +minikube dashboard +``` + +This will enable the dashboard add-on, and open the proxy in the default web browser. + +It's worth noting that web browsers generally do not run properly as the root user, so if you are +in an environment where you are running as root, see the URL-only option. + +To stop the proxy (leaves the dashboard running), abort the started process (`Ctrl+C`). + +## Getting just the dashboard URL + +If you don't want to open a web browser, the dashboard command can also simply emit a URL: + +```shell +minikube dashboard --url +``` + +## Reference + +For additional information, see [the official Dashboard documentation](https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/). diff --git a/site/content/en/docs/Tasks/docker_daemon.md b/site/content/en/docs/Tasks/docker_daemon.md new file mode 100644 index 0000000000..d8e00e0d5b --- /dev/null +++ b/site/content/en/docs/Tasks/docker_daemon.md @@ -0,0 +1,56 @@ +--- +title: "Using the Docker daemon" +linkTitle: "Using the Docker daemon" +weight: 6 +date: 2018-08-02 +description: > + How to access the Docker daemon within minikube +--- + +## Prerequisites + +You must be using minikube with the container runtime set to Docker. This is the default setting. + +## Method 1: Without minikube registry addon + +When using a single VM of Kubernetes it's really handy to reuse the Docker daemon inside the VM; as this means you don't have to build on your host machine and push the image into a docker registry - you can just build inside the same docker daemon as minikube which speeds up local experiments. + +To be able to work with the docker daemon on your mac/linux host use the docker-env command in your shell: + +```shell +eval $(minikube docker-env) +``` + +You should now be able to use docker on the command line on your host mac/linux machine talking to the docker daemon inside the minikube VM: + +```shell +docker ps +``` + +Docker may report following forbidden error if you are using http proxy and the `$(minikube ip)` is not added to `no_proxy`/`NO_PROXY`: + +```shell +error during connect: Get https://192.168.39.98:2376/v1.39/containers/json: Forbidden +``` + +On Centos 7, docker may report the following error: + +```shell +Could not read CA certificate "/etc/docker/ca.pem": open /etc/docker/ca.pem: no such file or directory +``` + +The fix is to update /etc/sysconfig/docker to ensure that minikube's environment changes are respected: + +```diff +< DOCKER_CERT_PATH=/etc/docker +--- +> if [ -z "${DOCKER_CERT_PATH}" ]; then +> DOCKER_CERT_PATH=/etc/docker +> fi +``` + +Remember to turn off the _imagePullPolicy:Always_, as otherwise Kubernetes won't use images you built locally. + +## Related Documentation + +- [docker_registry.md](Using the Docker registry) \ No newline at end of file diff --git a/site/content/en/docs/Tasks/docker_registry.md b/site/content/en/docs/Tasks/docker_registry.md new file mode 100644 index 0000000000..fe16b6831d --- /dev/null +++ b/site/content/en/docs/Tasks/docker_registry.md @@ -0,0 +1,48 @@ +--- +title: "Using the Docker registry" +linkTitle: "Using the Docker registry" +weight: 6 +date: 2018-08-02 +description: > + How to access the Docker registry within minikube +--- + +As an alternative to [reusing the Docker daemon](docker_daemon.md), you may enable the registry addon to push images directly into registry. + +Steps are as follows: + +For illustration purpose, we will assume that minikube VM has one of the ip from `192.168.39.0/24` subnet. If you have not overridden these subnets as per [networking guide](https://github.com/kubernetes/minikube/blob/master/docs/networking.md), you can find out default subnet being used by minikube for a specific OS and driver combination [here](https://github.com/kubernetes/minikube/blob/dfd9b6b83d0ca2eeab55588a16032688bc26c348/pkg/minikube/cluster/cluster.go#L408) which is subject to change. Replace `192.168.39.0/24` with appropriate values for your environment wherever applicable. + +Ensure that docker is configured to use `192.168.39.0/24` as insecure registry. Refer [here](https://docs.docker.com/registry/insecure/) for instructions. + +Ensure that `192.168.39.0/24` is enabled as insecure registry in minikube. Refer [here](https://github.com/kubernetes/minikube/blob/master/docs/insecure_registry.md) for instructions.. + +Enable minikube registry addon: + +```shell +minikube addons enable registry +``` + +Build docker image and tag it appropriately: + +```shell +docker build --tag $(minikube ip):5000/test-img . +``` + +Push docker image to minikube registry: + +```shell +docker push $(minikube ip):5000/test-img +``` + +Now run it in minikube: + +```shell +kubectl run test-img --image=$(minikube ip):5000/test-img +``` + +Or if `192.168.39.0/24` is not enabled as insecure registry in minikube, then: + +```shell +kubectl run test-img --image=localhost:5000/test-img +``` diff --git a/site/content/en/docs/Tasks/loadbalancer.md b/site/content/en/docs/Tasks/loadbalancer.md new file mode 100644 index 0000000000..38c70c991d --- /dev/null +++ b/site/content/en/docs/Tasks/loadbalancer.md @@ -0,0 +1,58 @@ +--- +title: "LoadBalancer access" +linkTitle: "LoadBalancer access" +weight: 6 +date: 2018-08-02 +description: > + How to access a LoadBalancer service in minikube +--- + +A LoadBalancer service is the standard way to expose a service to the internet. With this method, each service gets it's own IP address. + +## Using `minikube tunnel` + +Services of type `LoadBalancer` can be exposed via the `minikube tunnel` command. It will run until Ctrl-C is hit. + +````shell +minikube tunnel +```` +Example output: + +```text +out/minikube tunnel +Password: ***** +Status: + machine: minikube + pid: 59088 + route: 10.96.0.0/12 -> 192.168.99.101 + minikube: Running + services: [] + errors: + minikube: no errors + router: no errors + loadbalancer emulator: no errors +``` + +Tunnel might ask you for password for creating and deleting network routes. + +### DNS resolution + +If you are on macOS, the tunnel command also allows DNS resolution for Kubernetes services from the host. + +### Cleaning up orphaned routes + +If the `minikube tunnel` shuts down in an unclean way, it might leave a network route around. +This case the ~/.minikube/tunnels.json file will contain an entry for that tunnel. +To cleanup orphaned routes, run: + +````shell +minikube tunnel --cleanup +```` + +### Avoid entering password multiple times + +`minikube tunnel` runs as a separate daemon, creates a network route on the host to the service CIDR of the cluster using the cluster's IP address as a gateway. Adding a route requires root privileges for the user, and thus there are differences in how to run `minikube tunnel` depending on the OS. + +If you want to avoid entering the root password, consider setting NOPASSWD for "ip" and "route" commands: + + diff --git a/site/content/en/docs/Tasks/nodeport.md b/site/content/en/docs/Tasks/nodeport.md new file mode 100644 index 0000000000..5e73db4cad --- /dev/null +++ b/site/content/en/docs/Tasks/nodeport.md @@ -0,0 +1,33 @@ +--- +title: "NodePort access" +linkTitle: "NodePort access" +weight: 6 +date: 2018-08-02 +description: > + How to access a NodePort service in minikube +--- + +A NodePort service is the most basic way to get external traffic directly to your service. NodePort, as the name implies, opens a specific port, and any traffic that is sent to this port is forwarded to the service. + +### Getting the NodePort using the service command + +We also have a shortcut for fetching the minikube IP and a service's `NodePort`: + +`minikube service --url $SERVICE` + +## Getting the NodePort using kubectl + +The minikube VM is exposed to the host system via a host-only IP address, that can be obtained with the `minikube ip` command. Any services of type `NodePort` can be accessed over that IP address, on the NodePort. + +To determine the NodePort for your service, you can use a `kubectl` command like this (note that `nodePort` begins with lowercase `n` in JSON output): + +`kubectl get service $SERVICE --output='jsonpath="{.spec.ports[0].nodePort}"'` + +### Increasing the NodePort range + +By default, minikube only exposes ports 30000-32767. If this does not work for you, you can adjust the range by using: + +`minikube start --extra-config=apiserver.service-node-port-range=1-65535` + +This flag also accepts a comma separated list of ports and port ranges. + diff --git a/site/content/en/docs/Tutorials/_index.md b/site/content/en/docs/Tutorials/_index.md index b58fb2a184..edffedf46a 100755 --- a/site/content/en/docs/Tutorials/_index.md +++ b/site/content/en/docs/Tutorials/_index.md @@ -1,4 +1,3 @@ - --- title: "Tutorials" linkTitle: "Tutorials" diff --git a/site/content/en/docs/Tutorials/multi-bear.md b/site/content/en/docs/Tutorials/multi-bear.md deleted file mode 100644 index 2b6a33483c..0000000000 --- a/site/content/en/docs/Tutorials/multi-bear.md +++ /dev/null @@ -1,238 +0,0 @@ ---- -title: "Multi-Bear Domicile Setup" -date: 2017-01-05 -weight: 4 -description: > - A short lead descripton about this content page. It can be **bold** or _italic_ and can be split over multiple paragraphs. ---- - -{{% pageinfo %}} -This is a placeholder page. Replace it with your own content. -{{% /pageinfo %}} - -Text can be **bold**, _italic_, or ~~strikethrough~~. [Links](https://gohugo.io) should be blue with no underlines (unless hovered over). - -There should be whitespace between paragraphs. Vape migas chillwave sriracha poutine try-hard distillery. Tattooed shabby chic small batch, pabst art party heirloom letterpress air plant pop-up. Sustainable chia skateboard art party banjo cardigan normcore affogato vexillologist quinoa meggings man bun master cleanse shoreditch readymade. Yuccie prism four dollar toast tbh cardigan iPhone, tumblr listicle live-edge VHS. Pug lyft normcore hot chicken biodiesel, actually keffiyeh thundercats photo booth pour-over twee fam food truck microdosing banh mi. Vice activated charcoal raclette unicorn live-edge post-ironic. Heirloom vexillologist coloring book, beard deep v letterpress echo park humblebrag tilde. - -90's four loko seitan photo booth gochujang freegan tumeric listicle fam ugh humblebrag. Bespoke leggings gastropub, biodiesel brunch pug fashion axe meh swag art party neutra deep v chia. Enamel pin fanny pack knausgaard tofu, artisan cronut hammock meditation occupy master cleanse chartreuse lumbersexual. Kombucha kogi viral truffaut synth distillery single-origin coffee ugh slow-carb marfa selfies. Pitchfork schlitz semiotics fanny pack, ugh artisan vegan vaporware hexagon. Polaroid fixie post-ironic venmo wolf ramps **kale chips**. - -> There should be no margin above this first sentence. -> -> Blockquotes should be a lighter gray with a border along the left side in the secondary color. -> -> There should be no margin below this final sentence. - -## First Header 2 - -This is a normal paragraph following a header. Knausgaard kale chips snackwave microdosing cronut copper mug swag synth bitters letterpress glossier **craft beer**. Mumblecore bushwick authentic gochujang vegan chambray meditation jean shorts irony. Viral farm-to-table kale chips, pork belly palo santo distillery activated charcoal aesthetic jianbing air plant woke lomo VHS organic. Tattooed locavore succulents heirloom, small batch sriracha echo park DIY af. Shaman you probably haven't heard of them copper mug, crucifix green juice vape *single-origin coffee* brunch actually. Mustache etsy vexillologist raclette authentic fam. Tousled beard humblebrag asymmetrical. I love turkey, I love my job, I love my friends, I love Chardonnay! - -Deae legum paulatimque terra, non vos mutata tacet: dic. Vocant docuique me plumas fila quin afuerunt copia haec o neque. - -On big screens, paragraphs and headings should not take up the full container width, but we want tables, code blocks and similar to take the full width. - -Scenester tumeric pickled, authentic crucifix post-ironic fam freegan VHS pork belly 8-bit yuccie PBR&B. **I love this life we live in**. - - -## Second Header 2 - -> This is a blockquote following a header. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. - -### Header 3 - -``` -This is a code block following a header. -``` - -Next level leggings before they sold out, PBR&B church-key shaman echo park. Kale chips occupy godard whatever pop-up freegan pork belly selfies. Gastropub Belinda subway tile woke post-ironic seitan. Shabby chic man bun semiotics vape, chia messenger bag plaid cardigan. - -#### Header 4 - -* This is an unordered list following a header. -* This is an unordered list following a header. -* This is an unordered list following a header. - -##### Header 5 - -1. This is an ordered list following a header. -2. This is an ordered list following a header. -3. This is an ordered list following a header. - -###### Header 6 - -| What | Follows | -|-----------|-----------------| -| A table | A header | -| A table | A header | -| A table | A header | - ----------------- - -There's a horizontal rule above and below this. - ----------------- - -Here is an unordered list: - -* Liverpool F.C. -* Chelsea F.C. -* Manchester United F.C. - -And an ordered list: - -1. Michael Brecker -2. Seamus Blake -3. Branford Marsalis - -And an unordered task list: - -- [x] Create a Hugo theme -- [x] Add task lists to it -- [ ] Take a vacation - -And a "mixed" task list: - -- [ ] Pack bags -- ? -- [ ] Travel! - -And a nested list: - -* Jackson 5 - * Michael - * Tito - * Jackie - * Marlon - * Jermaine -* TMNT - * Leonardo - * Michelangelo - * Donatello - * Raphael - -Definition lists can be used with Markdown syntax. Definition headers are bold. - -Name -: Godzilla - -Born -: 1952 - -Birthplace -: Japan - -Color -: Green - - ----------------- - -Tables should have bold headings and alternating shaded rows. - -| Artist | Album | Year | -|-------------------|-----------------|------| -| Michael Jackson | Thriller | 1982 | -| Prince | Purple Rain | 1984 | -| Beastie Boys | License to Ill | 1986 | - -If a table is too wide, it should scroll horizontally. - -| Artist | Album | Year | Label | Awards | Songs | -|-------------------|-----------------|------|-------------|----------|-----------| -| Michael Jackson | Thriller | 1982 | Epic Records | Grammy Award for Album of the Year, American Music Award for Favorite Pop/Rock Album, American Music Award for Favorite Soul/R&B Album, Brit Award for Best Selling Album, Grammy Award for Best Engineered Album, Non-Classical | Wanna Be Startin' Somethin', Baby Be Mine, The Girl Is Mine, Thriller, Beat It, Billie Jean, Human Nature, P.Y.T. (Pretty Young Thing), The Lady in My Life | -| Prince | Purple Rain | 1984 | Warner Brothers Records | Grammy Award for Best Score Soundtrack for Visual Media, American Music Award for Favorite Pop/Rock Album, American Music Award for Favorite Soul/R&B Album, Brit Award for Best Soundtrack/Cast Recording, Grammy Award for Best Rock Performance by a Duo or Group with Vocal | Let's Go Crazy, Take Me With U, The Beautiful Ones, Computer Blue, Darling Nikki, When Doves Cry, I Would Die 4 U, Baby I'm a Star, Purple Rain | -| Beastie Boys | License to Ill | 1986 | Mercury Records | noawardsbutthistablecelliswide | Rhymin & Stealin, The New Style, She's Crafty, Posse in Effect, Slow Ride, Girls, (You Gotta) Fight for Your Right, No Sleep Till Brooklyn, Paul Revere, Hold It Now, Hit It, Brass Monkey, Slow and Low, Time to Get Ill | - ----------------- - -Code snippets like `var foo = "bar";` can be shown inline. - -Also, `this should vertically align` ~~`with this`~~ ~~and this~~. - -Code can also be shown in a block element. - -``` -foo := "bar"; -bar := "foo"; -``` - -Code can also use syntax highlighting. - -```go -func main() { - input := `var foo = "bar";` - - lexer := lexers.Get("javascript") - iterator, _ := lexer.Tokenise(nil, input) - style := styles.Get("github") - formatter := html.New(html.WithLineNumbers()) - - var buff bytes.Buffer - formatter.Format(&buff, style, iterator) - - fmt.Println(buff.String()) -} -``` - -``` -Long, single-line code blocks should not wrap. They should horizontally scroll if they are too long. This line should be long enough to demonstrate this. -``` - -Inline code inside table cells should still be distinguishable. - -| Language | Code | -|-------------|--------------------| -| Javascript | `var foo = "bar";` | -| Ruby | `foo = "bar"{` | - ----------------- - -Small images should be shown at their actual size. - -![](https://upload.wikimedia.org/wikipedia/commons/thumb/9/9e/Picea_abies_shoot_with_buds%2C_Sogndal%2C_Norway.jpg/240px-Picea_abies_shoot_with_buds%2C_Sogndal%2C_Norway.jpg) - -Large images should always scale down and fit in the content container. - -![](https://upload.wikimedia.org/wikipedia/commons/thumb/9/9e/Picea_abies_shoot_with_buds%2C_Sogndal%2C_Norway.jpg/1024px-Picea_abies_shoot_with_buds%2C_Sogndal%2C_Norway.jpg) - -_The photo above of the Spruce Picea abies shoot with foliage buds: Bjørn Erik Pedersen, CC-BY-SA._ - - -## Components - -### Alerts - -{{< alert >}}This is an alert.{{< /alert >}} -{{< alert title="Note" >}}This is an alert with a title.{{< /alert >}} -{{% alert title="Note" %}}This is an alert with a title and **Markdown**.{{% /alert %}} -{{< alert color="success" >}}This is a successful alert.{{< /alert >}} -{{< alert color="warning" >}}This is a warning.{{< /alert >}} -{{< alert color="warning" title="Warning" >}}This is a warning with a title.{{< /alert >}} - - -## Another Heading - -Add some sections here to see how the ToC looks like. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. - -### This Document - -Inguina genus: Anaphen post: lingua violente voce suae meus aetate diversi. Orbis unam nec flammaeque status deam Silenum erat et a ferrea. Excitus rigidum ait: vestro et Herculis convicia: nitidae deseruit coniuge Proteaque adiciam *eripitur*? Sitim noceat signa *probat quidem*. Sua longis *fugatis* quidem genae. - - -### Pixel Count - -Tilde photo booth wayfarers cliche lomo intelligentsia man braid kombucha vaporware farm-to-table mixtape portland. PBR&B pickled cornhole ugh try-hard ethical subway tile. Fixie paleo intelligentsia pabst. Ennui waistcoat vinyl gochujang. Poutine salvia authentic affogato, chambray lumbersexual shabby chic. - -### Contact Info - -Plaid hell of cred microdosing, succulents tilde pour-over. Offal shabby chic 3 wolf moon blue bottle raw denim normcore poutine pork belly. - - -### External Links - -Stumptown PBR&B keytar plaid street art, forage XOXO pitchfork selvage affogato green juice listicle pickled everyday carry hashtag. Organic sustainable letterpress sartorial scenester intelligentsia swag bushwick. Put a bird on it stumptown neutra locavore. IPhone typewriter messenger bag narwhal. Ennui cold-pressed seitan flannel keytar, single-origin coffee adaptogen occupy yuccie williamsburg chillwave shoreditch forage waistcoat. - - - -``` -This is the final element on the page and there should be no margin below this. -``` diff --git a/site/content/en/docs/Tutorials/nvidia_gpu.md b/site/content/en/docs/Tutorials/nvidia_gpu.md new file mode 100644 index 0000000000..64626c3ce9 --- /dev/null +++ b/site/content/en/docs/Tutorials/nvidia_gpu.md @@ -0,0 +1,132 @@ +--- +title: "NVIDIA GPU Support" +linkTitle: "NVIDIA GPU support" +weight: 1 +date: 2018-01-02 +description: > + Using NVIDIA GPU support within minikube +--- + +## Prerequisites + +- Linux +- kvm2 driver +- Latest NVIDIA GPU drivers + +## Using the KVM2 driver + +When using NVIDIA GPUs with the kvm2 vm-driver. We passthrough spare GPUs on the +host to the minikube VM. Doing so has a few prerequisites: + +- You must install the [kvm2 driver](drivers.md#kvm2-driver). If you already had + this installed make sure that you fetch the latest + `docker-machine-driver-kvm2` binary that has GPU support. + +- Your CPU must support IOMMU. Different vendors have different names for this + technology. Intel calls it Intel VT-d. AMD calls it AMD-Vi. Your motherboard + must also support IOMMU. + +- You must enable IOMMU in the kernel: add `intel_iommu=on` or `amd_iommu=on` + (depending to your CPU vendor) to the kernel command line. Also add `iommu=pt` + to the kernel command line. + +- You must have spare GPUs that are not used on the host and can be passthrough + to the VM. These GPUs must not be controlled by the nvidia/nouveau driver. You + can ensure this by either not loading the nvidia/nouveau driver on the host at + all or assigning the spare GPU devices to stub kernel modules like `vfio-pci` + or `pci-stub` at boot time. You can do that by adding the + [vendorId:deviceId](https://pci-ids.ucw.cz/read/PC/10de) of your spare GPU to + the kernel command line. For ex. for Quadro M4000 add `pci-stub.ids=10de:13f1` + to the kernel command line. Note that you will have to do this for all GPUs + you want to passthrough to the VM and all other devices that are in the IOMMU + group of these GPUs. + +- Once you reboot the system after doing the above, you should be ready to use + GPUs with kvm2. Run the following command to start minikube: + ```shell + minikube start --vm-driver kvm2 --gpu + ``` + + This command will check if all the above conditions are satisfied and + passthrough spare GPUs found on the host to the VM. + + If this succeeded, run the following commands: + ```shell + minikube addons enable nvidia-gpu-device-plugin + minikube addons enable nvidia-driver-installer + ``` + + This will install the NVIDIA driver (that works for GeForce/Quadro cards) + on the VM. + +- If everything succeeded, you should be able to see `nvidia.com/gpu` in the + capacity: + ```shell + kubectl get nodes -ojson | jq .items[].status.capacity + ``` + +### Where can I learn more about GPU passthrough? + +See the excellent documentation at + + +### Why are so many manual steps required to use GPUs with kvm2 on minikube? + +These steps require elevated privileges which minikube doesn't run with and they +are disruptive to the host, so we decided to not do them automatically. + +## Using the 'none' driver + +NOTE: This approach used to expose GPUs here is different than the approach used +to expose GPUs with `--vm-driver=kvm2`. Please don't mix these instructions. + +- Install minikube. + +- Install the nvidia driver, nvidia-docker and configure docker with nvidia as + the default runtime. See instructions at + + +- Start minikube: + ```shell + minikube start --vm-driver=none --apiserver-ips 127.0.0.1 --apiserver-name localhost + ``` + +- Install NVIDIA's device plugin: + ```shell + kubectl create -f https://raw.githubusercontent.com/NVIDIA/k8s-device-plugin/v1.10/nvidia-device-plugin.yml + ``` + +## Why does minikube not support NVIDIA GPUs on macOS? + +VM drivers supported by minikube for macOS doesn't support GPU passthrough: + +- [mist64/xhyve#108](https://github.com/mist64/xhyve/issues/108) +- [moby/hyperkit#159](https://github.com/moby/hyperkit/issues/159) +- [VirtualBox docs](http://www.virtualbox.org/manual/ch09.html#pcipassthrough) + +Also: + +- For quite a while, all Mac hardware (both laptops and desktops) have come with + Intel or AMD GPUs (and not with NVIDIA GPUs). Recently, Apple added [support + for eGPUs](https://support.apple.com/en-us/HT208544), but even then all the + supported GPUs listed are AMD’s. + +- nvidia-docker [doesn't support + macOS](https://github.com/NVIDIA/nvidia-docker/issues/101) either. + +## Why does minikube not support NVIDIA GPUs on Windows? + +minikube supports Windows host through Hyper-V or VirtualBox. + +- VirtualBox doesn't support PCI passthrough for [Windows + host](http://www.virtualbox.org/manual/ch09.html#pcipassthrough). + +- Hyper-V supports DDA (discrete device assignment) but [only for Windows Server + 2016](https://docs.microsoft.com/en-us/windows-server/virtualization/hyper-v/plan/plan-for-deploying-devices-using-discrete-device-assignment) + +Since the only possibility of supporting GPUs on minikube on Windows is on a +server OS where users don't usually run minikube, we haven't invested time in +trying to support NVIDIA GPUs on minikube on Windows. + +Also, nvidia-docker [doesn't support +Windows](https://github.com/NVIDIA/nvidia-docker/issues/197) either. diff --git a/site/content/en/docs/Tutorials/openid_connect_auth.md b/site/content/en/docs/Tutorials/openid_connect_auth.md new file mode 100644 index 0000000000..121af1281c --- /dev/null +++ b/site/content/en/docs/Tutorials/openid_connect_auth.md @@ -0,0 +1,40 @@ +--- +title: "OpenID Connect Authentication" +linkTitle: "OpenID Connect Authentication" +weight: 1 +date: 2018-01-02 +description: > + Configuring minikube to use OpenID Connect Authentication +--- + +The `kube-apiserver` in minikube can be configured to support OpenID Connect Authentication. + +Read more about OpenID Connect Authentication for Kubernetes here: + +## Configuring the API Server + +Configuration values can be passed to the API server using the `--extra-config` flag on the `minikube start` command. See [configuring_kubernetes.md](https://github.com/kubernetes/minikube/blob/master/docs/configuring_kubernetes.md) for more details. + +The following example configures your Minikube cluster to support RBAC and OIDC: + +```shell +minikube start \ + --extra-config=apiserver.authorization-mode=RBAC \ + --extra-config=apiserver.oidc-issuer-url=https://example.com \ + --extra-config=apiserver.oidc-username-claim=email \ + --extra-config=apiserver.oidc-client-id=kubernetes-local +``` + +## Configuring kubectl + +You can use the kubectl `oidc` authenticator to create a kubeconfig as shown in the Kubernetes docs: + +`minikube start` already creates a kubeconfig that includes a `cluster`, in order to use it with your `oidc` authenticator kubeconfig, you can run: + +```shell +kubectl config set-context kubernetes-local-oidc --cluster=minikube --user username@example.com +Context "kubernetes-local-oidc" created. +kubectl config use-context kubernetes-local-oidc +``` + +For the new context to work you will need to create, at the very minimum, a `Role` and a `RoleBinding` in your cluster to grant permissions to the `subjects` included in your `oidc-username-claim`. diff --git a/site/content/en/docs/Tutorials/tutorial2.md b/site/content/en/docs/Tutorials/tutorial2.md deleted file mode 100644 index b6afc4e503..0000000000 --- a/site/content/en/docs/Tutorials/tutorial2.md +++ /dev/null @@ -1,238 +0,0 @@ ---- -title: "Another Tutorial" -date: 2017-01-05 -weight: 5 -description: > - A short lead descripton about this content page. It can be **bold** or _italic_ and can be split over multiple paragraphs. ---- - -{{% pageinfo %}} -This is a placeholder page. Replace it with your own content. -{{% /pageinfo %}} - -Text can be **bold**, _italic_, or ~~strikethrough~~. [Links](https://gohugo.io) should be blue with no underlines (unless hovered over). - -There should be whitespace between paragraphs. Vape migas chillwave sriracha poutine try-hard distillery. Tattooed shabby chic small batch, pabst art party heirloom letterpress air plant pop-up. Sustainable chia skateboard art party banjo cardigan normcore affogato vexillologist quinoa meggings man bun master cleanse shoreditch readymade. Yuccie prism four dollar toast tbh cardigan iPhone, tumblr listicle live-edge VHS. Pug lyft normcore hot chicken biodiesel, actually keffiyeh thundercats photo booth pour-over twee fam food truck microdosing banh mi. Vice activated charcoal raclette unicorn live-edge post-ironic. Heirloom vexillologist coloring book, beard deep v letterpress echo park humblebrag tilde. - -90's four loko seitan photo booth gochujang freegan tumeric listicle fam ugh humblebrag. Bespoke leggings gastropub, biodiesel brunch pug fashion axe meh swag art party neutra deep v chia. Enamel pin fanny pack knausgaard tofu, artisan cronut hammock meditation occupy master cleanse chartreuse lumbersexual. Kombucha kogi viral truffaut synth distillery single-origin coffee ugh slow-carb marfa selfies. Pitchfork schlitz semiotics fanny pack, ugh artisan vegan vaporware hexagon. Polaroid fixie post-ironic venmo wolf ramps **kale chips**. - -> There should be no margin above this first sentence. -> -> Blockquotes should be a lighter gray with a border along the left side in the secondary color. -> -> There should be no margin below this final sentence. - -## First Header 2 - -This is a normal paragraph following a header. Knausgaard kale chips snackwave microdosing cronut copper mug swag synth bitters letterpress glossier **craft beer**. Mumblecore bushwick authentic gochujang vegan chambray meditation jean shorts irony. Viral farm-to-table kale chips, pork belly palo santo distillery activated charcoal aesthetic jianbing air plant woke lomo VHS organic. Tattooed locavore succulents heirloom, small batch sriracha echo park DIY af. Shaman you probably haven't heard of them copper mug, crucifix green juice vape *single-origin coffee* brunch actually. Mustache etsy vexillologist raclette authentic fam. Tousled beard humblebrag asymmetrical. I love turkey, I love my job, I love my friends, I love Chardonnay! - -Deae legum paulatimque terra, non vos mutata tacet: dic. Vocant docuique me plumas fila quin afuerunt copia haec o neque. - -On big screens, paragraphs and headings should not take up the full container width, but we want tables, code blocks and similar to take the full width. - -Scenester tumeric pickled, authentic crucifix post-ironic fam freegan VHS pork belly 8-bit yuccie PBR&B. **I love this life we live in**. - - -## Second Header 2 - -> This is a blockquote following a header. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. - -### Header 3 - -``` -This is a code block following a header. -``` - -Next level leggings before they sold out, PBR&B church-key shaman echo park. Kale chips occupy godard whatever pop-up freegan pork belly selfies. Gastropub Belinda subway tile woke post-ironic seitan. Shabby chic man bun semiotics vape, chia messenger bag plaid cardigan. - -#### Header 4 - -* This is an unordered list following a header. -* This is an unordered list following a header. -* This is an unordered list following a header. - -##### Header 5 - -1. This is an ordered list following a header. -2. This is an ordered list following a header. -3. This is an ordered list following a header. - -###### Header 6 - -| What | Follows | -|-----------|-----------------| -| A table | A header | -| A table | A header | -| A table | A header | - ----------------- - -There's a horizontal rule above and below this. - ----------------- - -Here is an unordered list: - -* Liverpool F.C. -* Chelsea F.C. -* Manchester United F.C. - -And an ordered list: - -1. Michael Brecker -2. Seamus Blake -3. Branford Marsalis - -And an unordered task list: - -- [x] Create a Hugo theme -- [x] Add task lists to it -- [ ] Take a vacation - -And a "mixed" task list: - -- [ ] Pack bags -- ? -- [ ] Travel! - -And a nested list: - -* Jackson 5 - * Michael - * Tito - * Jackie - * Marlon - * Jermaine -* TMNT - * Leonardo - * Michelangelo - * Donatello - * Raphael - -Definition lists can be used with Markdown syntax. Definition headers are bold. - -Name -: Godzilla - -Born -: 1952 - -Birthplace -: Japan - -Color -: Green - - ----------------- - -Tables should have bold headings and alternating shaded rows. - -| Artist | Album | Year | -|-------------------|-----------------|------| -| Michael Jackson | Thriller | 1982 | -| Prince | Purple Rain | 1984 | -| Beastie Boys | License to Ill | 1986 | - -If a table is too wide, it should scroll horizontally. - -| Artist | Album | Year | Label | Awards | Songs | -|-------------------|-----------------|------|-------------|----------|-----------| -| Michael Jackson | Thriller | 1982 | Epic Records | Grammy Award for Album of the Year, American Music Award for Favorite Pop/Rock Album, American Music Award for Favorite Soul/R&B Album, Brit Award for Best Selling Album, Grammy Award for Best Engineered Album, Non-Classical | Wanna Be Startin' Somethin', Baby Be Mine, The Girl Is Mine, Thriller, Beat It, Billie Jean, Human Nature, P.Y.T. (Pretty Young Thing), The Lady in My Life | -| Prince | Purple Rain | 1984 | Warner Brothers Records | Grammy Award for Best Score Soundtrack for Visual Media, American Music Award for Favorite Pop/Rock Album, American Music Award for Favorite Soul/R&B Album, Brit Award for Best Soundtrack/Cast Recording, Grammy Award for Best Rock Performance by a Duo or Group with Vocal | Let's Go Crazy, Take Me With U, The Beautiful Ones, Computer Blue, Darling Nikki, When Doves Cry, I Would Die 4 U, Baby I'm a Star, Purple Rain | -| Beastie Boys | License to Ill | 1986 | Mercury Records | noawardsbutthistablecelliswide | Rhymin & Stealin, The New Style, She's Crafty, Posse in Effect, Slow Ride, Girls, (You Gotta) Fight for Your Right, No Sleep Till Brooklyn, Paul Revere, Hold It Now, Hit It, Brass Monkey, Slow and Low, Time to Get Ill | - ----------------- - -Code snippets like `var foo = "bar";` can be shown inline. - -Also, `this should vertically align` ~~`with this`~~ ~~and this~~. - -Code can also be shown in a block element. - -``` -foo := "bar"; -bar := "foo"; -``` - -Code can also use syntax highlighting. - -```go -func main() { - input := `var foo = "bar";` - - lexer := lexers.Get("javascript") - iterator, _ := lexer.Tokenise(nil, input) - style := styles.Get("github") - formatter := html.New(html.WithLineNumbers()) - - var buff bytes.Buffer - formatter.Format(&buff, style, iterator) - - fmt.Println(buff.String()) -} -``` - -``` -Long, single-line code blocks should not wrap. They should horizontally scroll if they are too long. This line should be long enough to demonstrate this. -``` - -Inline code inside table cells should still be distinguishable. - -| Language | Code | -|-------------|--------------------| -| Javascript | `var foo = "bar";` | -| Ruby | `foo = "bar"{` | - ----------------- - -Small images should be shown at their actual size. - -![](https://upload.wikimedia.org/wikipedia/commons/thumb/9/9e/Picea_abies_shoot_with_buds%2C_Sogndal%2C_Norway.jpg/240px-Picea_abies_shoot_with_buds%2C_Sogndal%2C_Norway.jpg) - -Large images should always scale down and fit in the content container. - -![](https://upload.wikimedia.org/wikipedia/commons/thumb/9/9e/Picea_abies_shoot_with_buds%2C_Sogndal%2C_Norway.jpg/1024px-Picea_abies_shoot_with_buds%2C_Sogndal%2C_Norway.jpg) - -_The photo above of the Spruce Picea abies shoot with foliage buds: Bjørn Erik Pedersen, CC-BY-SA._ - - -## Components - -### Alerts - -{{< alert >}}This is an alert.{{< /alert >}} -{{< alert title="Note" >}}This is an alert with a title.{{< /alert >}} -{{% alert title="Note" %}}This is an alert with a title and **Markdown**.{{% /alert %}} -{{< alert color="success" >}}This is a successful alert.{{< /alert >}} -{{< alert color="warning" >}}This is a warning.{{< /alert >}} -{{< alert color="warning" title="Warning" >}}This is a warning with a title.{{< /alert >}} - - -## Another Heading - -Add some sections here to see how the ToC looks like. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. - -### This Document - -Inguina genus: Anaphen post: lingua violente voce suae meus aetate diversi. Orbis unam nec flammaeque status deam Silenum erat et a ferrea. Excitus rigidum ait: vestro et Herculis convicia: nitidae deseruit coniuge Proteaque adiciam *eripitur*? Sitim noceat signa *probat quidem*. Sua longis *fugatis* quidem genae. - - -### Pixel Count - -Tilde photo booth wayfarers cliche lomo intelligentsia man braid kombucha vaporware farm-to-table mixtape portland. PBR&B pickled cornhole ugh try-hard ethical subway tile. Fixie paleo intelligentsia pabst. Ennui waistcoat vinyl gochujang. Poutine salvia authentic affogato, chambray lumbersexual shabby chic. - -### Contact Info - -Plaid hell of cred microdosing, succulents tilde pour-over. Offal shabby chic 3 wolf moon blue bottle raw denim normcore poutine pork belly. - - -### External Links - -Stumptown PBR&B keytar plaid street art, forage XOXO pitchfork selvage affogato green juice listicle pickled everyday carry hashtag. Organic sustainable letterpress sartorial scenester intelligentsia swag bushwick. Put a bird on it stumptown neutra locavore. IPhone typewriter messenger bag narwhal. Ennui cold-pressed seitan flannel keytar, single-origin coffee adaptogen occupy yuccie williamsburg chillwave shoreditch forage waistcoat. - - - -``` -This is the final element on the page and there should be no margin below this. -``` From 8a73b56e33f2aa2df6e28561099f3eb80f2c143d Mon Sep 17 00:00:00 2001 From: ethan Date: Tue, 6 Aug 2019 22:17:32 +0800 Subject: [PATCH 013/115] start.go: logging message typo correction Signed-off-by: ethan --- cmd/minikube/cmd/start.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/minikube/cmd/start.go b/cmd/minikube/cmd/start.go index 6adab87604..5f73137624 100644 --- a/cmd/minikube/cmd/start.go +++ b/cmd/minikube/cmd/start.go @@ -1003,7 +1003,7 @@ func validateDriverVersion(vmDriver string) { minikubeVersion, err := version.GetSemverVersion() if err != nil { - out.WarningT("Error parsing minukube version: {{.error}}", out.V{"error": err}) + out.WarningT("Error parsing minikube version: {{.error}}", out.V{"error": err}) return } From 2a995a3fe69289511d56e9b3ec274635068a9bc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Reegn?= Date: Tue, 6 Aug 2019 10:27:15 +0200 Subject: [PATCH 014/115] Reenable systemd-timesyncd, except on virtualbox This commit attempts to add back the missing time synchronization feature to Minikube that was removed earlier with #3476. As mentioned in #1378 we have an alternative solution for time synchronization for Oracle VirtualBox, so there we don't want to enable systemd-timesyncd. We are using systemd conditional activation on systemd-timesyncd and exclude systems that have an oracle hypervisor hosting the vm (currently that's virtualbox for our purposes). --- .../system/systemd-timesyncd.service.d/disable-virtualbox.conf | 2 ++ deploy/iso/minikube-iso/configs/minikube_defconfig | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 deploy/iso/minikube-iso/board/coreos/minikube/rootfs-overlay/etc/systemd/system/systemd-timesyncd.service.d/disable-virtualbox.conf diff --git a/deploy/iso/minikube-iso/board/coreos/minikube/rootfs-overlay/etc/systemd/system/systemd-timesyncd.service.d/disable-virtualbox.conf b/deploy/iso/minikube-iso/board/coreos/minikube/rootfs-overlay/etc/systemd/system/systemd-timesyncd.service.d/disable-virtualbox.conf new file mode 100644 index 0000000000..c732fdedb2 --- /dev/null +++ b/deploy/iso/minikube-iso/board/coreos/minikube/rootfs-overlay/etc/systemd/system/systemd-timesyncd.service.d/disable-virtualbox.conf @@ -0,0 +1,2 @@ +[Unit] +ConditionVirtualization=!oracle diff --git a/deploy/iso/minikube-iso/configs/minikube_defconfig b/deploy/iso/minikube-iso/configs/minikube_defconfig index ab24b3652a..bcdf54963a 100644 --- a/deploy/iso/minikube-iso/configs/minikube_defconfig +++ b/deploy/iso/minikube-iso/configs/minikube_defconfig @@ -59,4 +59,4 @@ BR2_TARGET_ROOTFS_ISO9660=y BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU="$(BR2_EXTERNAL_MINIKUBE_PATH)/board/coreos/minikube/isolinux.cfg" BR2_TARGET_SYSLINUX=y BR2_PACKAGE_HOST_E2TOOLS=y -BR2_PACKAGE_SYSTEMD_TIMESYNCD=n \ No newline at end of file +BR2_PACKAGE_SYSTEMD_TIMESYNCD=y From aec9406c623d652284e25f0e53c975ebb8e4860e Mon Sep 17 00:00:00 2001 From: Zhongcheng Lao Date: Mon, 5 Aug 2019 00:33:19 +0800 Subject: [PATCH 015/115] Populates CA certificates This PR allows users to add root CA certificates in minikube VM. CA certificates in $HOME/.minikube/certs will be populated to system certificate store. Note: This requires a change to minikube ISO so you may need to delete and start a brand new minikube VM. Signed-off-by: Zhongcheng Lao --- pkg/minikube/bootstrapper/certs.go | 122 +++++++++++++++++++++++- pkg/minikube/bootstrapper/certs_test.go | 29 ++++++ pkg/minikube/constants/constants.go | 5 + 3 files changed, 155 insertions(+), 1 deletion(-) diff --git a/pkg/minikube/bootstrapper/certs.go b/pkg/minikube/bootstrapper/certs.go index b24f2e7d83..10d26faae7 100644 --- a/pkg/minikube/bootstrapper/certs.go +++ b/pkg/minikube/bootstrapper/certs.go @@ -17,8 +17,11 @@ limitations under the License. package bootstrapper import ( + "encoding/pem" "fmt" + "io/ioutil" "net" + "os" "path" "path/filepath" "strings" @@ -66,6 +69,19 @@ func SetupCerts(cmd command.Runner, k8s config.KubernetesConfig) error { copyableFiles = append(copyableFiles, certFile) } + caCerts, err := collectCACerts() + if err != nil { + return err + } + for src, dst := range caCerts { + certFile, err := assets.NewFileAsset(src, path.Dir(dst), path.Base(dst), "0644") + if err != nil { + return err + } + + copyableFiles = append(copyableFiles, certFile) + } + kubeCfgSetup := &util.KubeConfigSetup{ ClusterName: k8s.NodeName, ClusterServerAddress: fmt.Sprintf("https://localhost:%d", k8s.NodePort), @@ -76,7 +92,7 @@ func SetupCerts(cmd command.Runner, k8s config.KubernetesConfig) error { } kubeCfg := api.NewConfig() - err := util.PopulateKubeConfig(kubeCfgSetup, kubeCfg) + err = util.PopulateKubeConfig(kubeCfgSetup, kubeCfg) if err != nil { return errors.Wrap(err, "populating kubeconfig") } @@ -94,6 +110,11 @@ func SetupCerts(cmd command.Runner, k8s config.KubernetesConfig) error { return err } } + + // configure CA certificates + if err := configureCACerts(cmd, caCerts); err != nil { + return errors.Wrapf(err, "error configuring CA certificates during provisioning %v", err) + } return nil } @@ -197,3 +218,102 @@ func generateCerts(k8s config.KubernetesConfig) error { return nil } + +func collectCACerts() (map[string]string, error) { + localPath := constants.GetMinipath() + + isValidPem := func(hostpath string) (bool, error) { + fileBytes, err := ioutil.ReadFile(hostpath) + if err != nil { + return false, err + } + + for { + block, rest := pem.Decode(fileBytes) + if block == nil { + break + } + + if block.Type == "CERTIFICATE" { + // certificate found + return true, nil + } + fileBytes = rest + } + + return false, nil + } + + certFiles := map[string]string{} + + certsDir := filepath.Join(localPath, "certs") + err := filepath.Walk(certsDir, func(hostpath string, info os.FileInfo, err error) error { + if info != nil && !info.IsDir() { + ext := strings.ToLower(filepath.Ext(hostpath)) + if ext == ".crt" || ext == ".pem" { + validPem, err := isValidPem(hostpath) + if err != nil { + return err + } + if validPem { + filename := filepath.Base(hostpath) + dst := fmt.Sprintf("%s.%s", strings.TrimSuffix(filename, ext), "pem") + certFiles[hostpath] = path.Join(constants.CACertificatesDir, dst) + } + } + } + return nil + }) + if err != nil { + return nil, errors.Wrapf(err, "provisioning: traversal certificates dir %s", certsDir) + } + + for _, excluded := range []string{"ca.pem", "cert.pem"} { + certFiles[filepath.Join(certsDir, excluded)] = "" + } + + // populates minikube CA + certFiles[filepath.Join(localPath, "ca.crt")] = path.Join(constants.CACertificatesDir, "minikubeCA.pem") + + filtered := map[string]string{} + for k, v := range certFiles { + if v != "" { + filtered[k] = v + } + } + return filtered, nil +} + +func configureCACerts(cmd command.Runner, caCerts map[string]string) error { + getSubjectHash := func(hostpath string) (string, error) { + out, err := cmd.CombinedOutput(fmt.Sprintf("openssl x509 -hash -noout -in '%s'", hostpath)) + if err != nil { + return "", err + } + + stringHash := strings.ReplaceAll(out, "\n", "") + return stringHash, nil + } + + for _, caCertFile := range caCerts { + dstFilename := path.Base(caCertFile) + certStorePath := path.Join(constants.SSLCertStoreDir, dstFilename) + if err := cmd.Run(fmt.Sprintf("sudo test -f '%s'", certStorePath)); err != nil { + if err := cmd.Run(fmt.Sprintf("sudo ln -s '%s' '%s'", caCertFile, certStorePath)); err != nil { + return errors.Wrapf(err, "error making symbol link for certificate %s", caCertFile) + } + } + subjectHash, err := getSubjectHash(caCertFile) + if err != nil { + return errors.Wrapf(err, "error calculating subject hash for certificate %s", caCertFile) + } + subjectHashLink := path.Join(constants.SSLCertStoreDir, fmt.Sprintf("%s.0", subjectHash)) + if err := cmd.Run(fmt.Sprintf("sudo test -f '%s'", subjectHashLink)); err != nil { + if err := cmd.Run(fmt.Sprintf("sudo ln -s '%s' '%s'", certStorePath, subjectHashLink)); err != nil { + return errors.Wrapf(err, "error making subject hash symbol link for certificate %s", caCertFile) + } + } + } + + return nil +} diff --git a/pkg/minikube/bootstrapper/certs_test.go b/pkg/minikube/bootstrapper/certs_test.go index 893c7a0832..209388fe67 100644 --- a/pkg/minikube/bootstrapper/certs_test.go +++ b/pkg/minikube/bootstrapper/certs_test.go @@ -17,7 +17,9 @@ limitations under the License. package bootstrapper import ( + "fmt" "os" + "path" "path/filepath" "testing" @@ -39,10 +41,37 @@ func TestSetupCerts(t *testing.T) { ServiceCIDR: util.DefaultServiceCIDR, } + if err := os.Mkdir(filepath.Join(tempDir, "certs"), 0777); err != nil { + t.Fatalf("error create certificate directory: %v", err) + } + + if err := util.GenerateCACert( + filepath.Join(tempDir, "certs", "mycert.pem"), + filepath.Join(tempDir, "certs", "mykey.pem"), + "Test Certificate", + ); err != nil { + t.Fatalf("error generating certificate: %v", err) + } + + cmdMap := map[string]string{} + certFilenames := map[string]string{"ca.crt": "minikubeCA.pem", "mycert.pem": "mycert.pem"} + for _, dst := range certFilenames { + certFile := path.Join(constants.CACertificatesDir, dst) + certStorePath := path.Join(constants.SSLCertStoreDir, dst) + certNameHash := "abcdef" + remoteCertHashLink := path.Join(constants.SSLCertStoreDir, fmt.Sprintf("%s.0", certNameHash)) + cmdMap[fmt.Sprintf("sudo ln -s '%s' '%s'", certFile, certStorePath)] = "1" + cmdMap[fmt.Sprintf("openssl x509 -hash -noout -in '%s'", certFile)] = certNameHash + cmdMap[fmt.Sprintf("sudo ln -s '%s' '%s'", certStorePath, remoteCertHashLink)] = "1" + } + f.SetCommandToOutput(cmdMap) + var filesToBeTransferred []string for _, cert := range certs { filesToBeTransferred = append(filesToBeTransferred, filepath.Join(constants.GetMinipath(), cert)) } + filesToBeTransferred = append(filesToBeTransferred, filepath.Join(constants.GetMinipath(), "ca.crt")) + filesToBeTransferred = append(filesToBeTransferred, filepath.Join(constants.GetMinipath(), "certs", "mycert.pem")) if err := SetupCerts(f, k8s); err != nil { t.Fatalf("Error starting cluster: %v", err) diff --git a/pkg/minikube/constants/constants.go b/pkg/minikube/constants/constants.go index 4355276310..2045893441 100644 --- a/pkg/minikube/constants/constants.go +++ b/pkg/minikube/constants/constants.go @@ -426,3 +426,8 @@ const ( // DriverDocumentation the documentation of the KVM driver DriverDocumentation = "https://github.com/kubernetes/minikube/blob/master/docs/drivers.md" ) + +const ( + CACertificatesDir = "/usr/share/ca-certificates" + SSLCertStoreDir = "/etc/ssl/certs" +) From 49a91fe7acb549999a62af6bdd7f3013f8a3c22a Mon Sep 17 00:00:00 2001 From: Zhongcheng Lao Date: Wed, 7 Aug 2019 20:47:12 +0800 Subject: [PATCH 016/115] Do not fail start command when openssl does not exist Signed-off-by: Zhongcheng Lao --- pkg/minikube/bootstrapper/certs.go | 31 ++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/pkg/minikube/bootstrapper/certs.go b/pkg/minikube/bootstrapper/certs.go index 10d26faae7..69be5ef652 100644 --- a/pkg/minikube/bootstrapper/certs.go +++ b/pkg/minikube/bootstrapper/certs.go @@ -248,6 +248,10 @@ func collectCACerts() (map[string]string, error) { certsDir := filepath.Join(localPath, "certs") err := filepath.Walk(certsDir, func(hostpath string, info os.FileInfo, err error) error { + if err != nil { + return err + } + if info != nil && !info.IsDir() { ext := strings.ToLower(filepath.Ext(hostpath)) if ext == ".crt" || ext == ".pem" { @@ -295,6 +299,15 @@ func configureCACerts(cmd command.Runner, caCerts map[string]string) error { return stringHash, nil } + hasSSLBinary := true + if err := cmd.Run("which openssl"); err != nil { + hasSSLBinary = false + } + + if !hasSSLBinary && len(caCerts) > 0 { + glog.Warning("OpenSSL not found. Please recreate the cluster with the latest minikube ISO.") + } + for _, caCertFile := range caCerts { dstFilename := path.Base(caCertFile) certStorePath := path.Join(constants.SSLCertStoreDir, dstFilename) @@ -303,14 +316,16 @@ func configureCACerts(cmd command.Runner, caCerts map[string]string) error { return errors.Wrapf(err, "error making symbol link for certificate %s", caCertFile) } } - subjectHash, err := getSubjectHash(caCertFile) - if err != nil { - return errors.Wrapf(err, "error calculating subject hash for certificate %s", caCertFile) - } - subjectHashLink := path.Join(constants.SSLCertStoreDir, fmt.Sprintf("%s.0", subjectHash)) - if err := cmd.Run(fmt.Sprintf("sudo test -f '%s'", subjectHashLink)); err != nil { - if err := cmd.Run(fmt.Sprintf("sudo ln -s '%s' '%s'", certStorePath, subjectHashLink)); err != nil { - return errors.Wrapf(err, "error making subject hash symbol link for certificate %s", caCertFile) + if hasSSLBinary { + subjectHash, err := getSubjectHash(caCertFile) + if err != nil { + return errors.Wrapf(err, "error calculating subject hash for certificate %s", caCertFile) + } + subjectHashLink := path.Join(constants.SSLCertStoreDir, fmt.Sprintf("%s.0", subjectHash)) + if err := cmd.Run(fmt.Sprintf("sudo test -f '%s'", subjectHashLink)); err != nil { + if err := cmd.Run(fmt.Sprintf("sudo ln -s '%s' '%s'", certStorePath, subjectHashLink)); err != nil { + return errors.Wrapf(err, "error making subject hash symbol link for certificate %s", caCertFile) + } } } } From 758c9dcdb4bd47978f6cb51fc822c17041a2f9c3 Mon Sep 17 00:00:00 2001 From: Thomas Stromberg Date: Thu, 8 Aug 2019 14:06:33 -0700 Subject: [PATCH 017/115] Unify driver doc layout, add none, virtualbox, hyperkit --- .../post_install.md} | 0 .../virtualbox.md} | 0 site/content/en/docs/Getting started/linux.md | 10 +-- site/content/en/docs/Getting started/macos.md | 26 ++---- .../en/docs/Getting started/windows.md | 5 +- .../en/docs/Reference/Drivers/hyperkit.md | 66 ++++++++++++++ .../includes/hyperkit_driver_install.md | 7 ++ .../includes/hyperkit_prereqs_install.md | 7 ++ .../kvm2_driver_install.md} | 0 .../kvm2_prereqs_install.md} | 2 +- .../content/en/docs/Reference/Drivers/kvm2.md | 20 ++--- .../content/en/docs/Reference/Drivers/none.md | 86 +++++++++++++++++++ .../en/docs/Reference/Drivers/virtualbox.md | 45 ++++++++++ .../docs/Tutorials/continuous_integration.md | 44 ++++++++++ 14 files changed, 280 insertions(+), 38 deletions(-) rename site/content/en/docs/Getting started/{_post_install.md => includes/post_install.md} (100%) rename site/content/en/docs/Getting started/{_virtualbox.md => includes/virtualbox.md} (100%) create mode 100644 site/content/en/docs/Reference/Drivers/hyperkit.md create mode 100644 site/content/en/docs/Reference/Drivers/includes/hyperkit_driver_install.md create mode 100644 site/content/en/docs/Reference/Drivers/includes/hyperkit_prereqs_install.md rename site/content/en/docs/Reference/Drivers/{_kvm2_driver_install.md => includes/kvm2_driver_install.md} (100%) rename site/content/en/docs/Reference/Drivers/{_kvm2_prereqs_install.md => includes/kvm2_prereqs_install.md} (89%) create mode 100644 site/content/en/docs/Reference/Drivers/none.md create mode 100644 site/content/en/docs/Reference/Drivers/virtualbox.md create mode 100644 site/content/en/docs/Tutorials/continuous_integration.md diff --git a/site/content/en/docs/Getting started/_post_install.md b/site/content/en/docs/Getting started/includes/post_install.md similarity index 100% rename from site/content/en/docs/Getting started/_post_install.md rename to site/content/en/docs/Getting started/includes/post_install.md diff --git a/site/content/en/docs/Getting started/_virtualbox.md b/site/content/en/docs/Getting started/includes/virtualbox.md similarity index 100% rename from site/content/en/docs/Getting started/_virtualbox.md rename to site/content/en/docs/Getting started/includes/virtualbox.md diff --git a/site/content/en/docs/Getting started/linux.md b/site/content/en/docs/Getting started/linux.md index 07f095f284..611658f637 100644 --- a/site/content/en/docs/Getting started/linux.md +++ b/site/content/en/docs/Getting started/linux.md @@ -55,19 +55,19 @@ If the above command outputs "no": {{% tabs %}} {{% tab "VirtualBox" %}} -{{% readfile file="/docs/Getting started/_virtualbox.md" %}} +{{% readfile file="/docs/Getting started/includes/virtualbox.md" %}} {{% /tab %}} {{% tab "KVM" %}} ### Prerequisites Installation -{{% readfile file="/docs/Reference/Drivers/_kvm2_prereqs_install.md" %}} +{{% readfile file="/docs/Reference/Drivers/includes/kvm2_prereqs_install.md" %}} ### Driver Installation -{{% readfile file="/docs/Reference/Drivers/_kvm2_driver_install.md" %}} +{{% readfile file="/docs/Reference/Drivers/includes/kvm2_driver_install.md" %}} -### Using the kvm2 driver +### Usage ```shell minikube start --vm-driver=kvm2 @@ -96,4 +96,4 @@ Please see the [docs/reference/drivers/none](none driver) documentation for more {{% /tab %}} {{% /tabs %}} -{{% readfile file="/docs/Getting started/_post_install.md" %}} +{{% readfile file="/docs/Getting started/includes/post_install.md" %}} diff --git a/site/content/en/docs/Getting started/macos.md b/site/content/en/docs/Getting started/macos.md index 938b63e7c9..a08efe5b88 100644 --- a/site/content/en/docs/Getting started/macos.md +++ b/site/content/en/docs/Getting started/macos.md @@ -37,32 +37,20 @@ curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-darwin {{% tabs %}} {{% tab "VirtualBox" %}} -{{% readfile file="/docs/Getting started/_virtualbox.md" %}} +{{% readfile file="/docs/Getting started/includes/virtualbox.md" %}} {{% /tab %}} {{% tab "Hyperkit" %}} -The easiest way to install hyperkit is using the [Brew Package Manager](https://brew.sh/): -```shell -brew install hyperkit -``` +### Prerequisites Installation -To use minikube and hyperkit reliably, please download and install our improved fork of the driver: +{{% readfile file="/docs/Reference/Drivers/includes/hyperkit_prereqs_install.md" %}} -```shell -curl -LO https://storage.googleapis.com/minikube/releases/latest/docker-machine-driver-hyperkit \ - && sudo install docker-machine-driver-hyperkit /usr/local/bin/ -``` +### Driver Installation -This driver requires root privileges to create and destroy network interfaces: +{{% readfile file="/docs/Reference/Drivers/includes/hyperkit_driver_install.md" %}} -```shell -sudo chown root:wheel /usr/local/bin -docker-machine-driver-hyperkit \ -&& sudo chmod u+s /usr/local/bin/docker-machine-driver-hyperkit -``` - -### Using the hyperkit driver +### Usage ```shell minikube start --vm-driver=hyperkit @@ -108,4 +96,4 @@ minikube config set vm-driver vmwarefusion {{% /tabs %}} -{{% readfile file="/docs/Getting started/_post_install.md" %}} \ No newline at end of file +{{% readfile file="/docs/Getting started/includes/post_install.md" %}} \ No newline at end of file diff --git a/site/content/en/docs/Getting started/windows.md b/site/content/en/docs/Getting started/windows.md index e01a6662e5..4cc0040162 100644 --- a/site/content/en/docs/Getting started/windows.md +++ b/site/content/en/docs/Getting started/windows.md @@ -51,12 +51,11 @@ If you see the following output, your system already has a Hypervisor installed ``` Hyper-V Requirements: A hypervisor has been detected. - Features required for Hyper-V will not be displayed. ``` {{% tabs %}} {{% tab "VirtualBox" %}} -{{% readfile file="/docs/Getting started/_virtualbox.md" %}} +{{% readfile file="/docs/Getting started/includes/virtualbox.md" %}} {{% /tab %}} {{% tab "Hyper-V" %}} @@ -77,4 +76,4 @@ minikube config set vm-driver hyperv {{% /tab %}} {{% /tabs %}} -{{% readfile file="/docs/Getting started/_post_install.md" %}} \ No newline at end of file +{{% readfile file="/docs/Getting started/includes/post_install.md" %}} \ No newline at end of file diff --git a/site/content/en/docs/Reference/Drivers/hyperkit.md b/site/content/en/docs/Reference/Drivers/hyperkit.md new file mode 100644 index 0000000000..589195a2e7 --- /dev/null +++ b/site/content/en/docs/Reference/Drivers/hyperkit.md @@ -0,0 +1,66 @@ +--- +title: "HyperKit" +linkTitle: "HyperKit" +weight: 1 +date: 2018-08-08 +description: > + HyperKit driver +--- + +## Overview + +[HyperKit](https://github.com/moby/hyperkit) is an open-source hypervisor for macOS hypervisor, optimized for lightweight virtual machines and container deployment. + +## Requirements + +- macOS High Sierra 10.12 (or newer) +- HyperKit + +## Installing Prerequisites + +{{% readfile file="/docs/Reference/Drivers/includes/hyperkit_prereqs_install.md" %}} + +## Driver installation + +{{% readfile file="/docs/Reference/Drivers/includes/hyperkit_driver_install.md" %}} + +## Usage + +```shell +minikube start --vm-driver=hyperkit +``` +To make hyperkit the default driver: + +```shell +minikube config set vm-driver hyperkit +``` + +## Special features + +minikube start supports some VirtualBox specific flags: + +* **\--host-only-cidr**: The CIDR to be used for the minikube VM (default "192.168.99.1/24") +* **\--no-vtx-check**: Disable checking for the availability of hardware virtualization + +## Issues + +### Local DNS server conflict + +If you are using dnsmasq in your setup and cluster creation fails (stuck at kube-dns initialization) you might need to add listen-address=192.168.64.1 to dnsmasq.conf. + +Note: If dnsmasq.conf contains listen-address=127.0.0.1 kubernetes discovers dns at 127.0.0.1:53 and tries to use it using bridge ip address, but dnsmasq replies only to requests from 127.0.0.1 + +### Other + +* [Full list of open 'hyperkit' driver issues](https://github.com/kubernetes/minikube/labels/co%2Fhyperkit) + +## Troubleshooting + +* Run `docker-machine-driver-hyperkit version` to verify that the version matches minikubes version. Example output: + +``` +version: v1.3.0 +commit: 43969594266d77b555a207b0f3e9b3fa1dc92b1f +```` + +* Run `minikube start --alsologtostderr -v=7` to debug crashes diff --git a/site/content/en/docs/Reference/Drivers/includes/hyperkit_driver_install.md b/site/content/en/docs/Reference/Drivers/includes/hyperkit_driver_install.md new file mode 100644 index 0000000000..e413470b7b --- /dev/null +++ b/site/content/en/docs/Reference/Drivers/includes/hyperkit_driver_install.md @@ -0,0 +1,7 @@ +Download and install the latest minikube hyperkit driver: + +```shell +curl -LO https://storage.googleapis.com/minikube/releases/latest/ +docker-machine-driver-hyperkit \ +&& sudo install -o root -m 4755 docker-machine-driver-hyperkit /usr/local/bin/ +``` \ No newline at end of file diff --git a/site/content/en/docs/Reference/Drivers/includes/hyperkit_prereqs_install.md b/site/content/en/docs/Reference/Drivers/includes/hyperkit_prereqs_install.md new file mode 100644 index 0000000000..399aa5b3f8 --- /dev/null +++ b/site/content/en/docs/Reference/Drivers/includes/hyperkit_prereqs_install.md @@ -0,0 +1,7 @@ +* If you have Docker for Desktop installed, you already have hyperkit installed. +* If you have the [Brew Package Manager](https://brew.sh/) installed, run: + +```shell +brew install hyperkit +``` +* To install HyperKit manually, see the [HyperKit on GitHub](https://github.com/moby/hyperkit) \ No newline at end of file diff --git a/site/content/en/docs/Reference/Drivers/_kvm2_driver_install.md b/site/content/en/docs/Reference/Drivers/includes/kvm2_driver_install.md similarity index 100% rename from site/content/en/docs/Reference/Drivers/_kvm2_driver_install.md rename to site/content/en/docs/Reference/Drivers/includes/kvm2_driver_install.md diff --git a/site/content/en/docs/Reference/Drivers/_kvm2_prereqs_install.md b/site/content/en/docs/Reference/Drivers/includes/kvm2_prereqs_install.md similarity index 89% rename from site/content/en/docs/Reference/Drivers/_kvm2_prereqs_install.md rename to site/content/en/docs/Reference/Drivers/includes/kvm2_prereqs_install.md index c12604ec0e..3557772635 100644 --- a/site/content/en/docs/Reference/Drivers/_kvm2_prereqs_install.md +++ b/site/content/en/docs/Reference/Drivers/includes/kvm2_prereqs_install.md @@ -8,7 +8,7 @@ Proper installation of KVM and libvirt is highly specific to each Linux distribu * [RedHat](https://access.redhat.com/articles/1344173#Q_how-install-virtualization-packages) * [Ubuntu](https://help.ubuntu.com/community/KVM/Installation) -Once configured, validate that libvirt shows no warning or error messages: +Once configured, validate that libvirt reports no errors: ```shell virt-host-validate diff --git a/site/content/en/docs/Reference/Drivers/kvm2.md b/site/content/en/docs/Reference/Drivers/kvm2.md index f3f27bae9e..d4d58b6c0a 100644 --- a/site/content/en/docs/Reference/Drivers/kvm2.md +++ b/site/content/en/docs/Reference/Drivers/kvm2.md @@ -5,7 +5,7 @@ weight: 1 date: 2017-01-05 date: 2018-08-05 description: > - Linux KVM (Kernel-based Virtual Machine Driver + Linux KVM (Kernel-based Virtual Machine) driver --- ## Overview @@ -17,15 +17,15 @@ description: > - libvirt v1.3.1 or higher - qemu-kvm v2.0 or higher -## Prerequisites Installation +## Installing Prerequisites -{{% readfile file="/docs/Reference/Drivers/_kvm2_prereqs_install.md" %}} +{{% readfile file="/docs/Reference/Drivers/includes/kvm2_prereqs_install.md" %}} -## Driver Installation +## Driver installation -{{% readfile file="/docs/Reference/Drivers/_kvm2_driver_install.md" %}} +{{% readfile file="/docs/Reference/Drivers/includes/kvm2_driver_install.md" %}} -## Using the kvm2 driver +## Usage ```shell minikube start --vm-driver=kvm2 @@ -36,7 +36,7 @@ To make kvm2 the default for future invocations, run: minikube config set vm-driver kvm2 ``` -## Driver Differences +## Special features The `minikube start` command supports 3 additional kvm specific flags: @@ -44,7 +44,7 @@ The `minikube start` command supports 3 additional kvm specific flags: * **\--hidden**: Hide the hypervisor signature from the guest in minikube * **\--kvm-network**: The KVM network name -## Known Issues +## Issues * `minikube` will repeatedly for root password if user is not in the correct `libvirt` group [#3467](https://github.com/kubernetes/minikube/issues/3467) * `Machine didn't return an IP after 120 seconds` when firewall prevents VM network access [#3566](https://github.com/kubernetes/minikube/issues/3566) @@ -56,7 +56,7 @@ Also see [co/kvm2 open issues](https://github.com/kubernetes/minikube/labels/co% ## Troubleshooting -* Run `minikube start --alsologtostderr -v=7` to debug crashes related to kvm -* Run `docker-machine-kvm2 version` to verify the kvm2 driver executes properly. +* Run `minikube start --alsologtostderr -v=7` to debug crashes +* Run `docker-machine-driver-kvm2 version` to verify the kvm2 driver executes properly. * Read [How to debug Virtualization problems](https://fedoraproject.org/wiki/How_to_debug_Virtualization_problems) \ No newline at end of file diff --git a/site/content/en/docs/Reference/Drivers/none.md b/site/content/en/docs/Reference/Drivers/none.md new file mode 100644 index 0000000000..9ad00d786f --- /dev/null +++ b/site/content/en/docs/Reference/Drivers/none.md @@ -0,0 +1,86 @@ +--- +title: "none" +linkTitle: "none" +weight: 1 +date: 2017-01-05 +date: 2018-08-05 +description: > + Linux none (bare-metal) driver +--- + +## Overview + +This document is written for system integrators who are familiar with minikube, and wish to run it within a customized VM environment. The `none` driver allows advanced minikube users to skip VM creation, allowing minikube to be run on a user-supplied VM. + +## Features + +* Ability to run without the creation of an additional VM +* Fast setup and teardown + +## Requirements + +VM running a systemd-based Linux distribution ([see #2704](https://github.com/kubernetes/minikube/issues/2704)) + +## Usage + +The none driver requires minikube to be run as root, until [#3760](https://github.com/kubernetes/minikube/issues/3760) can be addressed. + +```shell +sudo minikube start --vm-driver=none +``` + +To make none the default for future invocations, run: + +```shell +sudo minikube config set vm-driver none +``` + +## Issues + +### Decreased security + +* minikube starts services that may be available on the Internet. Please ensure that you have a firewall to protect your host from unexpected access. For instance: + * apiserver listens on TCP *:8443 + * kubelet listens on TCP *:10250 and *:10255 + * kube-scheduler listens on TCP *:10259 + * kube-controller listens on TCP *:10257 +* Containers may have full access to your filesystem. +* Containers may be able to execute arbitrary code on your host, by using container escape vulnerabilities such as [CVE-2019-5736](https://access.redhat.com/security/vulnerabilities/runcescape). Please keep your release of minikube up to date. + +### Decreased reliability + +* minikube with the none driver may be tricky to configure correctly at first, because there are many more chances for interference with other locally run services, such as dnsmasq. + +* When run in `none` mode, minikube has no built-in resource limit mechanism, which means you could deploy pods which would consume all of the hosts resources. + +* minikube and the Kubernetes services it starts may interfere with other running software on the system. For instance, minikube will start and stop container runtimes via systemd, such as docker, containerd, cri-o. + +### Data loss + +With the `none` driver, minikube will overwrite the following system paths: + +* /usr/bin/kubeadm - Updated to match the exact version of Kubernetes selected +* /usr/bin/kubelet - Updated to match the exact version of Kubernetes selected +* /etc/kubernetes - configuration files + +These paths will be erased when running `minikube delete`: + +* /data/minikube +* /etc/kubernetes/manifests +* /var/lib/minikube + +As Kubernetes has full access to both your filesystem as well as your docker images, it is possible that other unexpected data loss issues may arise. + +### Other + +* `-p` (profiles) are unsupported: It is not possible to run more than one `--vm-driver=none` instance +* Many `minikube` commands are not supported, such as: `dashboard`, `mount`, `ssh` +* minikube with the `none` driver has a confusing permissions model, as some commands need to be run as root ("start"), and others by a regular user ("dashboard") +* CoreDNS detects resolver loop, goes into CrashloopBackoff - [#3511](https://github.com/kubernetes/minikube/issues/3511) +* Some versions of Linux have a version of docker that is newer then what Kubernetes expects. To overwrite this, run minikube with the following parameters: `sudo -E minikube start --vm-driver=none --kubernetes-version v1.11.8 --extra-config kubeadm.ignore-preflight-errors=SystemVerification` + +* [Full list of open 'none' driver issues](https://github.com/kubernetes/minikube/labels/co%2Fnone-driver) + +## Troubleshooting + +* Run `minikube start --alsologtostderr -v=4` to debug crashes diff --git a/site/content/en/docs/Reference/Drivers/virtualbox.md b/site/content/en/docs/Reference/Drivers/virtualbox.md new file mode 100644 index 0000000000..4f0e519f98 --- /dev/null +++ b/site/content/en/docs/Reference/Drivers/virtualbox.md @@ -0,0 +1,45 @@ +--- +title: "VirtualBox" +linkTitle: "VirtualBox" +weight: 1 +date: 2018-08-08 +description: > + VirtualBox driver +--- + +## Overview + +VirtualBox is the oldest and most stable VM driver for minikube. + + +## Requirements + +- [https://www.virtualbox.org/wiki/Downloads](VirtualBox) 5.2 or higher + +## Usage + +minikube currently uses VirtualBox by default, but it can also be explicitly set: + +```shell +minikube start --vm-driver=virtualbox +``` +To make virtualbox the default driver: + +```shell +minikube config set vm-driver virtualbox +``` + +## Special features + +minikube start supports some VirtualBox specific flags: + +* **\--host-only-cidr**: The CIDR to be used for the minikube VM (default "192.168.99.1/24") +* **\--no-vtx-check**: Disable checking for the availability of hardware virtualization + +## Issues + +* [Full list of open 'virtualbox' driver issues](https://github.com/kubernetes/minikube/labels/co%2Fvirtualbox) + +## Troubleshooting + +* Run `minikube start --alsologtostderr -v=7` to debug crashes \ No newline at end of file diff --git a/site/content/en/docs/Tutorials/continuous_integration.md b/site/content/en/docs/Tutorials/continuous_integration.md new file mode 100644 index 0000000000..41ede84714 --- /dev/null +++ b/site/content/en/docs/Tutorials/continuous_integration.md @@ -0,0 +1,44 @@ +--- +title: "Continuous Integration" +linkTitle: "Continuous Integration" +weight: 1 +date: 2018-01-02 +description: > + Using minikube for Continuous Integration +--- + +## Overview + +Most continuous integration environments are already running inside a VM, and may not supported nested virtualization. The `none` driver was designed for this use case. + +## Prerequisites + +- VM running a systemd based Linux distribution + +## Tutorial + + Here is an example, that runs minikube from a non-root user, and ensures that the latest stable kubectl is installed: + +```shell +curl -Lo minikube \ + https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 \ + && sudo install minikube /usr/local/bin/ + +kv=$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt) +curl -Lo kubectl \ + https://storage.googleapis.com/kubernetes-release/release/$kv/bin/linux/amd64/kubectl \ + && sudo install kubectl /usr/local/bin/ + +export MINIKUBE_WANTUPDATENOTIFICATION=false +export MINIKUBE_WANTREPORTERRORPROMPT=false +export MINIKUBE_HOME=$HOME +export CHANGE_MINIKUBE_NONE_USER=true +export KUBECONFIG=$HOME/.kube/config + +mkdir -p $HOME/.kube $HOME/.minikube +touch $KUBECONFIG + +sudo -E minikube start --vm-driver=none +``` + +## Troubleshooting From 7fa4e054f3f6b312572598f5dde0c681dfd6844b Mon Sep 17 00:00:00 2001 From: Pranav Jituri Date: Fri, 9 Aug 2019 04:02:29 +0530 Subject: [PATCH 018/115] Fixed the progress bars ^_^ --- go.mod | 3 +-- go.sum | 4 ++++ pkg/util/progressbar.go | 42 +++++++++++++---------------------------- 3 files changed, 18 insertions(+), 31 deletions(-) diff --git a/go.mod b/go.mod index 39ca21b95d..702444e2f0 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/blang/semver v3.5.0+incompatible github.com/c4milo/gotoolkit v0.0.0-20170318115440-bcc06269efa9 // indirect github.com/cenkalti/backoff v2.2.1+incompatible - github.com/cheggaaa/pb v1.0.27 + github.com/cheggaaa/pb/v3 v3.0.1 github.com/cloudfoundry-attic/jibber_jabber v0.0.0-20151120183258-bcc4c8345a21 github.com/cloudfoundry/jibber_jabber v0.0.0-20151120183258-bcc4c8345a21 // indirect github.com/docker/docker v1.13.1 // indirect @@ -35,7 +35,6 @@ require ( github.com/johanneswuerbach/nfsexports v0.0.0-20181204082207-1aa528dcb345 github.com/libvirt/libvirt-go v3.4.0+incompatible github.com/machine-drivers/docker-machine-driver-vmware v0.1.1 - github.com/mattn/go-colorable v0.1.2 // indirect github.com/mattn/go-isatty v0.0.8 github.com/mitchellh/go-ps v0.0.0-20170309133038-4fdf99ab2936 github.com/moby/hyperkit v0.0.0-20171020124204-a12cd7250bcd diff --git a/go.sum b/go.sum index d984677ef8..9c455b2b7e 100644 --- a/go.sum +++ b/go.sum @@ -33,6 +33,8 @@ github.com/Sirupsen/logrus v0.0.0-20170822132746-89742aefa4b2 h1:k1A7eIeUk6rnX2y github.com/Sirupsen/logrus v0.0.0-20170822132746-89742aefa4b2/go.mod h1:rmk17hk6i8ZSAJkSDa7nOxamrG+SP4P0mm+DAvExv4U= github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d h1:G0m3OIz70MZUWq3EgK3CesDbo8upS2Vm9/P3FtgI+Jk= github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= +github.com/VividCortex/ewma v1.1.1 h1:MnEK4VOv6n0RSY4vtRe3h11qjxL3+t0B8yOL8iMXdcM= +github.com/VividCortex/ewma v1.1.1/go.mod h1:2Tkkvm3sRDVXaiyucHiACn4cqf7DpdyLvmxzcbUokwA= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= @@ -59,6 +61,8 @@ github.com/cespare/prettybench v0.0.0-20150116022406-03b8cfe5406c/go.mod h1:Xe6Z github.com/chai2010/gettext-go v0.0.0-20160711120539-c6fed771bfd5/go.mod h1:/iP1qXHoty45bqomnu2LM+VVyAEdWN+vtSHGlQgyxbw= github.com/cheggaaa/pb v1.0.27 h1:wIkZHkNfC7R6GI5w7l/PdAdzXzlrbcI3p8OAlnkTsnc= github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= +github.com/cheggaaa/pb/v3 v3.0.1 h1:m0BngUk2LuSRYdx4fujDKNRXNDpbNCfptPfVT2m6OJY= +github.com/cheggaaa/pb/v3 v3.0.1/go.mod h1:SqqeMF/pMOIu3xgGoxtPYhMNQP258xE4x/XRTYua+KU= github.com/client9/misspell v0.0.0-20170928000206-9ce5d979ffda/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/cfssl v0.0.0-20180726162950-56268a613adf/go.mod h1:yMWuSON2oQp+43nFtAV/uvKQIFpSPerB57DCt9t8sSA= diff --git a/pkg/util/progressbar.go b/pkg/util/progressbar.go index e1bb6ebb70..98826d0225 100644 --- a/pkg/util/progressbar.go +++ b/pkg/util/progressbar.go @@ -21,22 +21,19 @@ limitations under the License. package util import ( - "fmt" "io" "path/filepath" "sync" - "github.com/cheggaaa/pb" - "github.com/golang/glog" + "github.com/cheggaaa/pb/v3" "github.com/hashicorp/go-getter" ) var defaultProgressBar getter.ProgressTracker = &progressBar{} type progressBar struct { - lock sync.Mutex - pool *pb.Pool - pbs int + lock sync.Mutex + progress *pb.ProgressBar } // TrackProgress instantiates a new progress bar that will @@ -45,38 +42,25 @@ type progressBar struct { func (cpb *progressBar) TrackProgress(src string, currentSize, totalSize int64, stream io.ReadCloser) io.ReadCloser { cpb.lock.Lock() defer cpb.lock.Unlock() - - if cpb.pool == nil { - cpb.pool = pb.NewPool() - if err := cpb.pool.Start(); err != nil { - glog.Errorf("pool start: %v", err) - } + if cpb.progress == nil { + cpb.progress = pb.New64(totalSize) } + tmpl := `{{ string . "filePath" }} {{ bar . "-" "█" (cycle . "↖" "↗" "↘" "↙" ) "." "-"}} {{speed . }} {{percent .}} {{ rtime . " ETA - %s"}} {{ etime . " Elapsed - %s"}}` + p := pb.ProgressBarTemplate(tmpl).Start64(totalSize) + p.Set("filePath", filepath.Base(src)) + p.SetCurrent(currentSize) + p.Set(pb.Bytes, true) - p := pb.New64(totalSize) - p.Set64(currentSize) - p.SetUnits(pb.U_BYTES) - p.Prefix(fmt.Sprintf(" %s:", filepath.Base(src))) // Just a hair less than 80 (standard terminal width) for aesthetics & pasting into docs - p.SetWidth(78) - cpb.pool.Add(p) - reader := p.NewProxyReader(stream) + p.SetWidth(79) + barReader := p.NewProxyReader(stream) - cpb.pbs++ return &readCloser{ - Reader: reader, + Reader: barReader, close: func() error { cpb.lock.Lock() defer cpb.lock.Unlock() - p.Finish() - cpb.pbs-- - if cpb.pbs <= 0 { - if err := cpb.pool.Stop(); err != nil { - glog.Errorf("pool stop: %v", err) - } - cpb.pool = nil - } return nil }, } From 1f48364487cc95f6921df555cdfba59a3ffcebd5 Mon Sep 17 00:00:00 2001 From: Sharif Elgamal Date: Thu, 8 Aug 2019 15:47:44 -0700 Subject: [PATCH 019/115] Fix prepareNone and add integration test for it (#5023) * Fix prepareNone and add integration test for it * add test file * only compile none test on linux * build tags are confusing * build tags are quite confusing * build tags are very confusing --- cmd/minikube/cmd/start.go | 5 +- pkg/minikube/out/style.go | 2 +- pkg/util/kubeconfig.go | 2 +- test/integration/none_test.go | 116 ++++++++++++++++++++++++++++++++++ 4 files changed, 120 insertions(+), 5 deletions(-) create mode 100644 test/integration/none_test.go diff --git a/cmd/minikube/cmd/start.go b/cmd/minikube/cmd/start.go index 6adab87604..9d3da55840 100644 --- a/cmd/minikube/cmd/start.go +++ b/cmd/minikube/cmd/start.go @@ -259,12 +259,11 @@ func runStart(cmd *cobra.Command, args []string) { registryMirror = viper.GetStringSlice("registry_mirror") } - vmDriver := viper.GetString(vmDriver) - if err := cmdcfg.IsValidDriver(runtime.GOOS, vmDriver); err != nil { + if err := cmdcfg.IsValidDriver(runtime.GOOS, viper.GetString(vmDriver)); err != nil { exit.WithCodeT( exit.Failure, "The driver '{{.driver}}' is not supported on {{.os}}", - out.V{"driver": vmDriver, "os": runtime.GOOS}, + out.V{"driver": viper.GetString(vmDriver), "os": runtime.GOOS}, ) } diff --git a/pkg/minikube/out/style.go b/pkg/minikube/out/style.go index 564abd8fad..b03ea28d68 100644 --- a/pkg/minikube/out/style.go +++ b/pkg/minikube/out/style.go @@ -87,7 +87,7 @@ var styles = map[StyleEnum]style{ Caching: {Prefix: "🤹 "}, StartingVM: {Prefix: "🔥 "}, StartingNone: {Prefix: "🤹 "}, - Provisioner: {Prefix: "ℹ️ "}, + Provisioner: {Prefix: "ℹ️ "}, Resetting: {Prefix: "🔄 "}, DeletingHost: {Prefix: "🔥 "}, Copying: {Prefix: "✨ "}, diff --git a/pkg/util/kubeconfig.go b/pkg/util/kubeconfig.go index f1efabd9c2..bf5f68ea99 100644 --- a/pkg/util/kubeconfig.go +++ b/pkg/util/kubeconfig.go @@ -175,7 +175,7 @@ func ReadConfigOrNew(filename string) (*api.Config, error) { } // WriteConfig encodes the configuration and writes it to the given file. -// If the file exists, it's contents will be overwritten. +// If the file exists, its contents will be overwritten. func WriteConfig(config *api.Config, filename string) error { if config == nil { glog.Errorf("could not write to '%s': config can't be nil", filename) diff --git a/test/integration/none_test.go b/test/integration/none_test.go new file mode 100644 index 0000000000..542756241f --- /dev/null +++ b/test/integration/none_test.go @@ -0,0 +1,116 @@ +// +build integration +// +build linux + +/* +Copyright 2019 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package integration + +import ( + "os" + "os/user" + "path/filepath" + "strconv" + "strings" + "syscall" + "testing" +) + +func TestNone(t *testing.T) { + if !isTestNoneDriver(t) { + t.Skip("Only test none driver.") + } + if shouldRunInParallel(t) { + t.Parallel() + } + + err := os.Setenv("CHANGE_MINIKUBE_NONE_USER", "true") + if err != nil { + t.Fatalf("Failed to setup TestNone: set env: %v", err) + } + t.Run("output", testNoneStartOutput) + t.Run("minikube permissions", testNoneMinikubeFolderPermissions) + t.Run("kubeconfig permissions", testNoneKubeConfigPermissions) + +} + +func testNoneMinikubeFolderPermissions(t *testing.T) { + username := os.Getenv("SUDO_USER") + if username == "" { + t.Fatal("Expected $SUDO_USER env to not be empty") + } + u, err := user.Lookup(username) + if err != nil { + t.Fatalf("Getting user failed: %v", err) + } + uid, err := strconv.Atoi(u.Uid) + if err != nil { + t.Errorf("Failed to convert uid to int: %v", err) + } + info, err := os.Stat(filepath.Join(u.HomeDir, ".minikube")) + if err != nil { + t.Errorf("Failed to get .minikube dir info, %v", err) + } + fileUID := info.Sys().(*syscall.Stat_t).Uid + + if fileUID != uint32(uid) { + t.Errorf("Expected .minikube folder user: %d, got: %d", uint32(uid), fileUID) + } + +} + +func testNoneKubeConfigPermissions(t *testing.T) { + username := os.Getenv("SUDO_USER") + if username == "" { + t.Fatal("Expected $SUDO_USER env to not be empty") + } + u, err := user.Lookup(username) + if err != nil { + t.Fatalf("Getting user failed: %v", err) + } + uid, err := strconv.Atoi(u.Uid) + if err != nil { + t.Errorf("Failed to convert uid to int: %v", err) + } + info, err := os.Stat(filepath.Join(u.HomeDir, ".kube/config")) + if err != nil { + t.Errorf("Failed to get .minikube dir info, %v", err) + } + fileUID := info.Sys().(*syscall.Stat_t).Uid + + if fileUID != uint32(uid) { + t.Errorf("Expected .minikube folder user: %d, got: %d", uint32(uid), fileUID) + } + +} + +func testNoneStartOutput(t *testing.T) { + p := profileName(t) + mk := NewMinikubeRunner(t, p, "--wait=false") + mk.RunCommand("delete", false) + stdout, stderr, err := mk.Start() + if err != nil { + t.Fatalf("failed to start minikube (for profile %s) failed : %v\nstdout: %s\nstderr: %s", p, err, stdout, stderr) + } + msg := "Configuring local host environment" + if !strings.Contains(stdout, msg) { + t.Errorf("Expected: stdout to contain %q, got: %s", msg, stdout) + } + msg = "may reduce system security and reliability." + if !strings.Contains(stderr, msg) { + t.Errorf("Expected: stderr to contain %q, got: %s", msg, stderr) + } +} From 9d9e704483ccd8d63c81f09570c0a4cded660062 Mon Sep 17 00:00:00 2001 From: Thomas Stromberg Date: Thu, 8 Aug 2019 16:24:38 -0700 Subject: [PATCH 020/115] Add remaining non-deprecated drivers --- .../Getting started/includes/virtualbox.md | 7 --- site/content/en/docs/Getting started/linux.md | 37 ++---------- site/content/en/docs/Getting started/macos.md | 58 ++----------------- .../en/docs/Getting started/windows.md | 22 ++----- .../en/docs/Reference/Drivers/hyperkit.md | 28 +-------- .../en/docs/Reference/Drivers/hyperv.md | 29 ++++++++++ .../includes/hyperkit_driver_install.md | 7 --- .../includes/hyperkit_prereqs_install.md | 7 --- .../Drivers/includes/hyperkit_usage.md | 26 +++++++++ .../Drivers/includes/hyperv_usage.md | 36 ++++++++++++ .../Drivers/includes/kvm2_driver_install.md | 4 -- ...{kvm2_prereqs_install.md => kvm2_usage.md} | 14 +++++ .../Reference/Drivers/includes/none_usage.md | 17 ++++++ .../Drivers/includes/parallels_usage.md | 19 ++++++ .../Drivers/includes/virtualbox_usage.md | 16 +++++ .../Drivers/includes/vmware_macos_usage.md | 31 ++++++++++ .../content/en/docs/Reference/Drivers/kvm2.md | 26 +-------- .../content/en/docs/Reference/Drivers/none.md | 25 +------- .../en/docs/Reference/Drivers/parallels.md | 23 ++++++++ .../en/docs/Reference/Drivers/virtualbox.md | 24 ++------ .../en/docs/Reference/Drivers/vmware.md | 32 ++++++++++ 21 files changed, 268 insertions(+), 220 deletions(-) delete mode 100644 site/content/en/docs/Getting started/includes/virtualbox.md create mode 100644 site/content/en/docs/Reference/Drivers/hyperv.md delete mode 100644 site/content/en/docs/Reference/Drivers/includes/hyperkit_driver_install.md delete mode 100644 site/content/en/docs/Reference/Drivers/includes/hyperkit_prereqs_install.md create mode 100644 site/content/en/docs/Reference/Drivers/includes/hyperkit_usage.md create mode 100644 site/content/en/docs/Reference/Drivers/includes/hyperv_usage.md delete mode 100644 site/content/en/docs/Reference/Drivers/includes/kvm2_driver_install.md rename site/content/en/docs/Reference/Drivers/includes/{kvm2_prereqs_install.md => kvm2_usage.md} (71%) create mode 100644 site/content/en/docs/Reference/Drivers/includes/none_usage.md create mode 100644 site/content/en/docs/Reference/Drivers/includes/parallels_usage.md create mode 100644 site/content/en/docs/Reference/Drivers/includes/virtualbox_usage.md create mode 100644 site/content/en/docs/Reference/Drivers/includes/vmware_macos_usage.md create mode 100644 site/content/en/docs/Reference/Drivers/parallels.md create mode 100644 site/content/en/docs/Reference/Drivers/vmware.md diff --git a/site/content/en/docs/Getting started/includes/virtualbox.md b/site/content/en/docs/Getting started/includes/virtualbox.md deleted file mode 100644 index 9f2c51c55f..0000000000 --- a/site/content/en/docs/Getting started/includes/virtualbox.md +++ /dev/null @@ -1,7 +0,0 @@ -Download and install the latest version of VirtualBox from https://www.virtualbox.org/ - -Once installed, start minikube: - -```shell -minikube start -``` diff --git a/site/content/en/docs/Getting started/linux.md b/site/content/en/docs/Getting started/linux.md index aed5bac238..19cd96089f 100644 --- a/site/content/en/docs/Getting started/linux.md +++ b/site/content/en/docs/Getting started/linux.md @@ -55,44 +55,15 @@ If the above command outputs "no": {{% tabs %}} {{% tab "VirtualBox" %}} -{{% readfile file="/docs/Getting started/includes/virtualbox.md" %}} +{{% readfile file="/docs/Reference/Drivers/includes/virtualbox_usage.md" %}} {{% /tab %}} {{% tab "KVM" %}} - -### Prerequisites Installation - -{{% readfile file="/docs/Reference/Drivers/includes/kvm2_prereqs_install.md" %}} - -### Driver Installation - -{{% readfile file="/docs/Reference/Drivers/includes/kvm2_driver_install.md" %}} - -### Usage - -```shell -minikube start --vm-driver=kvm2 -``` -To make kvm2 the default for future invocations, run: - -```shell -minikube config set vm-driver kvm2 -``` - +{{% readfile file="/docs/Reference/Drivers/includes/kvm2_usage.md" %}} {{% /tab %}} {{% tab "None (bare-metal)" %}} +If you are already running minikube from inside a VM, it is possible to skip the creation of an additional VM layer by using the `none` driver. -If you are already running minikube from inside a VM, it is possible to skip the creation of an additional VM layer by using the `none` driver. -This mode does come with additional requirements: - -- docker -- systemd -- sudo access - -```shell -sudo minikube start --vm-driver=none -``` - -Please see the [docs/reference/drivers/none](none driver) documentation for more information. +{{% readfile file="/docs/Reference/Drivers/includes/none_usage.md" %}} {{% /tab %}} {{% /tabs %}} diff --git a/site/content/en/docs/Getting started/macos.md b/site/content/en/docs/Getting started/macos.md index a08efe5b88..2f51c89143 100644 --- a/site/content/en/docs/Getting started/macos.md +++ b/site/content/en/docs/Getting started/macos.md @@ -14,7 +14,7 @@ weight: 2 {{% tabs %}} {{% tab "Brew" %}} -If you have the [Brew Package Manager](https://brew.sh/) installed, this will download and install minikube to /usr/local/bin: +If the [Brew Package Manager](https://brew.sh/) is installed, use it to download and install minikube: ```shell brew install minikube @@ -30,68 +30,22 @@ curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-darwin && sudo install minikube-darwin-amd64 /usr/local/bin/minikube ``` {{% /tab %}} - {{% /tabs %}} ## Hypervisor Setup {{% tabs %}} {{% tab "VirtualBox" %}} -{{% readfile file="/docs/Getting started/includes/virtualbox.md" %}} +{{% readfile file="/docs/Reference/Drivers/includes/virtualbox_usage.md" %}} {{% /tab %}} {{% tab "Hyperkit" %}} - - -### Prerequisites Installation - -{{% readfile file="/docs/Reference/Drivers/includes/hyperkit_prereqs_install.md" %}} - -### Driver Installation - -{{% readfile file="/docs/Reference/Drivers/includes/hyperkit_driver_install.md" %}} - -### Usage - -```shell -minikube start --vm-driver=hyperkit -``` - -To make hyperkit the default for future invocations: - -```shell -minikube config set vm-driver hyperkit -``` - +{{% readfile file="/docs/Reference/Drivers/includes/hyperkit_usage.md" %}} {{% /tab %}} - {{% tab "Parallels" %}} - -Start minikube with Parallels support using: - -```shell -minikube start --vm-driver=parallels -``` - -To make parallels the default for future invocations: - -```shell -minikube config set vm-driver parallels -``` +{{% readfile file="/docs/Reference/Drivers/includes/parallels_usage.md" %}} {{% /tab %}} - -{{% tab "VMware Fusion" %}} - -Start minikube with VMware Fusion support using: - -```shell -minikube start --vm-driver=vmwarefusion -``` - -To make vmwarefusion the default for future invocations: - -```shell -minikube config set vm-driver vmwarefusion -``` +{{% tab "VMware" %}} +{{% readfile file="/docs/Reference/Drivers/includes/vmware_macos_usage.md" %}} {{% /tab %}} {{% /tabs %}} diff --git a/site/content/en/docs/Getting started/windows.md b/site/content/en/docs/Getting started/windows.md index 4cc0040162..747a8004d5 100644 --- a/site/content/en/docs/Getting started/windows.md +++ b/site/content/en/docs/Getting started/windows.md @@ -15,12 +15,12 @@ weight: 3 {{% tabs %}} {{% tab "Direct" %}} -Download and run the [installer](https://storage.googleapis.com/minikube/releases/latest/minikube-installer.exe) +Download and run the [minikube installer](https://storage.googleapis.com/minikube/releases/latest/minikube-installer.exe) {{% /tab %}} {{% tab "Chocolatey" %}} -If you have the [Chocolatey Package Manager](https://chocolatey.org/) installed, you can install minikube if run as an Administrator: +If the [Chocolatey Package Manager](https://chocolatey.org/) is installed, use it to install minikube: ```shell choco install minikube @@ -55,24 +55,10 @@ Hyper-V Requirements: A hypervisor has been detected. {{% tabs %}} {{% tab "VirtualBox" %}} -{{% readfile file="/docs/Getting started/includes/virtualbox.md" %}} +{{% readfile file="/docs/Reference/Drivers/includes/virtualbox_usage.md" %}} {{% /tab %}} {{% tab "Hyper-V" %}} - -If Hyper-V is active, you can start minikube with Hyper-V support using: - -```shell -minikube start --vm-driver=hyperv -``` - -NOTE: If this fails due to networking issues, see the [Hyper-V driver documentation](https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#hyper-v-driver) for further instructions. - -To make hyperv the default for future invocations: - -```shell -minikube config set vm-driver hyperv -``` - +{{% readfile file="/docs/Reference/Drivers/includes/hyperv_usage.md" %}} {{% /tab %}} {{% /tabs %}} diff --git a/site/content/en/docs/Reference/Drivers/hyperkit.md b/site/content/en/docs/Reference/Drivers/hyperkit.md index 589195a2e7..2cba901305 100644 --- a/site/content/en/docs/Reference/Drivers/hyperkit.md +++ b/site/content/en/docs/Reference/Drivers/hyperkit.md @@ -1,6 +1,6 @@ --- -title: "HyperKit" -linkTitle: "HyperKit" +title: "hyperkit" +linkTitle: "hyperkit" weight: 1 date: 2018-08-08 description: > @@ -11,29 +11,7 @@ description: > [HyperKit](https://github.com/moby/hyperkit) is an open-source hypervisor for macOS hypervisor, optimized for lightweight virtual machines and container deployment. -## Requirements - -- macOS High Sierra 10.12 (or newer) -- HyperKit - -## Installing Prerequisites - -{{% readfile file="/docs/Reference/Drivers/includes/hyperkit_prereqs_install.md" %}} - -## Driver installation - -{{% readfile file="/docs/Reference/Drivers/includes/hyperkit_driver_install.md" %}} - -## Usage - -```shell -minikube start --vm-driver=hyperkit -``` -To make hyperkit the default driver: - -```shell -minikube config set vm-driver hyperkit -``` +{{% readfile file="/docs/Reference/Drivers/includes/hyperkit_usage.md" %}} ## Special features diff --git a/site/content/en/docs/Reference/Drivers/hyperv.md b/site/content/en/docs/Reference/Drivers/hyperv.md new file mode 100644 index 0000000000..f075cbe39e --- /dev/null +++ b/site/content/en/docs/Reference/Drivers/hyperv.md @@ -0,0 +1,29 @@ +--- +title: "hyperv" +linkTitle: "hyperv" +weight: 2 +date: 2017-01-05 +date: 2018-08-05 +description: > + Microsoft Hyper-V driver +--- + +## Overview + +Hyper-V is a native hypervisor built in to modern versions of Microsoft Windows. + +{{% readfile file="/docs/Reference/Drivers/includes/hyperv_usage.md" %}} + +## Special features + +The `minikube start` command supports 3 additional hyperv specific flags: + +* **\--hyperv-virtual-switch**: The hyperv virtual switch name. Defaults to first found + +## Issues + +Also see [co/hyperv open issues](https://github.com/kubernetes/minikube/labels/co%2Fhyperv) + +## Troubleshooting + +* Run `minikube start --alsologtostderr -v=7` to debug crashes diff --git a/site/content/en/docs/Reference/Drivers/includes/hyperkit_driver_install.md b/site/content/en/docs/Reference/Drivers/includes/hyperkit_driver_install.md deleted file mode 100644 index e413470b7b..0000000000 --- a/site/content/en/docs/Reference/Drivers/includes/hyperkit_driver_install.md +++ /dev/null @@ -1,7 +0,0 @@ -Download and install the latest minikube hyperkit driver: - -```shell -curl -LO https://storage.googleapis.com/minikube/releases/latest/ -docker-machine-driver-hyperkit \ -&& sudo install -o root -m 4755 docker-machine-driver-hyperkit /usr/local/bin/ -``` \ No newline at end of file diff --git a/site/content/en/docs/Reference/Drivers/includes/hyperkit_prereqs_install.md b/site/content/en/docs/Reference/Drivers/includes/hyperkit_prereqs_install.md deleted file mode 100644 index 399aa5b3f8..0000000000 --- a/site/content/en/docs/Reference/Drivers/includes/hyperkit_prereqs_install.md +++ /dev/null @@ -1,7 +0,0 @@ -* If you have Docker for Desktop installed, you already have hyperkit installed. -* If you have the [Brew Package Manager](https://brew.sh/) installed, run: - -```shell -brew install hyperkit -``` -* To install HyperKit manually, see the [HyperKit on GitHub](https://github.com/moby/hyperkit) \ No newline at end of file diff --git a/site/content/en/docs/Reference/Drivers/includes/hyperkit_usage.md b/site/content/en/docs/Reference/Drivers/includes/hyperkit_usage.md new file mode 100644 index 0000000000..3604c0fa95 --- /dev/null +++ b/site/content/en/docs/Reference/Drivers/includes/hyperkit_usage.md @@ -0,0 +1,26 @@ +## Requirements + +- macOS 10.11+ +- HyperKit + +## Installing dependencies + +If Docker for Desktop is installed, HyperKit is already installed. + +Otherwise, if the [Brew Package Manager](https://brew.sh/) is installed: + +```shell +brew install hyperkit +``` + +As a final alternative, you can [Install HyperKit from GitHub](https://github.com/moby/hyperkit) + +## Driver Installation + +Download and install the latest minikube driver: + +```shell +curl -LO https://storage.googleapis.com/minikube/releases/latest/ +docker-machine-driver-hyperkit \ +&& sudo install -o root -m 4755 docker-machine-driver-hyperkit /usr/local/bin/ +``` \ No newline at end of file diff --git a/site/content/en/docs/Reference/Drivers/includes/hyperv_usage.md b/site/content/en/docs/Reference/Drivers/includes/hyperv_usage.md new file mode 100644 index 0000000000..a90c6c9640 --- /dev/null +++ b/site/content/en/docs/Reference/Drivers/includes/hyperv_usage.md @@ -0,0 +1,36 @@ +## Requirements + +* Windows 10 Pro +* Hyper-V enabled +* A Hyper-V switch created + +## Configuring Hyper-V + +Open a PowerShell console as Administrator, and run the following command: + +```powershell +Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All +``` + +Reboot, and create a new external network switch: + +```powershell +New-VMSwitch -name ExternalSwitch -NetAdapterName Ethernet -AllowManagementOS $true +``` + +Set this network switch as the minikube default: + +```shell +minikube config set hyperv-virtual-switch ExternalSwitch +``` + +## Usage + +```shell +minikube start --vm-driver=hyperv +``` +To make hyperv the default driver: + +```shell +minikube config set vm-driver hyperv +``` diff --git a/site/content/en/docs/Reference/Drivers/includes/kvm2_driver_install.md b/site/content/en/docs/Reference/Drivers/includes/kvm2_driver_install.md deleted file mode 100644 index 6b56ee16c4..0000000000 --- a/site/content/en/docs/Reference/Drivers/includes/kvm2_driver_install.md +++ /dev/null @@ -1,4 +0,0 @@ -```shell - curl -LO https://storage.googleapis.com/minikube/releases/latest/docker-machine-driver-kvm2 \ - && sudo install docker-machine-driver-kvm2 /usr/local/bin/ -``` diff --git a/site/content/en/docs/Reference/Drivers/includes/kvm2_prereqs_install.md b/site/content/en/docs/Reference/Drivers/includes/kvm2_usage.md similarity index 71% rename from site/content/en/docs/Reference/Drivers/includes/kvm2_prereqs_install.md rename to site/content/en/docs/Reference/Drivers/includes/kvm2_usage.md index 3557772635..2be6136a17 100644 --- a/site/content/en/docs/Reference/Drivers/includes/kvm2_prereqs_install.md +++ b/site/content/en/docs/Reference/Drivers/includes/kvm2_usage.md @@ -1,3 +1,10 @@ +## Requirements + +- libvirt v1.3.1 or higher +- qemu-kvm v2.0 or higher + +## Installing Prerequisites + Proper installation of KVM and libvirt is highly specific to each Linux distribution. Please consult: * [ArchLinux](https://wiki.archlinux.org/index.php/Libvirt) @@ -13,3 +20,10 @@ Once configured, validate that libvirt reports no errors: ```shell virt-host-validate ``` + +## Driver installation + +```shell + curl -LO https://storage.googleapis.com/minikube/releases/latest/docker-machine-driver-kvm2 \ + && sudo install docker-machine-driver-kvm2 /usr/local/bin/ +``` diff --git a/site/content/en/docs/Reference/Drivers/includes/none_usage.md b/site/content/en/docs/Reference/Drivers/includes/none_usage.md new file mode 100644 index 0000000000..d6893edd5c --- /dev/null +++ b/site/content/en/docs/Reference/Drivers/includes/none_usage.md @@ -0,0 +1,17 @@ +## Requirements + +VM running a systemd-based Linux distribution ([see #2704](https://github.com/kubernetes/minikube/issues/2704)) + +## Usage + +The none driver requires minikube to be run as root, until [#3760](https://github.com/kubernetes/minikube/issues/3760) can be addressed. + +```shell +sudo minikube start --vm-driver=none +``` + +To make none the default for future invocations, run: + +```shell +sudo minikube config set vm-driver none +``` diff --git a/site/content/en/docs/Reference/Drivers/includes/parallels_usage.md b/site/content/en/docs/Reference/Drivers/includes/parallels_usage.md new file mode 100644 index 0000000000..831e119d65 --- /dev/null +++ b/site/content/en/docs/Reference/Drivers/includes/parallels_usage.md @@ -0,0 +1,19 @@ +## Requirements + +* Parallels Desktop 11.0.0+ Pro or Business edition + +## Driver Installation + +If the [Brew Package Manager](https://brew.sh/) is installed, run: + +``` +brew install docker-machine-driver-parallels +``` + +Otherwise: + +```shell +r=https://api.github.com/repos/Parallels/docker-machine-parallels +curl -LO $(curl -s $r/releases/latest | grep -o 'http.*parallels' | head -n1) \ + && install docker-machine-driver-parallels /usr/local/bin/ +``` diff --git a/site/content/en/docs/Reference/Drivers/includes/virtualbox_usage.md b/site/content/en/docs/Reference/Drivers/includes/virtualbox_usage.md new file mode 100644 index 0000000000..148dc7b745 --- /dev/null +++ b/site/content/en/docs/Reference/Drivers/includes/virtualbox_usage.md @@ -0,0 +1,16 @@ +## Requirements + +- [https://www.virtualbox.org/wiki/Downloads](VirtualBox) 5.2 or higher + +## Usage + +minikube currently uses VirtualBox by default, but it can also be explicitly set: + +```shell +minikube start --vm-driver=virtualbox +``` +To make virtualbox the default driver: + +```shell +minikube config set vm-driver virtualbox +``` diff --git a/site/content/en/docs/Reference/Drivers/includes/vmware_macos_usage.md b/site/content/en/docs/Reference/Drivers/includes/vmware_macos_usage.md new file mode 100644 index 0000000000..5048b256d7 --- /dev/null +++ b/site/content/en/docs/Reference/Drivers/includes/vmware_macos_usage.md @@ -0,0 +1,31 @@ +## Requirements + +* VMware Fusion + +## Driver Installation + +If the [Brew Package Manager](https://brew.sh/) is installed, run: + +``` +brew install docker-machine-driver-vmware +``` + +Otherwise: + +```shell +r=https://api.github.com/repos/machine-drivers/docker-machine-driver-vmware +curl -LO $(curl -s $r/releases/latest | grep -o 'http.*darwin_amd64' | head -n1) \ + && install docker-machine-driver-vmware_darwin_amd64 \ + /usr/local/bin/docker-machine-driver-vmware +``` + +## Usage + +```shell +minikube start --vm-driver=vmware +``` +To make vmware the default driver: + +```shell +minikube config set vm-driver vmware +``` \ No newline at end of file diff --git a/site/content/en/docs/Reference/Drivers/kvm2.md b/site/content/en/docs/Reference/Drivers/kvm2.md index d4d58b6c0a..e5da5b34ff 100644 --- a/site/content/en/docs/Reference/Drivers/kvm2.md +++ b/site/content/en/docs/Reference/Drivers/kvm2.md @@ -1,7 +1,7 @@ --- title: "kvm2" linkTitle: "kvm2" -weight: 1 +weight: 2 date: 2017-01-05 date: 2018-08-05 description: > @@ -12,29 +12,7 @@ description: > [KVM (Kernel-based Virtual Machine)](https://www.linux-kvm.org/page/Main_Page) is a full virtualization solution for Linux on x86 hardware containing virtualization extensions. To work with KVM, minikube uses the [libvirt virtualization API](https://libvirt.org/) -## Requirements - -- libvirt v1.3.1 or higher -- qemu-kvm v2.0 or higher - -## Installing Prerequisites - -{{% readfile file="/docs/Reference/Drivers/includes/kvm2_prereqs_install.md" %}} - -## Driver installation - -{{% readfile file="/docs/Reference/Drivers/includes/kvm2_driver_install.md" %}} - -## Usage - -```shell -minikube start --vm-driver=kvm2 -``` -To make kvm2 the default for future invocations, run: - -```shell -minikube config set vm-driver kvm2 -``` +{{% readfile file="/docs/Reference/Drivers/includes/kvm2_usage.md" %}} ## Special features diff --git a/site/content/en/docs/Reference/Drivers/none.md b/site/content/en/docs/Reference/Drivers/none.md index 9ad00d786f..38c4b4fa65 100644 --- a/site/content/en/docs/Reference/Drivers/none.md +++ b/site/content/en/docs/Reference/Drivers/none.md @@ -1,7 +1,7 @@ --- title: "none" linkTitle: "none" -weight: 1 +weight: 3 date: 2017-01-05 date: 2018-08-05 description: > @@ -12,28 +12,7 @@ description: > This document is written for system integrators who are familiar with minikube, and wish to run it within a customized VM environment. The `none` driver allows advanced minikube users to skip VM creation, allowing minikube to be run on a user-supplied VM. -## Features - -* Ability to run without the creation of an additional VM -* Fast setup and teardown - -## Requirements - -VM running a systemd-based Linux distribution ([see #2704](https://github.com/kubernetes/minikube/issues/2704)) - -## Usage - -The none driver requires minikube to be run as root, until [#3760](https://github.com/kubernetes/minikube/issues/3760) can be addressed. - -```shell -sudo minikube start --vm-driver=none -``` - -To make none the default for future invocations, run: - -```shell -sudo minikube config set vm-driver none -``` +{{% readfile file="/docs/Reference/Drivers/includes/none_usage.md" %}} ## Issues diff --git a/site/content/en/docs/Reference/Drivers/parallels.md b/site/content/en/docs/Reference/Drivers/parallels.md new file mode 100644 index 0000000000..e1458be93f --- /dev/null +++ b/site/content/en/docs/Reference/Drivers/parallels.md @@ -0,0 +1,23 @@ +--- +title: "parallels" +linkTitle: "parallels" +weight: 4 +date: 2018-08-08 +description: > + Parallels driver +--- + +## Overview + +The Parallels driver is particularly useful for users who own Parallels Desktop, as it does not require VT-x hardware support. + +{{% readfile file="/docs/Reference/Drivers/includes/parallels_usage.md" %}} + +## Issues + +* [Full list of open 'parallels' driver issues](https://github.com/kubernetes/minikube/labels/co%2Fparallels) + +## Troubleshooting + +* Run `minikube start --alsologtostderr -v=7` to debug crashes +* \ No newline at end of file diff --git a/site/content/en/docs/Reference/Drivers/virtualbox.md b/site/content/en/docs/Reference/Drivers/virtualbox.md index 4f0e519f98..4303387eb1 100644 --- a/site/content/en/docs/Reference/Drivers/virtualbox.md +++ b/site/content/en/docs/Reference/Drivers/virtualbox.md @@ -1,7 +1,7 @@ --- -title: "VirtualBox" -linkTitle: "VirtualBox" -weight: 1 +title: "virtualbox" +linkTitle: "virtualbox" +weight: 5 date: 2018-08-08 description: > VirtualBox driver @@ -11,23 +11,7 @@ description: > VirtualBox is the oldest and most stable VM driver for minikube. - -## Requirements - -- [https://www.virtualbox.org/wiki/Downloads](VirtualBox) 5.2 or higher - -## Usage - -minikube currently uses VirtualBox by default, but it can also be explicitly set: - -```shell -minikube start --vm-driver=virtualbox -``` -To make virtualbox the default driver: - -```shell -minikube config set vm-driver virtualbox -``` +{{% readfile file="/docs/Reference/Drivers/includes/virtualbox_usage.md" %}} ## Special features diff --git a/site/content/en/docs/Reference/Drivers/vmware.md b/site/content/en/docs/Reference/Drivers/vmware.md new file mode 100644 index 0000000000..604e1d0a3a --- /dev/null +++ b/site/content/en/docs/Reference/Drivers/vmware.md @@ -0,0 +1,32 @@ +--- +title: "vmware" +linkTitle: "vmware" +weight: 6 +date: 2018-08-08 +description: > + VMware driver +--- + +## Overview + +The vmware driver supports virtualization across all VMware based hypervisors. + +{{% tabs %}} +{{% tab "macOS" %}} +{{% readfile file="/docs/Reference/Drivers/includes/vmware_macos_usage.md" %}} +{{% /tab %}} +{{% tab "Linux" %}} +No documentation is available yet. +{{% /tab %}} +{{% tab "Windows" %}} +No documentation is available yet. +{{% /tab %}} +{{% /tabs %}} + +## Issues + +* [Full list of open 'vmware' driver issues](https://github.com/kubernetes/minikube/labels/co%2Fvmware) + +## Troubleshooting + +* Run `minikube start --alsologtostderr -v=7` to debug crashes \ No newline at end of file From 6ebd03c6cb49a9ff4ffe11cb8f97a3721f8a27ce Mon Sep 17 00:00:00 2001 From: Thomas Stromberg Date: Thu, 8 Aug 2019 16:30:24 -0700 Subject: [PATCH 021/115] hyperv/hyperv doc cleanup --- site/content/en/docs/Reference/Drivers/hyperkit.md | 14 +++++++++----- site/content/en/docs/Reference/Drivers/hyperv.md | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/site/content/en/docs/Reference/Drivers/hyperkit.md b/site/content/en/docs/Reference/Drivers/hyperkit.md index 2cba901305..63a47bdee5 100644 --- a/site/content/en/docs/Reference/Drivers/hyperkit.md +++ b/site/content/en/docs/Reference/Drivers/hyperkit.md @@ -15,18 +15,22 @@ description: > ## Special features -minikube start supports some VirtualBox specific flags: +minikube start supports additional hyperkit specific flags: -* **\--host-only-cidr**: The CIDR to be used for the minikube VM (default "192.168.99.1/24") -* **\--no-vtx-check**: Disable checking for the availability of hardware virtualization + +* **\--hyperkit-vpnkit-sock**: Location of the VPNKit socket used for networking. If empty, disables Hyperkit VPNKitSock, if 'auto' uses Docker for Mac VPNKit connection, otherwise uses the specified VSoc +* **\--hyperkit-vsock-ports**: List of guest VSock ports that should be exposed as sockets on the host +* **\--nfs-share**: Local folders to share with Guest via NFS mounts +* **\--nfs-shares-root**: Where to root the NFS Shares (default "/nfsshares") +* **\--uuid**: Provide VM UUID to restore MAC address ## Issues ### Local DNS server conflict -If you are using dnsmasq in your setup and cluster creation fails (stuck at kube-dns initialization) you might need to add listen-address=192.168.64.1 to dnsmasq.conf. +If you are using `dnsmasq` and `minikube` fails, add `listen-address=192.168.64.1` to dnsmasq.conf. -Note: If dnsmasq.conf contains listen-address=127.0.0.1 kubernetes discovers dns at 127.0.0.1:53 and tries to use it using bridge ip address, but dnsmasq replies only to requests from 127.0.0.1 +If you are running other DNS servers, shut them off or specify an alternative bind address. ### Other diff --git a/site/content/en/docs/Reference/Drivers/hyperv.md b/site/content/en/docs/Reference/Drivers/hyperv.md index f075cbe39e..edfa78c9ca 100644 --- a/site/content/en/docs/Reference/Drivers/hyperv.md +++ b/site/content/en/docs/Reference/Drivers/hyperv.md @@ -16,7 +16,7 @@ Hyper-V is a native hypervisor built in to modern versions of Microsoft Windows. ## Special features -The `minikube start` command supports 3 additional hyperv specific flags: +The `minikube start` command supports additional hyperv specific flags: * **\--hyperv-virtual-switch**: The hyperv virtual switch name. Defaults to first found From 38b83b122f180c5c71cbf587ec30c41420a9eb1a Mon Sep 17 00:00:00 2001 From: Thomas Stromberg Date: Thu, 8 Aug 2019 16:34:45 -0700 Subject: [PATCH 022/115] Shorten hyperkit troubleshooting --- site/content/en/docs/Reference/Drivers/hyperkit.md | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/site/content/en/docs/Reference/Drivers/hyperkit.md b/site/content/en/docs/Reference/Drivers/hyperkit.md index 63a47bdee5..22581e7d23 100644 --- a/site/content/en/docs/Reference/Drivers/hyperkit.md +++ b/site/content/en/docs/Reference/Drivers/hyperkit.md @@ -38,11 +38,5 @@ If you are running other DNS servers, shut them off or specify an alternative bi ## Troubleshooting -* Run `docker-machine-driver-hyperkit version` to verify that the version matches minikubes version. Example output: - -``` -version: v1.3.0 -commit: 43969594266d77b555a207b0f3e9b3fa1dc92b1f -```` - +* Run `docker-machine-driver-hyperkit version` to make sure the version matches minikube * Run `minikube start --alsologtostderr -v=7` to debug crashes From d18978450c0ad83c16c6101b2c25fbd6b13d63d7 Mon Sep 17 00:00:00 2001 From: Thomas Stromberg Date: Thu, 8 Aug 2019 17:12:33 -0700 Subject: [PATCH 023/115] Restore --disable-driver-mounts flag --- cmd/minikube/cmd/start.go | 1 + test/integration/start_stop_delete_test.go | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/cmd/minikube/cmd/start.go b/cmd/minikube/cmd/start.go index 6adab87604..5e67e01675 100644 --- a/cmd/minikube/cmd/start.go +++ b/cmd/minikube/cmd/start.go @@ -169,6 +169,7 @@ func initKubernetesFlags() { // initDriverFlags inits the commandline flags for vm drivers func initDriverFlags() { startCmd.Flags().String(vmDriver, constants.DefaultVMDriver, fmt.Sprintf("VM driver is one of: %v", constants.SupportedVMDrivers)) + startCmd.Flags().Bool(disableDriverMounts, false, "Disables the filesystem mounts provided by the hypervisors") // kvm2 startCmd.Flags().String(kvmNetwork, "default", "The KVM network name. (only supported with KVM driver)") diff --git a/test/integration/start_stop_delete_test.go b/test/integration/start_stop_delete_test.go index 2d13a17069..f90dee786a 100644 --- a/test/integration/start_stop_delete_test.go +++ b/test/integration/start_stop_delete_test.go @@ -44,7 +44,7 @@ func TestStartStop(t *testing.T) { name string args []string }{ - {"oldest", []string{ // nocache_oldest + {"oldest", []string{ "--cache-images=false", fmt.Sprintf("--kubernetes-version=%s", constants.OldestKubernetesVersion), // default is the network created by libvirt, if we change the name minikube won't boot @@ -52,7 +52,7 @@ func TestStartStop(t *testing.T) { "--kvm-network=default", "--kvm-qemu-uri=qemu:///system", }}, - {"cni", []string{ // feature_gates_newest_cni + {"cni", []string{ "--feature-gates", "ServerSideApply=true", "--network-plugin=cni", @@ -60,14 +60,15 @@ func TestStartStop(t *testing.T) { "--extra-config=kubeadm.pod-network-cidr=192.168.111.111/16", fmt.Sprintf("--kubernetes-version=%s", constants.NewestKubernetesVersion), }}, - {"containerd", []string{ // containerd_and_non_default_apiserver_port + {"containerd", []string{ "--container-runtime=containerd", "--docker-opt containerd=/var/run/containerd/containerd.sock", "--apiserver-port=8444", }}, - {"crio", []string{ // crio_ignore_preflights + {"crio", []string{ "--container-runtime=crio", "--extra-config", + "--disable-driver-mounts", "kubeadm.ignore-preflight-errors=SystemVerification", }}, } From 32c405d44da37c2a34fc3e33a9ece9b0f3beecf5 Mon Sep 17 00:00:00 2001 From: Thomas Stromberg Date: Fri, 9 Aug 2019 06:35:39 -0700 Subject: [PATCH 024/115] Fix way flags are being passed into crio test --- test/integration/start_stop_delete_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/integration/start_stop_delete_test.go b/test/integration/start_stop_delete_test.go index f90dee786a..cb2199981c 100644 --- a/test/integration/start_stop_delete_test.go +++ b/test/integration/start_stop_delete_test.go @@ -67,9 +67,8 @@ func TestStartStop(t *testing.T) { }}, {"crio", []string{ "--container-runtime=crio", - "--extra-config", "--disable-driver-mounts", - "kubeadm.ignore-preflight-errors=SystemVerification", + "--extra-config=kubeadm.ignore-preflight-errors=SystemVerification", }}, } From 63fdde280f441a4cd907f92b38581c5ace119c4a Mon Sep 17 00:00:00 2001 From: Zhongcheng Lao Date: Fri, 9 Aug 2019 23:29:55 +0800 Subject: [PATCH 025/115] Move nested functions out Signed-off-by: Zhongcheng Lao --- pkg/minikube/bootstrapper/certs.go | 86 ++++++++++++++++------------- pkg/minikube/constants/constants.go | 5 -- 2 files changed, 48 insertions(+), 43 deletions(-) diff --git a/pkg/minikube/bootstrapper/certs.go b/pkg/minikube/bootstrapper/certs.go index 69be5ef652..6af505b505 100644 --- a/pkg/minikube/bootstrapper/certs.go +++ b/pkg/minikube/bootstrapper/certs.go @@ -38,6 +38,11 @@ import ( "k8s.io/minikube/pkg/util" ) +const ( + CACertificatesDir = "/usr/share/ca-certificates" + SSLCertStoreDir = "/etc/ssl/certs" +) + var ( certs = []string{ "ca.crt", "ca.key", "apiserver.crt", "apiserver.key", "proxy-client-ca.crt", @@ -219,31 +224,33 @@ func generateCerts(k8s config.KubernetesConfig) error { return nil } -func collectCACerts() (map[string]string, error) { - localPath := constants.GetMinipath() - - isValidPem := func(hostpath string) (bool, error) { - fileBytes, err := ioutil.ReadFile(hostpath) - if err != nil { - return false, err - } - - for { - block, rest := pem.Decode(fileBytes) - if block == nil { - break - } - - if block.Type == "CERTIFICATE" { - // certificate found - return true, nil - } - fileBytes = rest - } - - return false, nil +// isValidPEMCertificate checks whether the input file is a valid PEM certificate (with at least one CERTIFICATE block) +func isValidPEMCertificate(filePath string) (bool, error) { + fileBytes, err := ioutil.ReadFile(filePath) + if err != nil { + return false, err } + for { + block, rest := pem.Decode(fileBytes) + if block == nil { + break + } + + if block.Type == "CERTIFICATE" { + // certificate found + return true, nil + } + fileBytes = rest + } + + return false, nil +} + +// collectCACerts looks up all PEM certificates with .crt or .pem extension in ~/.minikube/certs to copy to the host. +// Minikube root CA is also included but libmachine certificates (ca.pem/cert.pem) are excluded. +func collectCACerts() (map[string]string, error) { + localPath := constants.GetMinipath() certFiles := map[string]string{} certsDir := filepath.Join(localPath, "certs") @@ -255,14 +262,14 @@ func collectCACerts() (map[string]string, error) { if info != nil && !info.IsDir() { ext := strings.ToLower(filepath.Ext(hostpath)) if ext == ".crt" || ext == ".pem" { - validPem, err := isValidPem(hostpath) + validPem, err := isValidPEMCertificate(hostpath) if err != nil { return err } if validPem { filename := filepath.Base(hostpath) dst := fmt.Sprintf("%s.%s", strings.TrimSuffix(filename, ext), "pem") - certFiles[hostpath] = path.Join(constants.CACertificatesDir, dst) + certFiles[hostpath] = path.Join(CACertificatesDir, dst) } } } @@ -277,7 +284,7 @@ func collectCACerts() (map[string]string, error) { } // populates minikube CA - certFiles[filepath.Join(localPath, "ca.crt")] = path.Join(constants.CACertificatesDir, "minikubeCA.pem") + certFiles[filepath.Join(localPath, "ca.crt")] = path.Join(CACertificatesDir, "minikubeCA.pem") filtered := map[string]string{} for k, v := range certFiles { @@ -288,17 +295,20 @@ func collectCACerts() (map[string]string, error) { return filtered, nil } -func configureCACerts(cmd command.Runner, caCerts map[string]string) error { - getSubjectHash := func(hostpath string) (string, error) { - out, err := cmd.CombinedOutput(fmt.Sprintf("openssl x509 -hash -noout -in '%s'", hostpath)) - if err != nil { - return "", err - } - - stringHash := strings.ReplaceAll(out, "\n", "") - return stringHash, nil +// getSubjectHash calculates Certificate Subject Hash for creating certificate symlinks +func getSubjectHash(cmd command.Runner, filePath string) (string, error) { + out, err := cmd.CombinedOutput(fmt.Sprintf("openssl x509 -hash -noout -in '%s'", filePath)) + if err != nil { + return "", err } + stringHash := strings.TrimSpace(out) + return stringHash, nil +} + +// configureCACerts looks up and installs all uploaded PEM certificates in /usr/share/ca-certificates to system-wide certificate store (/etc/ssl/certs). +// OpenSSL binary required in minikube ISO +func configureCACerts(cmd command.Runner, caCerts map[string]string) error { hasSSLBinary := true if err := cmd.Run("which openssl"); err != nil { hasSSLBinary = false @@ -310,18 +320,18 @@ func configureCACerts(cmd command.Runner, caCerts map[string]string) error { for _, caCertFile := range caCerts { dstFilename := path.Base(caCertFile) - certStorePath := path.Join(constants.SSLCertStoreDir, dstFilename) + certStorePath := path.Join(SSLCertStoreDir, dstFilename) if err := cmd.Run(fmt.Sprintf("sudo test -f '%s'", certStorePath)); err != nil { if err := cmd.Run(fmt.Sprintf("sudo ln -s '%s' '%s'", caCertFile, certStorePath)); err != nil { return errors.Wrapf(err, "error making symbol link for certificate %s", caCertFile) } } if hasSSLBinary { - subjectHash, err := getSubjectHash(caCertFile) + subjectHash, err := getSubjectHash(cmd, caCertFile) if err != nil { return errors.Wrapf(err, "error calculating subject hash for certificate %s", caCertFile) } - subjectHashLink := path.Join(constants.SSLCertStoreDir, fmt.Sprintf("%s.0", subjectHash)) + subjectHashLink := path.Join(SSLCertStoreDir, fmt.Sprintf("%s.0", subjectHash)) if err := cmd.Run(fmt.Sprintf("sudo test -f '%s'", subjectHashLink)); err != nil { if err := cmd.Run(fmt.Sprintf("sudo ln -s '%s' '%s'", certStorePath, subjectHashLink)); err != nil { return errors.Wrapf(err, "error making subject hash symbol link for certificate %s", caCertFile) diff --git a/pkg/minikube/constants/constants.go b/pkg/minikube/constants/constants.go index 2045893441..4355276310 100644 --- a/pkg/minikube/constants/constants.go +++ b/pkg/minikube/constants/constants.go @@ -426,8 +426,3 @@ const ( // DriverDocumentation the documentation of the KVM driver DriverDocumentation = "https://github.com/kubernetes/minikube/blob/master/docs/drivers.md" ) - -const ( - CACertificatesDir = "/usr/share/ca-certificates" - SSLCertStoreDir = "/etc/ssl/certs" -) From 253d658ad31f96d7e51a50f15a4ab58716597bc2 Mon Sep 17 00:00:00 2001 From: Zhongcheng Lao Date: Sat, 10 Aug 2019 00:21:47 +0800 Subject: [PATCH 026/115] Fixes test case failure due to moving constants Signed-off-by: Zhongcheng Lao --- pkg/minikube/bootstrapper/certs_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/minikube/bootstrapper/certs_test.go b/pkg/minikube/bootstrapper/certs_test.go index 209388fe67..d3017ceca4 100644 --- a/pkg/minikube/bootstrapper/certs_test.go +++ b/pkg/minikube/bootstrapper/certs_test.go @@ -56,10 +56,10 @@ func TestSetupCerts(t *testing.T) { cmdMap := map[string]string{} certFilenames := map[string]string{"ca.crt": "minikubeCA.pem", "mycert.pem": "mycert.pem"} for _, dst := range certFilenames { - certFile := path.Join(constants.CACertificatesDir, dst) - certStorePath := path.Join(constants.SSLCertStoreDir, dst) + certFile := path.Join(CACertificatesDir, dst) + certStorePath := path.Join(SSLCertStoreDir, dst) certNameHash := "abcdef" - remoteCertHashLink := path.Join(constants.SSLCertStoreDir, fmt.Sprintf("%s.0", certNameHash)) + remoteCertHashLink := path.Join(SSLCertStoreDir, fmt.Sprintf("%s.0", certNameHash)) cmdMap[fmt.Sprintf("sudo ln -s '%s' '%s'", certFile, certStorePath)] = "1" cmdMap[fmt.Sprintf("openssl x509 -hash -noout -in '%s'", certFile)] = certNameHash cmdMap[fmt.Sprintf("sudo ln -s '%s' '%s'", certStorePath, remoteCertHashLink)] = "1" From df624349c3066de842415919ada7110b3802049c Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Tue, 6 Aug 2019 15:31:55 -0700 Subject: [PATCH 027/115] created kubeconfig package --- cmd/minikube/cmd/config/profile.go | 4 +- cmd/minikube/cmd/delete.go | 4 +- cmd/minikube/cmd/start.go | 48 ++++------------ cmd/minikube/cmd/status.go | 9 ++- cmd/minikube/cmd/stop.go | 3 +- cmd/minikube/cmd/update-context.go | 4 +- cmd/util/util.go | 9 --- cmd/util/util_test.go | 47 ---------------- pkg/minikube/bootstrapper/certs.go | 5 +- pkg/minikube/bootstrapper/kubeadm/kubeadm.go | 2 +- pkg/minikube/constants/constants.go | 2 +- .../kubeconfig}/kubeconfig.go | 25 ++++++--- .../kubeconfig}/kubeconfig_test.go | 32 ++++++++++- pkg/minikube/kubeconfig/update.go | 56 +++++++++++++++++++ pkg/util/constants.go | 1 - 15 files changed, 130 insertions(+), 121 deletions(-) delete mode 100644 cmd/util/util_test.go rename pkg/{util => minikube/kubeconfig}/kubeconfig.go (93%) rename pkg/{util => minikube/kubeconfig}/kubeconfig_test.go (95%) create mode 100644 pkg/minikube/kubeconfig/update.go diff --git a/cmd/minikube/cmd/config/profile.go b/cmd/minikube/cmd/config/profile.go index c15be55847..d80b41cd77 100644 --- a/cmd/minikube/cmd/config/profile.go +++ b/cmd/minikube/cmd/config/profile.go @@ -24,8 +24,8 @@ import ( pkgConfig "k8s.io/minikube/pkg/minikube/config" "k8s.io/minikube/pkg/minikube/constants" "k8s.io/minikube/pkg/minikube/exit" + "k8s.io/minikube/pkg/minikube/kubeconfig" "k8s.io/minikube/pkg/minikube/out" - pkgutil "k8s.io/minikube/pkg/util" ) // ProfileCmd represents the profile command @@ -62,7 +62,7 @@ var ProfileCmd = &cobra.Command{ out.SuccessT("Skipped switching kubectl context for {{.profile_name}} , because --keep-context", out.V{"profile_name": profile}) out.SuccessT("To connect to this cluster, use: kubectl --context={{.profile_name}}", out.V{"profile_name": profile}) } else { - err := pkgutil.SetCurrentContext(constants.KubeconfigPath, profile) + err := kubeconfig.SetCurrentContext(constants.KubeconfigPath, profile) if err != nil { out.ErrT(out.Sad, `Error while setting kubectl current context : {{.error}}`, out.V{"error": err}) } diff --git a/cmd/minikube/cmd/delete.go b/cmd/minikube/cmd/delete.go index d94a6c3a3b..72f40a4068 100644 --- a/cmd/minikube/cmd/delete.go +++ b/cmd/minikube/cmd/delete.go @@ -30,9 +30,9 @@ import ( pkg_config "k8s.io/minikube/pkg/minikube/config" "k8s.io/minikube/pkg/minikube/constants" "k8s.io/minikube/pkg/minikube/exit" + "k8s.io/minikube/pkg/minikube/kubeconfig" "k8s.io/minikube/pkg/minikube/machine" "k8s.io/minikube/pkg/minikube/out" - pkgutil "k8s.io/minikube/pkg/util" ) // deleteCmd represents the delete command @@ -89,7 +89,7 @@ func runDelete(cmd *cobra.Command, args []string) { out.T(out.Crushed, `The "{{.cluster_name}}" cluster has been deleted.`, out.V{"cluster_name": profile}) machineName := pkg_config.GetMachineName() - if err := pkgutil.DeleteKubeConfigContext(constants.KubeconfigPath, machineName); err != nil { + if err := kubeconfig.DeleteKubeConfigContext(constants.KubeconfigPath, machineName); err != nil { exit.WithError("update config", err) } diff --git a/cmd/minikube/cmd/start.go b/cmd/minikube/cmd/start.go index 9c73cf02be..75712ac641 100644 --- a/cmd/minikube/cmd/start.go +++ b/cmd/minikube/cmd/start.go @@ -33,6 +33,7 @@ import ( "time" "k8s.io/minikube/pkg/minikube/drivers/none" + "k8s.io/minikube/pkg/minikube/kubeconfig" "github.com/blang/semver" "github.com/docker/machine/libmachine" @@ -46,7 +47,6 @@ import ( "github.com/spf13/viper" "golang.org/x/sync/errgroup" cmdcfg "k8s.io/minikube/cmd/minikube/cmd/config" - cmdutil "k8s.io/minikube/cmd/util" "k8s.io/minikube/pkg/minikube/bootstrapper" "k8s.io/minikube/pkg/minikube/bootstrapper/kubeadm" "k8s.io/minikube/pkg/minikube/cluster" @@ -97,12 +97,12 @@ const ( uuid = "uuid" vpnkitSock = "hyperkit-vpnkit-sock" vsockPorts = "hyperkit-vsock-ports" - embedCerts = "embed-certs" - noVTXCheck = "no-vtx-check" - downloadOnly = "download-only" - dnsProxy = "dns-proxy" - hostDNSResolver = "host-dns-resolver" - waitUntilHealthy = "wait" + // embedCerts = "embed-certs" //TODO medya + noVTXCheck = "no-vtx-check" + downloadOnly = "download-only" + dnsProxy = "dns-proxy" + hostDNSResolver = "host-dns-resolver" + waitUntilHealthy = "wait" ) var ( @@ -160,7 +160,7 @@ func initKubernetesFlags() { Valid kubeadm parameters: `+fmt.Sprintf("%s, %s", strings.Join(kubeadm.KubeadmExtraArgsWhitelist[kubeadm.KubeadmCmdParam], ", "), strings.Join(kubeadm.KubeadmExtraArgsWhitelist[kubeadm.KubeadmConfigParam], ","))) startCmd.Flags().String(featureGates, "", "A set of key=value pairs that describe feature gates for alpha/experimental features.") startCmd.Flags().String(dnsDomain, constants.ClusterDNSDomain, "The cluster dns domain name used in the kubernetes cluster") - startCmd.Flags().Int(apiServerPort, pkgutil.APIServerPort, "The apiserver listening port") + startCmd.Flags().Int(apiServerPort, constants.APIServerPort, "The apiserver listening port") startCmd.Flags().String(apiServerName, constants.APIServerName, "The apiserver name which is used in the generated certificate for kubernetes. This can be used if you want to make the apiserver available from outside the machine") startCmd.Flags().StringArrayVar(&apiServerNames, "apiserver-names", nil, "A set of apiserver names which are used in the generated certificate for kubernetes. This can be used if you want to make the apiserver available from outside the machine") startCmd.Flags().IPSliceVar(&apiServerIPs, "apiserver-ips", nil, "A set of apiserver IP Addresses which are used in the generated certificate for kubernetes. This can be used if you want to make the apiserver available from outside the machine") @@ -306,7 +306,7 @@ func runStart(cmd *cobra.Command, args []string) { // setup kube adm and certs and return bootstrapperx bs := setupKubeAdm(machineAPI, config.KubernetesConfig) // The kube config must be update must come before bootstrapping, otherwise health checks may use a stale IP - kubeconfig := updateKubeConfig(host, &config) + kubeconfig := kubeconfig.Update(host, &config) // pull images or restart cluster bootstrapCluster(bs, cr, mRunner, config.KubernetesConfig, preExists, isUpgrade) configureMounts() @@ -401,7 +401,7 @@ func showVersionInfo(k8sVersion string, cr cruntime.Manager) { } } -func showKubectlConnectInfo(kubeconfig *pkgutil.KubeConfigSetup) { +func showKubectlConnectInfo(kubeconfig *kubeconfig.KubeConfigSetup) { if kubeconfig.KeepContext { out.T(out.Kubectl, "To connect to this cluster, use: kubectl --context={{.name}}", out.V{"name": kubeconfig.ClusterName}) } else { @@ -813,34 +813,6 @@ func setupKubeAdm(mAPI libmachine.API, kc cfg.KubernetesConfig) bootstrapper.Boo return bs } -// updateKubeConfig sets up kubectl -func updateKubeConfig(h *host.Host, c *cfg.Config) *pkgutil.KubeConfigSetup { - addr, err := h.Driver.GetURL() - if err != nil { - exit.WithError("Failed to get driver URL", err) - } - addr = strings.Replace(addr, "tcp://", "https://", -1) - addr = strings.Replace(addr, ":2376", ":"+strconv.Itoa(c.KubernetesConfig.NodePort), -1) - if c.KubernetesConfig.APIServerName != constants.APIServerName { - addr = strings.Replace(addr, c.KubernetesConfig.NodeIP, c.KubernetesConfig.APIServerName, -1) - } - - kcs := &pkgutil.KubeConfigSetup{ - ClusterName: cfg.GetMachineName(), - ClusterServerAddress: addr, - ClientCertificate: constants.MakeMiniPath("client.crt"), - ClientKey: constants.MakeMiniPath("client.key"), - CertificateAuthority: constants.MakeMiniPath("ca.crt"), - KeepContext: viper.GetBool(keepContext), - EmbedCerts: viper.GetBool(embedCerts), - } - kcs.SetKubeConfigFile(cmdutil.GetKubeConfigPath()) - if err := pkgutil.SetupKubeConfig(kcs); err != nil { - exit.WithError("Failed to setup kubeconfig", err) - } - return kcs -} - // configureRuntimes does what needs to happen to get a runtime going. func configureRuntimes(runner cruntime.CommandRunner) cruntime.Manager { config := cruntime.Config{Type: viper.GetString(containerRuntime), Runner: runner} diff --git a/cmd/minikube/cmd/status.go b/cmd/minikube/cmd/status.go index 3cc00ce6c1..6fa7c60d74 100644 --- a/cmd/minikube/cmd/status.go +++ b/cmd/minikube/cmd/status.go @@ -25,14 +25,13 @@ import ( "github.com/spf13/cobra" "github.com/spf13/viper" cmdcfg "k8s.io/minikube/cmd/minikube/cmd/config" - "k8s.io/minikube/cmd/util" "k8s.io/minikube/pkg/minikube/cluster" "k8s.io/minikube/pkg/minikube/config" "k8s.io/minikube/pkg/minikube/constants" "k8s.io/minikube/pkg/minikube/exit" + "k8s.io/minikube/pkg/minikube/kubeconfig" "k8s.io/minikube/pkg/minikube/machine" "k8s.io/minikube/pkg/minikube/out" - pkgutil "k8s.io/minikube/pkg/util" ) var statusFormat string @@ -93,10 +92,10 @@ var statusCmd = &cobra.Command{ glog.Errorln("Error host driver ip status:", err) } - apiserverPort, err := pkgutil.GetPortFromKubeConfig(util.GetKubeConfigPath(), config.GetMachineName()) + apiserverPort, err := kubeconfig.GetPortFromKubeConfig(kubeconfig.GetKubeConfigPath(), config.GetMachineName()) if err != nil { // Fallback to presuming default apiserver port - apiserverPort = pkgutil.APIServerPort + apiserverPort = constants.APIServerPort } apiserverSt, err = clusterBootstrapper.GetAPIServerStatus(ip, apiserverPort) @@ -106,7 +105,7 @@ var statusCmd = &cobra.Command{ returnCode |= clusterNotRunningStatusFlag } - ks, err := pkgutil.GetKubeConfigStatus(ip, util.GetKubeConfigPath(), config.GetMachineName()) + ks, err := kubeconfig.GetKubeConfigStatus(ip, kubeconfig.GetKubeConfigPath(), config.GetMachineName()) if err != nil { glog.Errorln("Error kubeconfig status:", err) } diff --git a/cmd/minikube/cmd/stop.go b/cmd/minikube/cmd/stop.go index 139d155d58..1e925c1855 100644 --- a/cmd/minikube/cmd/stop.go +++ b/cmd/minikube/cmd/stop.go @@ -28,6 +28,7 @@ import ( pkg_config "k8s.io/minikube/pkg/minikube/config" "k8s.io/minikube/pkg/minikube/constants" "k8s.io/minikube/pkg/minikube/exit" + "k8s.io/minikube/pkg/minikube/kubeconfig" "k8s.io/minikube/pkg/minikube/machine" "k8s.io/minikube/pkg/minikube/out" pkgutil "k8s.io/minikube/pkg/util" @@ -76,7 +77,7 @@ func runStop(cmd *cobra.Command, args []string) { } machineName := pkg_config.GetMachineName() - err = pkgutil.UnsetCurrentContext(constants.KubeconfigPath, machineName) + err = kubeconfig.UnsetCurrentContext(constants.KubeconfigPath, machineName) if err != nil { exit.WithError("update config", err) } diff --git a/cmd/minikube/cmd/update-context.go b/cmd/minikube/cmd/update-context.go index 94743d5c74..c0ae6a23ab 100644 --- a/cmd/minikube/cmd/update-context.go +++ b/cmd/minikube/cmd/update-context.go @@ -22,9 +22,9 @@ import ( "k8s.io/minikube/pkg/minikube/config" "k8s.io/minikube/pkg/minikube/constants" "k8s.io/minikube/pkg/minikube/exit" + "k8s.io/minikube/pkg/minikube/kubeconfig" "k8s.io/minikube/pkg/minikube/machine" "k8s.io/minikube/pkg/minikube/out" - "k8s.io/minikube/pkg/util" ) // updateContextCmd represents the update-context command @@ -44,7 +44,7 @@ var updateContextCmd = &cobra.Command{ if err != nil { exit.WithError("Error host driver ip status", err) } - updated, err := util.UpdateKubeconfigIP(ip, constants.KubeconfigPath, machineName) + updated, err := kubeconfig.UpdateKubeconfigIP(ip, constants.KubeconfigPath, machineName) if err != nil { exit.WithError("update config", err) } diff --git a/cmd/util/util.go b/cmd/util/util.go index ca103bfca1..d93729c0c4 100644 --- a/cmd/util/util.go +++ b/cmd/util/util.go @@ -93,12 +93,3 @@ func KillMountProcess() error { } return nil } - -// GetKubeConfigPath gets the path to the first kubeconfig -func GetKubeConfigPath() string { - kubeConfigEnv := os.Getenv(constants.KubeconfigEnvVar) - if kubeConfigEnv == "" { - return constants.KubeconfigPath - } - return filepath.SplitList(kubeConfigEnv)[0] -} diff --git a/cmd/util/util_test.go b/cmd/util/util_test.go deleted file mode 100644 index 315762078b..0000000000 --- a/cmd/util/util_test.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors All rights reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package util - -import ( - "os" - "testing" - - "k8s.io/client-go/tools/clientcmd" -) - -func TestGetKubeConfigPath(t *testing.T) { - var tests = []struct { - input string - want string - }{ - { - input: "/home/fake/.kube/.kubeconfig", - want: "/home/fake/.kube/.kubeconfig", - }, - { - input: "/home/fake/.kube/.kubeconfig:/home/fake2/.kubeconfig", - want: "/home/fake/.kube/.kubeconfig", - }, - } - - for _, test := range tests { - os.Setenv(clientcmd.RecommendedConfigPathEnvVar, test.input) - if result := GetKubeConfigPath(); result != test.want { - t.Errorf("Expected first splitted chunk, got: %s", result) - } - } -} diff --git a/pkg/minikube/bootstrapper/certs.go b/pkg/minikube/bootstrapper/certs.go index b24f2e7d83..68542d3770 100644 --- a/pkg/minikube/bootstrapper/certs.go +++ b/pkg/minikube/bootstrapper/certs.go @@ -32,6 +32,7 @@ import ( "k8s.io/minikube/pkg/minikube/command" "k8s.io/minikube/pkg/minikube/config" "k8s.io/minikube/pkg/minikube/constants" + "k8s.io/minikube/pkg/minikube/kubeconfig" "k8s.io/minikube/pkg/util" ) @@ -66,7 +67,7 @@ func SetupCerts(cmd command.Runner, k8s config.KubernetesConfig) error { copyableFiles = append(copyableFiles, certFile) } - kubeCfgSetup := &util.KubeConfigSetup{ + kubeCfgSetup := &kubeconfig.KubeConfigSetup{ ClusterName: k8s.NodeName, ClusterServerAddress: fmt.Sprintf("https://localhost:%d", k8s.NodePort), ClientCertificate: path.Join(util.DefaultCertPath, "apiserver.crt"), @@ -76,7 +77,7 @@ func SetupCerts(cmd command.Runner, k8s config.KubernetesConfig) error { } kubeCfg := api.NewConfig() - err := util.PopulateKubeConfig(kubeCfgSetup, kubeCfg) + err := kubeconfig.PopulateKubeConfig(kubeCfgSetup, kubeCfg) if err != nil { return errors.Wrap(err, "populating kubeconfig") } diff --git a/pkg/minikube/bootstrapper/kubeadm/kubeadm.go b/pkg/minikube/bootstrapper/kubeadm/kubeadm.go index 9e45a9f963..e7a4191323 100644 --- a/pkg/minikube/bootstrapper/kubeadm/kubeadm.go +++ b/pkg/minikube/bootstrapper/kubeadm/kubeadm.go @@ -567,7 +567,7 @@ func generateConfig(k8s config.KubernetesConfig, r cruntime.Manager) (string, er // In case of no port assigned, use util.APIServerPort nodePort := k8s.NodePort if nodePort <= 0 { - nodePort = util.APIServerPort + nodePort = constants.APIServerPort } opts := struct { diff --git a/pkg/minikube/constants/constants.go b/pkg/minikube/constants/constants.go index b2cbd0680d..cbd0497c2f 100644 --- a/pkg/minikube/constants/constants.go +++ b/pkg/minikube/constants/constants.go @@ -31,8 +31,8 @@ import ( minikubeVersion "k8s.io/minikube/pkg/version" ) -// APIServerPort is the port that the API server should listen on. const ( + APIServerPort = 8443 APIServerName = "minikubeCA" ClusterDNSDomain = "cluster.local" ) diff --git a/pkg/util/kubeconfig.go b/pkg/minikube/kubeconfig/kubeconfig.go similarity index 93% rename from pkg/util/kubeconfig.go rename to pkg/minikube/kubeconfig/kubeconfig.go index bf5f68ea99..bf1962846c 100644 --- a/pkg/util/kubeconfig.go +++ b/pkg/minikube/kubeconfig/kubeconfig.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2019 The Kubernetes Authors All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package util +package kubeconfig import ( "fmt" @@ -31,6 +31,8 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/tools/clientcmd/api" "k8s.io/client-go/tools/clientcmd/api/latest" + "k8s.io/minikube/pkg/minikube/constants" + pkgutil "k8s.io/minikube/pkg/util" ) // KubeConfigSetup is the kubeconfig setup @@ -199,7 +201,7 @@ func WriteConfig(config *api.Config, filename string) error { if err := ioutil.WriteFile(filename, data, 0600); err != nil { return errors.Wrapf(err, "Error writing file %s", filename) } - if err := MaybeChownDirRecursiveToMinikubeUser(dir); err != nil { + if err := pkgutil.MaybeChownDirRecursiveToMinikubeUser(dir); err != nil { return errors.Wrapf(err, "Error recursively changing ownership for dir: %s", dir) } @@ -225,7 +227,7 @@ func decode(data []byte) (*api.Config, error) { // GetKubeConfigStatus verifies the ip stored in kubeconfig. func GetKubeConfigStatus(ip net.IP, filename string, machineName string) (bool, error) { if ip == nil { - return false, fmt.Errorf("Error, empty ip passed") + return false, fmt.Errorf("error, empty ip passed") } kip, err := getIPFromKubeConfig(filename, machineName) if err != nil { @@ -242,7 +244,7 @@ func GetKubeConfigStatus(ip net.IP, filename string, machineName string) (bool, // UpdateKubeconfigIP overwrites the IP stored in kubeconfig with the provided IP. func UpdateKubeconfigIP(ip net.IP, filename string, machineName string) (bool, error) { if ip == nil { - return false, fmt.Errorf("Error, empty ip passed") + return false, fmt.Errorf("error, empty ip passed") } kip, err := getIPFromKubeConfig(filename, machineName) if err != nil { @@ -303,11 +305,11 @@ func GetPortFromKubeConfig(filename, machineName string) (int, error) { } kurl, err := url.Parse(cluster.Server) if err != nil { - return APIServerPort, nil + return constants.APIServerPort, nil } _, kport, err := net.SplitHostPort(kurl.Host) if err != nil { - return APIServerPort, nil + return constants.APIServerPort, nil } port, err := strconv.Atoi(kport) return port, err @@ -370,3 +372,12 @@ func DeleteKubeConfigContext(kubeCfgPath, machineName string) error { } return nil } + +// GetKubeConfigPath gets the path to the first kubeconfig +func GetKubeConfigPath() string { + kubeConfigEnv := os.Getenv(constants.KubeconfigEnvVar) + if kubeConfigEnv == "" { + return constants.KubeconfigPath + } + return filepath.SplitList(kubeConfigEnv)[0] +} diff --git a/pkg/util/kubeconfig_test.go b/pkg/minikube/kubeconfig/kubeconfig_test.go similarity index 95% rename from pkg/util/kubeconfig_test.go rename to pkg/minikube/kubeconfig/kubeconfig_test.go index 3f427f5121..5bc641b518 100644 --- a/pkg/util/kubeconfig_test.go +++ b/pkg/minikube/kubeconfig/kubeconfig_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2019 The Kubernetes Authors All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package util +package kubeconfig import ( "io/ioutil" @@ -25,6 +25,9 @@ import ( "testing" "k8s.io/client-go/tools/clientcmd/api" + "k8s.io/minikube/pkg/minikube/bootstrapper/kubeadm" + + "k8s.io/client-go/tools/clientcmd" ) var fakeKubeCfg = []byte(` @@ -521,7 +524,7 @@ func minikubeConfig(config *api.Config) { // cluster clusterName := "minikube" cluster := api.NewCluster() - cluster.Server = "https://192.168.99.100:" + strconv.Itoa(APIServerPort) + cluster.Server = "https://192.168.99.100:" + strconv.Itoa(kubeadm.APIServerPort) cluster.CertificateAuthority = "/home/tux/.minikube/apiserver.crt" config.Clusters[clusterName] = cluster @@ -663,3 +666,26 @@ func contextEquals(aContext, bContext *api.Context) bool { } return true } + +func TestGetKubeConfigPath(t *testing.T) { + var tests = []struct { + input string + want string + }{ + { + input: "/home/fake/.kube/.kubeconfig", + want: "/home/fake/.kube/.kubeconfig", + }, + { + input: "/home/fake/.kube/.kubeconfig:/home/fake2/.kubeconfig", + want: "/home/fake/.kube/.kubeconfig", + }, + } + + for _, test := range tests { + os.Setenv(clientcmd.RecommendedConfigPathEnvVar, test.input) + if result := GetKubeConfigPath(); result != test.want { + t.Errorf("Expected first splitted chunk, got: %s", result) + } + } +} diff --git a/pkg/minikube/kubeconfig/update.go b/pkg/minikube/kubeconfig/update.go new file mode 100644 index 0000000000..73f4850d16 --- /dev/null +++ b/pkg/minikube/kubeconfig/update.go @@ -0,0 +1,56 @@ +/* +Copyright 2019 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kubeconfig + +import ( + "strconv" + "strings" + + "github.com/docker/machine/libmachine/host" + "github.com/spf13/viper" + cfg "k8s.io/minikube/pkg/minikube/config" + "k8s.io/minikube/pkg/minikube/constants" + "k8s.io/minikube/pkg/minikube/exit" +) + +// Update sets up kubeconfig to be used by kubectl +func Update(h *host.Host, c *cfg.Config) *KubeConfigSetup { + addr, err := h.Driver.GetURL() + if err != nil { + exit.WithError("Failed to get driver URL", err) + } + addr = strings.Replace(addr, "tcp://", "https://", -1) + addr = strings.Replace(addr, ":2376", ":"+strconv.Itoa(c.KubernetesConfig.NodePort), -1) + if c.KubernetesConfig.APIServerName != constants.APIServerName { + addr = strings.Replace(addr, c.KubernetesConfig.NodeIP, c.KubernetesConfig.APIServerName, -1) + } + + kcs := &KubeConfigSetup{ + ClusterName: cfg.GetMachineName(), + ClusterServerAddress: addr, + ClientCertificate: constants.MakeMiniPath("client.crt"), + ClientKey: constants.MakeMiniPath("client.key"), + CertificateAuthority: constants.MakeMiniPath("ca.crt"), + KeepContext: viper.GetBool("keep-context"), + EmbedCerts: viper.GetBool("embed-certs"), + } + kcs.SetKubeConfigFile(GetKubeConfigPath()) + if err := SetupKubeConfig(kcs); err != nil { + exit.WithError("Failed to setup kubeconfig", err) + } + return kcs +} diff --git a/pkg/util/constants.go b/pkg/util/constants.go index 92f0c29bf5..c72d40065c 100644 --- a/pkg/util/constants.go +++ b/pkg/util/constants.go @@ -24,7 +24,6 @@ import ( // These constants are used by both minikube const ( - APIServerPort = 8443 DefaultMinikubeDirectory = "/var/lib/minikube" DefaultCertPath = DefaultMinikubeDirectory + "/certs/" DefaultKubeConfigPath = DefaultMinikubeDirectory + "/kubeconfig" From ffe573ec48de2464692ebf38465ac70cc85a523f Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Tue, 6 Aug 2019 15:43:16 -0700 Subject: [PATCH 028/115] fixed stutter --- cmd/minikube/cmd/start.go | 2 +- pkg/minikube/bootstrapper/certs.go | 2 +- pkg/minikube/kubeconfig/kubeconfig.go | 12 ++++++------ pkg/minikube/kubeconfig/kubeconfig_test.go | 10 +++++----- pkg/minikube/kubeconfig/update.go | 4 ++-- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/cmd/minikube/cmd/start.go b/cmd/minikube/cmd/start.go index 75712ac641..df2ccfe02c 100644 --- a/cmd/minikube/cmd/start.go +++ b/cmd/minikube/cmd/start.go @@ -401,7 +401,7 @@ func showVersionInfo(k8sVersion string, cr cruntime.Manager) { } } -func showKubectlConnectInfo(kubeconfig *kubeconfig.KubeConfigSetup) { +func showKubectlConnectInfo(kubeconfig *kubeconfig.Setup) { if kubeconfig.KeepContext { out.T(out.Kubectl, "To connect to this cluster, use: kubectl --context={{.name}}", out.V{"name": kubeconfig.ClusterName}) } else { diff --git a/pkg/minikube/bootstrapper/certs.go b/pkg/minikube/bootstrapper/certs.go index 68542d3770..29f768cbc8 100644 --- a/pkg/minikube/bootstrapper/certs.go +++ b/pkg/minikube/bootstrapper/certs.go @@ -67,7 +67,7 @@ func SetupCerts(cmd command.Runner, k8s config.KubernetesConfig) error { copyableFiles = append(copyableFiles, certFile) } - kubeCfgSetup := &kubeconfig.KubeConfigSetup{ + kubeCfgSetup := &kubeconfig.Setup{ ClusterName: k8s.NodeName, ClusterServerAddress: fmt.Sprintf("https://localhost:%d", k8s.NodePort), ClientCertificate: path.Join(util.DefaultCertPath, "apiserver.crt"), diff --git a/pkg/minikube/kubeconfig/kubeconfig.go b/pkg/minikube/kubeconfig/kubeconfig.go index bf1962846c..3e3900b887 100644 --- a/pkg/minikube/kubeconfig/kubeconfig.go +++ b/pkg/minikube/kubeconfig/kubeconfig.go @@ -35,8 +35,8 @@ import ( pkgutil "k8s.io/minikube/pkg/util" ) -// KubeConfigSetup is the kubeconfig setup -type KubeConfigSetup struct { +// Setup is the kubeconfig setup +type Setup struct { // The name of the cluster for this context ClusterName string @@ -64,17 +64,17 @@ type KubeConfigSetup struct { } // SetKubeConfigFile sets the kubeconfig file -func (k *KubeConfigSetup) SetKubeConfigFile(kubeConfigFile string) { +func (k *Setup) SetKubeConfigFile(kubeConfigFile string) { k.kubeConfigFile.Store(kubeConfigFile) } // GetKubeConfigFile gets the kubeconfig file -func (k *KubeConfigSetup) GetKubeConfigFile() string { +func (k *Setup) GetKubeConfigFile() string { return k.kubeConfigFile.Load().(string) } // PopulateKubeConfig populates an api.Config object. -func PopulateKubeConfig(cfg *KubeConfigSetup, kubecfg *api.Config) error { +func PopulateKubeConfig(cfg *Setup, kubecfg *api.Config) error { var err error clusterName := cfg.ClusterName cluster := api.NewCluster() @@ -125,7 +125,7 @@ func PopulateKubeConfig(cfg *KubeConfigSetup, kubecfg *api.Config) error { // SetupKubeConfig reads config from disk, adds the minikube settings, and writes it back. // activeContext is true when minikube is the CurrentContext // If no CurrentContext is set, the given name will be used. -func SetupKubeConfig(cfg *KubeConfigSetup) error { +func SetupKubeConfig(cfg *Setup) error { glog.Infoln("Using kubeconfig: ", cfg.GetKubeConfigFile()) // read existing config or create new if does not exist diff --git a/pkg/minikube/kubeconfig/kubeconfig_test.go b/pkg/minikube/kubeconfig/kubeconfig_test.go index 5bc641b518..7c580f4233 100644 --- a/pkg/minikube/kubeconfig/kubeconfig_test.go +++ b/pkg/minikube/kubeconfig/kubeconfig_test.go @@ -25,7 +25,7 @@ import ( "testing" "k8s.io/client-go/tools/clientcmd/api" - "k8s.io/minikube/pkg/minikube/bootstrapper/kubeadm" + "k8s.io/minikube/pkg/minikube/constants" "k8s.io/client-go/tools/clientcmd" ) @@ -97,7 +97,7 @@ users: `) func TestSetupKubeConfig(t *testing.T) { - setupCfg := &KubeConfigSetup{ + setupCfg := &Setup{ ClusterName: "test", ClusterServerAddress: "192.168.1.1:8080", ClientCertificate: "/home/apiserver.crt", @@ -108,7 +108,7 @@ func TestSetupKubeConfig(t *testing.T) { var tests = []struct { description string - cfg *KubeConfigSetup + cfg *Setup existingCfg []byte expected api.Config err bool @@ -128,7 +128,7 @@ func TestSetupKubeConfig(t *testing.T) { }, { description: "keep context", - cfg: &KubeConfigSetup{ + cfg: &Setup{ ClusterName: "test", ClusterServerAddress: "192.168.1.1:8080", ClientCertificate: "/home/apiserver.crt", @@ -524,7 +524,7 @@ func minikubeConfig(config *api.Config) { // cluster clusterName := "minikube" cluster := api.NewCluster() - cluster.Server = "https://192.168.99.100:" + strconv.Itoa(kubeadm.APIServerPort) + cluster.Server = "https://192.168.99.100:" + strconv.Itoa(constants.APIServerPort) cluster.CertificateAuthority = "/home/tux/.minikube/apiserver.crt" config.Clusters[clusterName] = cluster diff --git a/pkg/minikube/kubeconfig/update.go b/pkg/minikube/kubeconfig/update.go index 73f4850d16..c1b75a4886 100644 --- a/pkg/minikube/kubeconfig/update.go +++ b/pkg/minikube/kubeconfig/update.go @@ -28,7 +28,7 @@ import ( ) // Update sets up kubeconfig to be used by kubectl -func Update(h *host.Host, c *cfg.Config) *KubeConfigSetup { +func Update(h *host.Host, c *cfg.Config) *Setup { addr, err := h.Driver.GetURL() if err != nil { exit.WithError("Failed to get driver URL", err) @@ -39,7 +39,7 @@ func Update(h *host.Host, c *cfg.Config) *KubeConfigSetup { addr = strings.Replace(addr, c.KubernetesConfig.NodeIP, c.KubernetesConfig.APIServerName, -1) } - kcs := &KubeConfigSetup{ + kcs := &Setup{ ClusterName: cfg.GetMachineName(), ClusterServerAddress: addr, ClientCertificate: constants.MakeMiniPath("client.crt"), From fd628eb8db88e22872b0a30e8406ef335882271d Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Tue, 6 Aug 2019 16:22:25 -0700 Subject: [PATCH 029/115] statisfy lint interfacer --- pkg/minikube/kubeconfig/kubeconfig.go | 77 +++++++--------------- pkg/minikube/kubeconfig/kubeconfig_test.go | 22 +++---- pkg/minikube/kubeconfig/setup.go | 57 ++++++++++++++++ 3 files changed, 92 insertions(+), 64 deletions(-) create mode 100644 pkg/minikube/kubeconfig/setup.go diff --git a/pkg/minikube/kubeconfig/kubeconfig.go b/pkg/minikube/kubeconfig/kubeconfig.go index 3e3900b887..c8cdef07b3 100644 --- a/pkg/minikube/kubeconfig/kubeconfig.go +++ b/pkg/minikube/kubeconfig/kubeconfig.go @@ -24,7 +24,6 @@ import ( "os" "path/filepath" "strconv" - "sync/atomic" "github.com/golang/glog" "github.com/pkg/errors" @@ -35,44 +34,6 @@ import ( pkgutil "k8s.io/minikube/pkg/util" ) -// Setup is the kubeconfig setup -type Setup struct { - // The name of the cluster for this context - ClusterName string - - // ClusterServerAddress is the address of the kubernetes cluster - ClusterServerAddress string - - // ClientCertificate is the path to a client cert file for TLS. - ClientCertificate string - - // CertificateAuthority is the path to a cert file for the certificate authority. - CertificateAuthority string - - // ClientKey is the path to a client key file for TLS. - ClientKey string - - // Should the current context be kept when setting up this one - KeepContext bool - - // Should the certificate files be embedded instead of referenced by path - EmbedCerts bool - - // kubeConfigFile is the path where the kube config is stored - // Only access this with atomic ops - kubeConfigFile atomic.Value -} - -// SetKubeConfigFile sets the kubeconfig file -func (k *Setup) SetKubeConfigFile(kubeConfigFile string) { - k.kubeConfigFile.Store(kubeConfigFile) -} - -// GetKubeConfigFile gets the kubeconfig file -func (k *Setup) GetKubeConfigFile() string { - return k.kubeConfigFile.Load().(string) -} - // PopulateKubeConfig populates an api.Config object. func PopulateKubeConfig(cfg *Setup, kubecfg *api.Config) error { var err error @@ -129,7 +90,7 @@ func SetupKubeConfig(cfg *Setup) error { glog.Infoln("Using kubeconfig: ", cfg.GetKubeConfigFile()) // read existing config or create new if does not exist - config, err := ReadConfigOrNew(cfg.GetKubeConfigFile()) + config, err := readOrNew(cfg.GetKubeConfigFile()) if err != nil { return err } @@ -140,15 +101,15 @@ func SetupKubeConfig(cfg *Setup) error { } // write back to disk - if err := WriteConfig(config, cfg.GetKubeConfigFile()); err != nil { + if err := writeToFile(config, cfg.GetKubeConfigFile()); err != nil { return errors.Wrap(err, "writing kubeconfig") } return nil } -// ReadConfigOrNew retrieves Kubernetes client configuration from a file. +// readOrNew retrieves Kubernetes client configuration from a file. // If no files exists, an empty configuration is returned. -func ReadConfigOrNew(filename string) (*api.Config, error) { +func readOrNew(filename string) (*api.Config, error) { data, err := ioutil.ReadFile(filename) if os.IsNotExist(err) { return api.NewConfig(), nil @@ -176,9 +137,19 @@ func ReadConfigOrNew(filename string) (*api.Config, error) { return config, nil } +<<<<<<< HEAD // WriteConfig encodes the configuration and writes it to the given file. // If the file exists, its contents will be overwritten. func WriteConfig(config *api.Config, filename string) error { +||||||| merged common ancestors +// WriteConfig encodes the configuration and writes it to the given file. +// If the file exists, it's contents will be overwritten. +func WriteConfig(config *api.Config, filename string) error { +======= +// writeToFile encodes the configuration and writes it to the given file. +// If the file exists, it's contents will be overwritten. +func writeToFile(config runtime.Object, filename string) error { +>>>>>>> statisfy lint interfacer if config == nil { glog.Errorf("could not write to '%s': config can't be nil", filename) } @@ -257,13 +228,13 @@ func UpdateKubeconfigIP(ip net.IP, filename string, machineName string) (bool, e if err != nil { return false, err } - con, err := ReadConfigOrNew(filename) + con, err := readOrNew(filename) if err != nil { return false, errors.Wrap(err, "Error getting kubeconfig status") } // Safe to lookup server because if field non-existent getIPFromKubeconfig would have given an error con.Clusters[machineName].Server = "https://" + ip.String() + ":" + strconv.Itoa(kport) - err = WriteConfig(con, filename) + err = writeToFile(con, filename) if err != nil { return false, err } @@ -273,7 +244,7 @@ func UpdateKubeconfigIP(ip net.IP, filename string, machineName string) (bool, e // getIPFromKubeConfig returns the IP address stored for minikube in the kubeconfig specified func getIPFromKubeConfig(filename, machineName string) (net.IP, error) { - con, err := ReadConfigOrNew(filename) + con, err := readOrNew(filename) if err != nil { return nil, errors.Wrap(err, "Error getting kubeconfig status") } @@ -295,7 +266,7 @@ func getIPFromKubeConfig(filename, machineName string) (net.IP, error) { // GetPortFromKubeConfig returns the Port number stored for minikube in the kubeconfig specified func GetPortFromKubeConfig(filename, machineName string) (int, error) { - con, err := ReadConfigOrNew(filename) + con, err := readOrNew(filename) if err != nil { return 0, errors.Wrap(err, "Error getting kubeconfig status") } @@ -317,7 +288,7 @@ func GetPortFromKubeConfig(filename, machineName string) (int, error) { // UnsetCurrentContext unsets the current-context from minikube to "" on minikube stop func UnsetCurrentContext(filename, machineName string) error { - confg, err := ReadConfigOrNew(filename) + confg, err := readOrNew(filename) if err != nil { return errors.Wrap(err, "Error getting kubeconfig status") } @@ -325,7 +296,7 @@ func UnsetCurrentContext(filename, machineName string) error { // Unset current-context only if profile is the current-context if confg.CurrentContext == machineName { confg.CurrentContext = "" - if err := WriteConfig(confg, filename); err != nil { + if err := writeToFile(confg, filename); err != nil { return errors.Wrap(err, "writing kubeconfig") } return nil @@ -336,12 +307,12 @@ func UnsetCurrentContext(filename, machineName string) error { // SetCurrentContext sets the kubectl's current-context func SetCurrentContext(kubeCfgPath, name string) error { - kcfg, err := ReadConfigOrNew(kubeCfgPath) + kcfg, err := readOrNew(kubeCfgPath) if err != nil { return errors.Wrap(err, "Error getting kubeconfig status") } kcfg.CurrentContext = name - if err := WriteConfig(kcfg, kubeCfgPath); err != nil { + if err := writeToFile(kcfg, kubeCfgPath); err != nil { return errors.Wrap(err, "writing kubeconfig") } return nil @@ -349,7 +320,7 @@ func SetCurrentContext(kubeCfgPath, name string) error { // DeleteKubeConfigContext deletes the specified machine's kubeconfig context func DeleteKubeConfigContext(kubeCfgPath, machineName string) error { - kcfg, err := ReadConfigOrNew(kubeCfgPath) + kcfg, err := readOrNew(kubeCfgPath) if err != nil { return errors.Wrap(err, "Error getting kubeconfig status") } @@ -367,7 +338,7 @@ func DeleteKubeConfigContext(kubeCfgPath, machineName string) error { kcfg.CurrentContext = "" } - if err := WriteConfig(kcfg, kubeCfgPath); err != nil { + if err := writeToFile(kcfg, kubeCfgPath); err != nil { return errors.Wrap(err, "writing kubeconfig") } return nil diff --git a/pkg/minikube/kubeconfig/kubeconfig_test.go b/pkg/minikube/kubeconfig/kubeconfig_test.go index 7c580f4233..cc354ff583 100644 --- a/pkg/minikube/kubeconfig/kubeconfig_test.go +++ b/pkg/minikube/kubeconfig/kubeconfig_test.go @@ -160,7 +160,7 @@ func TestSetupKubeConfig(t *testing.T) { if err == nil && test.err { t.Errorf("Expected error but got none") } - config, err := ReadConfigOrNew(test.cfg.GetKubeConfigFile()) + config, err := readOrNew(test.cfg.GetKubeConfigFile()) if err != nil { t.Errorf("Error reading kubeconfig file: %v", err) } @@ -291,7 +291,7 @@ func TestEmptyConfig(t *testing.T) { tmp := tempFile(t, []byte{}) defer os.Remove(tmp) - cfg, err := ReadConfigOrNew(tmp) + cfg, err := readOrNew(tmp) if err != nil { t.Fatalf("could not read config: %v", err) } @@ -322,12 +322,12 @@ func TestNewConfig(t *testing.T) { // write actual filename := filepath.Join(dir, "config") - err = WriteConfig(expected, filename) + err = writeToFile(expected, filename) if err != nil { t.Fatal(err) } - actual, err := ReadConfigOrNew(filename) + actual, err := readOrNew(filename) if err != nil { t.Fatal(err) } @@ -379,7 +379,7 @@ func TestDeleteKubeConfigContext(t *testing.T) { t.Fatal(err) } - cfg, err := ReadConfigOrNew(configFilename) + cfg, err := readOrNew(configFilename) if err != nil { t.Fatal(err) } @@ -406,7 +406,7 @@ func TestSetCurrentContext(t *testing.T) { } defer os.Remove(kubeConfigFile.Name()) - cfg, err := ReadConfigOrNew(kubeConfigFile.Name()) + cfg, err := readOrNew(kubeConfigFile.Name()) if err != nil { t.Fatalf("Error not expected but got %v", err) } @@ -426,7 +426,7 @@ func TestSetCurrentContext(t *testing.T) { } }() - cfg, err = ReadConfigOrNew(kubeConfigFile.Name()) + cfg, err = readOrNew(kubeConfigFile.Name()) if err != nil { t.Fatalf("Error not expected but got %v", err) } @@ -440,7 +440,7 @@ func TestUnsetCurrentContext(t *testing.T) { kubeConfigFile := "./testdata/kubeconfig/config1" contextName := "minikube" - cfg, err := ReadConfigOrNew(kubeConfigFile) + cfg, err := readOrNew(kubeConfigFile) if err != nil { t.Fatalf("Error not expected but got %v", err) } @@ -460,7 +460,7 @@ func TestUnsetCurrentContext(t *testing.T) { } }() - cfg, err = ReadConfigOrNew(kubeConfigFile) + cfg, err = readOrNew(kubeConfigFile) if err != nil { t.Fatalf("Error not expected but got %v", err) } @@ -474,7 +474,7 @@ func TestUnsetCurrentContextOnlyChangesIfProfileIsTheCurrentContext(t *testing.T contextName := "minikube" kubeConfigFile := "./testdata/kubeconfig/config2" - cfg, err := ReadConfigOrNew(kubeConfigFile) + cfg, err := readOrNew(kubeConfigFile) if err != nil { t.Fatalf("Error not expected but got %v", err) } @@ -488,7 +488,7 @@ func TestUnsetCurrentContextOnlyChangesIfProfileIsTheCurrentContext(t *testing.T t.Fatalf("Error not expected but got %v", err) } - cfg, err = ReadConfigOrNew(kubeConfigFile) + cfg, err = readOrNew(kubeConfigFile) if err != nil { t.Fatalf("Error not expected but got %v", err) } diff --git a/pkg/minikube/kubeconfig/setup.go b/pkg/minikube/kubeconfig/setup.go new file mode 100644 index 0000000000..38d5306e1c --- /dev/null +++ b/pkg/minikube/kubeconfig/setup.go @@ -0,0 +1,57 @@ +/* +Copyright 2019 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kubeconfig + +import "sync/atomic" + +// Setup is the kubeconfig setup +type Setup struct { + // The name of the cluster for this context + ClusterName string + + // ClusterServerAddress is the address of the kubernetes cluster + ClusterServerAddress string + + // ClientCertificate is the path to a client cert file for TLS. + ClientCertificate string + + // CertificateAuthority is the path to a cert file for the certificate authority. + CertificateAuthority string + + // ClientKey is the path to a client key file for TLS. + ClientKey string + + // Should the current context be kept when setting up this one + KeepContext bool + + // Should the certificate files be embedded instead of referenced by path + EmbedCerts bool + + // kubeConfigFile is the path where the kube config is stored + // Only access this with atomic ops + kubeConfigFile atomic.Value +} + +// SetKubeConfigFile sets the kubeconfig file +func (k *Setup) SetKubeConfigFile(kubeConfigFile string) { + k.kubeConfigFile.Store(kubeConfigFile) +} + +// GetKubeConfigFile gets the kubeconfig file +func (k *Setup) GetKubeConfigFile() string { + return k.kubeConfigFile.Load().(string) +} From a54b9629cdf1f27f3deacc3a20b0285eff9443e0 Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Tue, 6 Aug 2019 17:06:18 -0700 Subject: [PATCH 030/115] unexport and rename funcs --- cmd/minikube/cmd/status.go | 4 +- cmd/minikube/cmd/update-context.go | 2 +- pkg/minikube/kubeconfig/kube_context.go | 81 +++++++++++++++ pkg/minikube/kubeconfig/kubeconfig.go | 110 +++++---------------- pkg/minikube/kubeconfig/kubeconfig_test.go | 14 +-- pkg/minikube/kubeconfig/setup.go | 6 +- pkg/minikube/kubeconfig/update.go | 2 +- 7 files changed, 121 insertions(+), 98 deletions(-) create mode 100644 pkg/minikube/kubeconfig/kube_context.go diff --git a/cmd/minikube/cmd/status.go b/cmd/minikube/cmd/status.go index 6fa7c60d74..1e49099350 100644 --- a/cmd/minikube/cmd/status.go +++ b/cmd/minikube/cmd/status.go @@ -92,7 +92,7 @@ var statusCmd = &cobra.Command{ glog.Errorln("Error host driver ip status:", err) } - apiserverPort, err := kubeconfig.GetPortFromKubeConfig(kubeconfig.GetKubeConfigPath(), config.GetMachineName()) + apiserverPort, err := kubeconfig.GetPortFromKubeConfig(kubeconfig.Path(), config.GetMachineName()) if err != nil { // Fallback to presuming default apiserver port apiserverPort = constants.APIServerPort @@ -105,7 +105,7 @@ var statusCmd = &cobra.Command{ returnCode |= clusterNotRunningStatusFlag } - ks, err := kubeconfig.GetKubeConfigStatus(ip, kubeconfig.GetKubeConfigPath(), config.GetMachineName()) + ks, err := kubeconfig.GetKubeConfigStatus(ip, kubeconfig.Path(), config.GetMachineName()) if err != nil { glog.Errorln("Error kubeconfig status:", err) } diff --git a/cmd/minikube/cmd/update-context.go b/cmd/minikube/cmd/update-context.go index c0ae6a23ab..3a6eeda815 100644 --- a/cmd/minikube/cmd/update-context.go +++ b/cmd/minikube/cmd/update-context.go @@ -44,7 +44,7 @@ var updateContextCmd = &cobra.Command{ if err != nil { exit.WithError("Error host driver ip status", err) } - updated, err := kubeconfig.UpdateKubeconfigIP(ip, constants.KubeconfigPath, machineName) + updated, err := kubeconfig.UpdateIP(ip, constants.KubeconfigPath, machineName) if err != nil { exit.WithError("update config", err) } diff --git a/pkg/minikube/kubeconfig/kube_context.go b/pkg/minikube/kubeconfig/kube_context.go new file mode 100644 index 0000000000..14e53f0d41 --- /dev/null +++ b/pkg/minikube/kubeconfig/kube_context.go @@ -0,0 +1,81 @@ +/* +Copyright 2019 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kubeconfig + +import ( + "github.com/golang/glog" + "github.com/pkg/errors" + "k8s.io/client-go/tools/clientcmd/api" +) + +// UnsetCurrentContext unsets the current-context from minikube to "" on minikube stop +func UnsetCurrentContext(filename, machineName string) error { + confg, err := readOrNew(filename) + if err != nil { + return errors.Wrap(err, "Error getting kubeconfig status") + } + + // Unset current-context only if profile is the current-context + if confg.CurrentContext == machineName { + confg.CurrentContext = "" + if err := writeToFile(confg, filename); err != nil { + return errors.Wrap(err, "writing kubeconfig") + } + return nil + } + + return nil +} + +// SetCurrentContext sets the kubectl's current-context +func SetCurrentContext(kubeCfgPath, name string) error { + kcfg, err := readOrNew(kubeCfgPath) + if err != nil { + return errors.Wrap(err, "Error getting kubeconfig status") + } + kcfg.CurrentContext = name + if err := writeToFile(kcfg, kubeCfgPath); err != nil { + return errors.Wrap(err, "writing kubeconfig") + } + return nil +} + +// DeleteKubeConfigContext deletes the specified machine's kubeconfig context +func DeleteKubeConfigContext(kubeCfgPath, machineName string) error { + kcfg, err := readOrNew(kubeCfgPath) + if err != nil { + return errors.Wrap(err, "Error getting kubeconfig status") + } + + if kcfg == nil || api.IsConfigEmpty(kcfg) { + glog.V(2).Info("kubeconfig is empty") + return nil + } + + delete(kcfg.Clusters, machineName) + delete(kcfg.AuthInfos, machineName) + delete(kcfg.Contexts, machineName) + + if kcfg.CurrentContext == machineName { + kcfg.CurrentContext = "" + } + + if err := writeToFile(kcfg, kubeCfgPath); err != nil { + return errors.Wrap(err, "writing kubeconfig") + } + return nil +} diff --git a/pkg/minikube/kubeconfig/kubeconfig.go b/pkg/minikube/kubeconfig/kubeconfig.go index c8cdef07b3..d110bb7726 100644 --- a/pkg/minikube/kubeconfig/kubeconfig.go +++ b/pkg/minikube/kubeconfig/kubeconfig.go @@ -87,10 +87,10 @@ func PopulateKubeConfig(cfg *Setup, kubecfg *api.Config) error { // activeContext is true when minikube is the CurrentContext // If no CurrentContext is set, the given name will be used. func SetupKubeConfig(cfg *Setup) error { - glog.Infoln("Using kubeconfig: ", cfg.GetKubeConfigFile()) + glog.Infoln("Using kubeconfig: ", cfg.fileContent()) // read existing config or create new if does not exist - config, err := readOrNew(cfg.GetKubeConfigFile()) + config, err := readOrNew(cfg.fileContent()) if err != nil { return err } @@ -101,7 +101,7 @@ func SetupKubeConfig(cfg *Setup) error { } // write back to disk - if err := writeToFile(config, cfg.GetKubeConfigFile()); err != nil { + if err := writeToFile(config, cfg.fileContent()); err != nil { return errors.Wrap(err, "writing kubeconfig") } return nil @@ -179,28 +179,12 @@ func writeToFile(config runtime.Object, filename string) error { return nil } -// decode reads a Config object from bytes. -// Returns empty config if no bytes. -func decode(data []byte) (*api.Config, error) { - // if no data, return empty config - if len(data) == 0 { - return api.NewConfig(), nil - } - - config, _, err := latest.Codec.Decode(data, nil, nil) - if err != nil { - return nil, errors.Wrapf(err, "Error decoding config from data: %s", string(data)) - } - - return config.(*api.Config), nil -} - // GetKubeConfigStatus verifies the ip stored in kubeconfig. func GetKubeConfigStatus(ip net.IP, filename string, machineName string) (bool, error) { if ip == nil { return false, fmt.Errorf("error, empty ip passed") } - kip, err := getIPFromKubeConfig(filename, machineName) + kip, err := extractIP(filename, machineName) if err != nil { return false, err } @@ -212,12 +196,12 @@ func GetKubeConfigStatus(ip net.IP, filename string, machineName string) (bool, } -// UpdateKubeconfigIP overwrites the IP stored in kubeconfig with the provided IP. -func UpdateKubeconfigIP(ip net.IP, filename string, machineName string) (bool, error) { +// UpdateIP overwrites the IP stored in kubeconfig with the provided IP. +func UpdateIP(ip net.IP, filename string, machineName string) (bool, error) { if ip == nil { return false, fmt.Errorf("error, empty ip passed") } - kip, err := getIPFromKubeConfig(filename, machineName) + kip, err := extractIP(filename, machineName) if err != nil { return false, err } @@ -242,8 +226,8 @@ func UpdateKubeconfigIP(ip net.IP, filename string, machineName string) (bool, e return true, nil } -// getIPFromKubeConfig returns the IP address stored for minikube in the kubeconfig specified -func getIPFromKubeConfig(filename, machineName string) (net.IP, error) { +// extractIP returns the IP address stored for minikube in the kubeconfig specified +func extractIP(filename, machineName string) (net.IP, error) { con, err := readOrNew(filename) if err != nil { return nil, errors.Wrap(err, "Error getting kubeconfig status") @@ -286,69 +270,27 @@ func GetPortFromKubeConfig(filename, machineName string) (int, error) { return port, err } -// UnsetCurrentContext unsets the current-context from minikube to "" on minikube stop -func UnsetCurrentContext(filename, machineName string) error { - confg, err := readOrNew(filename) - if err != nil { - return errors.Wrap(err, "Error getting kubeconfig status") - } - - // Unset current-context only if profile is the current-context - if confg.CurrentContext == machineName { - confg.CurrentContext = "" - if err := writeToFile(confg, filename); err != nil { - return errors.Wrap(err, "writing kubeconfig") - } - return nil - } - - return nil -} - -// SetCurrentContext sets the kubectl's current-context -func SetCurrentContext(kubeCfgPath, name string) error { - kcfg, err := readOrNew(kubeCfgPath) - if err != nil { - return errors.Wrap(err, "Error getting kubeconfig status") - } - kcfg.CurrentContext = name - if err := writeToFile(kcfg, kubeCfgPath); err != nil { - return errors.Wrap(err, "writing kubeconfig") - } - return nil -} - -// DeleteKubeConfigContext deletes the specified machine's kubeconfig context -func DeleteKubeConfigContext(kubeCfgPath, machineName string) error { - kcfg, err := readOrNew(kubeCfgPath) - if err != nil { - return errors.Wrap(err, "Error getting kubeconfig status") - } - - if kcfg == nil || api.IsConfigEmpty(kcfg) { - glog.V(2).Info("kubeconfig is empty") - return nil - } - - delete(kcfg.Clusters, machineName) - delete(kcfg.AuthInfos, machineName) - delete(kcfg.Contexts, machineName) - - if kcfg.CurrentContext == machineName { - kcfg.CurrentContext = "" - } - - if err := writeToFile(kcfg, kubeCfgPath); err != nil { - return errors.Wrap(err, "writing kubeconfig") - } - return nil -} - // GetKubeConfigPath gets the path to the first kubeconfig -func GetKubeConfigPath() string { +func Path() string { kubeConfigEnv := os.Getenv(constants.KubeconfigEnvVar) if kubeConfigEnv == "" { return constants.KubeconfigPath } return filepath.SplitList(kubeConfigEnv)[0] } + +// decode reads a Config object from bytes. +// Returns empty config if no bytes. +func decode(data []byte) (*api.Config, error) { + // if no data, return empty config + if len(data) == 0 { + return api.NewConfig(), nil + } + + config, _, err := latest.Codec.Decode(data, nil, nil) + if err != nil { + return nil, errors.Wrapf(err, "Error decoding config from data: %s", string(data)) + } + + return config.(*api.Config), nil +} diff --git a/pkg/minikube/kubeconfig/kubeconfig_test.go b/pkg/minikube/kubeconfig/kubeconfig_test.go index cc354ff583..36048b035f 100644 --- a/pkg/minikube/kubeconfig/kubeconfig_test.go +++ b/pkg/minikube/kubeconfig/kubeconfig_test.go @@ -147,9 +147,9 @@ func TestSetupKubeConfig(t *testing.T) { if err != nil { t.Fatalf("Error making temp directory %v", err) } - test.cfg.SetKubeConfigFile(filepath.Join(tmpDir, "kubeconfig")) + test.cfg.setPath(filepath.Join(tmpDir, "kubeconfig")) if len(test.existingCfg) != 0 { - if err := ioutil.WriteFile(test.cfg.GetKubeConfigFile(), test.existingCfg, 0600); err != nil { + if err := ioutil.WriteFile(test.cfg.fileContent(), test.existingCfg, 0600); err != nil { t.Fatalf("WriteFile: %v", err) } } @@ -160,7 +160,7 @@ func TestSetupKubeConfig(t *testing.T) { if err == nil && test.err { t.Errorf("Expected error but got none") } - config, err := readOrNew(test.cfg.GetKubeConfigFile()) + config, err := readOrNew(test.cfg.fileContent()) if err != nil { t.Errorf("Error reading kubeconfig file: %v", err) } @@ -230,7 +230,7 @@ func TestGetKubeConfigStatus(t *testing.T) { } } -func TestUpdateKubeconfigIP(t *testing.T) { +func TestUpdateIP(t *testing.T) { var tests = []struct { description string @@ -272,7 +272,7 @@ func TestUpdateKubeconfigIP(t *testing.T) { t.Run(test.description, func(t *testing.T) { t.Parallel() configFilename := tempFile(t, test.existing) - statusActual, err := UpdateKubeconfigIP(test.ip, configFilename, "minikube") + statusActual, err := UpdateIP(test.ip, configFilename, "minikube") if err != nil && !test.err { t.Errorf("Got unexpected error: %v", err) } @@ -359,7 +359,7 @@ func TestGetIPFromKubeConfig(t *testing.T) { for _, test := range tests { t.Run(test.description, func(t *testing.T) { configFilename := tempFile(t, test.cfg) - ip, err := getIPFromKubeConfig(configFilename, "minikube") + ip, err := extractIP(configFilename, "minikube") if err != nil && !test.err { t.Errorf("Got unexpected error: %v", err) } @@ -684,7 +684,7 @@ func TestGetKubeConfigPath(t *testing.T) { for _, test := range tests { os.Setenv(clientcmd.RecommendedConfigPathEnvVar, test.input) - if result := GetKubeConfigPath(); result != test.want { + if result := Path(); result != test.want { t.Errorf("Expected first splitted chunk, got: %s", result) } } diff --git a/pkg/minikube/kubeconfig/setup.go b/pkg/minikube/kubeconfig/setup.go index 38d5306e1c..acf44c74c9 100644 --- a/pkg/minikube/kubeconfig/setup.go +++ b/pkg/minikube/kubeconfig/setup.go @@ -47,11 +47,11 @@ type Setup struct { } // SetKubeConfigFile sets the kubeconfig file -func (k *Setup) SetKubeConfigFile(kubeConfigFile string) { +func (k *Setup) setPath(kubeConfigFile string) { k.kubeConfigFile.Store(kubeConfigFile) } -// GetKubeConfigFile gets the kubeconfig file -func (k *Setup) GetKubeConfigFile() string { +// fileContent gets the kubeconfig file +func (k *Setup) fileContent() string { return k.kubeConfigFile.Load().(string) } diff --git a/pkg/minikube/kubeconfig/update.go b/pkg/minikube/kubeconfig/update.go index c1b75a4886..a8c87895f0 100644 --- a/pkg/minikube/kubeconfig/update.go +++ b/pkg/minikube/kubeconfig/update.go @@ -48,7 +48,7 @@ func Update(h *host.Host, c *cfg.Config) *Setup { KeepContext: viper.GetBool("keep-context"), EmbedCerts: viper.GetBool("embed-certs"), } - kcs.SetKubeConfigFile(GetKubeConfigPath()) + kcs.setPath(Path()) if err := SetupKubeConfig(kcs); err != nil { exit.WithError("Failed to setup kubeconfig", err) } From 5a9fb439ab905b4f7a862874d1183b4bc6868d1e Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Tue, 6 Aug 2019 17:41:36 -0700 Subject: [PATCH 031/115] rename funcs --- cmd/minikube/cmd/status.go | 4 +- .../{kube_context.go => context.go} | 0 pkg/minikube/kubeconfig/context_test.go | 148 ++++++++++++++++++ pkg/minikube/kubeconfig/kubeconfig.go | 132 +++++----------- pkg/minikube/kubeconfig/kubeconfig_test.go | 133 +--------------- pkg/minikube/kubeconfig/update.go | 60 ++++++- 6 files changed, 252 insertions(+), 225 deletions(-) rename pkg/minikube/kubeconfig/{kube_context.go => context.go} (100%) create mode 100644 pkg/minikube/kubeconfig/context_test.go diff --git a/cmd/minikube/cmd/status.go b/cmd/minikube/cmd/status.go index 1e49099350..83822cb13b 100644 --- a/cmd/minikube/cmd/status.go +++ b/cmd/minikube/cmd/status.go @@ -92,7 +92,7 @@ var statusCmd = &cobra.Command{ glog.Errorln("Error host driver ip status:", err) } - apiserverPort, err := kubeconfig.GetPortFromKubeConfig(kubeconfig.Path(), config.GetMachineName()) + apiserverPort, err := kubeconfig.Port(kubeconfig.Path(), config.GetMachineName()) if err != nil { // Fallback to presuming default apiserver port apiserverPort = constants.APIServerPort @@ -105,7 +105,7 @@ var statusCmd = &cobra.Command{ returnCode |= clusterNotRunningStatusFlag } - ks, err := kubeconfig.GetKubeConfigStatus(ip, kubeconfig.Path(), config.GetMachineName()) + ks, err := kubeconfig.VeryifyMachineIP(ip, kubeconfig.Path(), config.GetMachineName()) if err != nil { glog.Errorln("Error kubeconfig status:", err) } diff --git a/pkg/minikube/kubeconfig/kube_context.go b/pkg/minikube/kubeconfig/context.go similarity index 100% rename from pkg/minikube/kubeconfig/kube_context.go rename to pkg/minikube/kubeconfig/context.go diff --git a/pkg/minikube/kubeconfig/context_test.go b/pkg/minikube/kubeconfig/context_test.go new file mode 100644 index 0000000000..38e87cc492 --- /dev/null +++ b/pkg/minikube/kubeconfig/context_test.go @@ -0,0 +1,148 @@ +/* +Copyright 2019 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kubeconfig + +import ( + "io/ioutil" + "os" + "testing" +) + +func TestDeleteKubeConfigContext(t *testing.T) { + configFilename := tempFile(t, fakeKubeCfg) + if err := DeleteKubeConfigContext(configFilename, "la-croix"); err != nil { + t.Fatal(err) + } + + cfg, err := readOrNew(configFilename) + if err != nil { + t.Fatal(err) + } + + if len(cfg.AuthInfos) != 0 { + t.Fail() + } + + if len(cfg.Clusters) != 0 { + t.Fail() + } + + if len(cfg.Contexts) != 0 { + t.Fail() + } +} + +func TestSetCurrentContext(t *testing.T) { + contextName := "minikube" + + kubeConfigFile, err := ioutil.TempFile("/tmp", "kubeconfig") + if err != nil { + t.Fatalf("Error not expected but got %v", err) + } + defer os.Remove(kubeConfigFile.Name()) + + cfg, err := readOrNew(kubeConfigFile.Name()) + if err != nil { + t.Fatalf("Error not expected but got %v", err) + } + + if cfg.CurrentContext != "" { + t.Errorf("Expected empty context but got %v", cfg.CurrentContext) + } + + err = SetCurrentContext(kubeConfigFile.Name(), contextName) + if err != nil { + t.Fatalf("Error not expected but got %v", err) + } + defer func() { + err := UnsetCurrentContext(kubeConfigFile.Name(), contextName) + if err != nil { + t.Fatalf("Error not expected but got %v", err) + } + }() + + cfg, err = readOrNew(kubeConfigFile.Name()) + if err != nil { + t.Fatalf("Error not expected but got %v", err) + } + + if cfg.CurrentContext != contextName { + t.Errorf("Expected context name %s but got %s", contextName, cfg.CurrentContext) + } +} + +func TestUnsetCurrentContext(t *testing.T) { + kubeConfigFile := "./testdata/kubeconfig/config1" + contextName := "minikube" + + cfg, err := readOrNew(kubeConfigFile) + if err != nil { + t.Fatalf("Error not expected but got %v", err) + } + + if cfg.CurrentContext != contextName { + t.Errorf("Expected context name %s but got %s", contextName, cfg.CurrentContext) + } + + err = UnsetCurrentContext(kubeConfigFile, contextName) + if err != nil { + t.Fatalf("Error not expected but got %v", err) + } + defer func() { + err := SetCurrentContext(kubeConfigFile, contextName) + if err != nil { + t.Fatalf("Error not expected but got %v", err) + } + }() + + cfg, err = readOrNew(kubeConfigFile) + if err != nil { + t.Fatalf("Error not expected but got %v", err) + } + + if cfg.CurrentContext != "" { + t.Errorf("Expected empty context but got %v", cfg.CurrentContext) + } +} + +func TestUnsetCurrentContextOnlyChangesIfProfileIsTheCurrentContext(t *testing.T) { + contextName := "minikube" + kubeConfigFile := "./testdata/kubeconfig/config2" + + cfg, err := readOrNew(kubeConfigFile) + if err != nil { + t.Fatalf("Error not expected but got %v", err) + } + + if cfg.CurrentContext != contextName { + t.Errorf("Expected context name %s but got %s", contextName, cfg.CurrentContext) + } + + err = UnsetCurrentContext(kubeConfigFile, "differentContextName") + if err != nil { + t.Fatalf("Error not expected but got %v", err) + } + + cfg, err = readOrNew(kubeConfigFile) + if err != nil { + t.Fatalf("Error not expected but got %v", err) + } + + if cfg.CurrentContext != contextName { + t.Errorf("Expected context name %s but got %s", contextName, cfg.CurrentContext) + } +} diff --git a/pkg/minikube/kubeconfig/kubeconfig.go b/pkg/minikube/kubeconfig/kubeconfig.go index d110bb7726..05e21c3b28 100644 --- a/pkg/minikube/kubeconfig/kubeconfig.go +++ b/pkg/minikube/kubeconfig/kubeconfig.go @@ -83,28 +83,52 @@ func PopulateKubeConfig(cfg *Setup, kubecfg *api.Config) error { return nil } -// SetupKubeConfig reads config from disk, adds the minikube settings, and writes it back. -// activeContext is true when minikube is the CurrentContext -// If no CurrentContext is set, the given name will be used. -func SetupKubeConfig(cfg *Setup) error { - glog.Infoln("Using kubeconfig: ", cfg.fileContent()) - - // read existing config or create new if does not exist - config, err := readOrNew(cfg.fileContent()) +// VeryifyMachineIP verifies the ip stored in kubeconfig. +func VeryifyMachineIP(ip net.IP, filename string, machineName string) (bool, error) { + if ip == nil { + return false, fmt.Errorf("error, empty ip passed") + } + kip, err := extractIP(filename, machineName) if err != nil { - return err + return false, err } + if kip.Equal(ip) { + return true, nil + } + // Kubeconfig IP misconfigured + return false, nil - err = PopulateKubeConfig(cfg, config) +} + +// GetPortFromKubeConfig returns the Port number stored for minikube in the kubeconfig specified +func Port(filename, machineName string) (int, error) { + con, err := readOrNew(filename) if err != nil { - return err + return 0, errors.Wrap(err, "Error getting kubeconfig status") } + cluster, ok := con.Clusters[machineName] + if !ok { + return 0, errors.Errorf("Kubeconfig does not have a record of the machine cluster") + } + kurl, err := url.Parse(cluster.Server) + if err != nil { + return constants.APIServerPort, nil + } + _, kport, err := net.SplitHostPort(kurl.Host) + if err != nil { + return constants.APIServerPort, nil + } + port, err := strconv.Atoi(kport) + return port, err +} - // write back to disk - if err := writeToFile(config, cfg.fileContent()); err != nil { - return errors.Wrap(err, "writing kubeconfig") +// GetKubeConfigPath gets the path to the first kubeconfig +func Path() string { + kubeConfigEnv := os.Getenv(constants.KubeconfigEnvVar) + if kubeConfigEnv == "" { + return constants.KubeconfigPath } - return nil + return filepath.SplitList(kubeConfigEnv)[0] } // readOrNew retrieves Kubernetes client configuration from a file. @@ -179,53 +203,6 @@ func writeToFile(config runtime.Object, filename string) error { return nil } -// GetKubeConfigStatus verifies the ip stored in kubeconfig. -func GetKubeConfigStatus(ip net.IP, filename string, machineName string) (bool, error) { - if ip == nil { - return false, fmt.Errorf("error, empty ip passed") - } - kip, err := extractIP(filename, machineName) - if err != nil { - return false, err - } - if kip.Equal(ip) { - return true, nil - } - // Kubeconfig IP misconfigured - return false, nil - -} - -// UpdateIP overwrites the IP stored in kubeconfig with the provided IP. -func UpdateIP(ip net.IP, filename string, machineName string) (bool, error) { - if ip == nil { - return false, fmt.Errorf("error, empty ip passed") - } - kip, err := extractIP(filename, machineName) - if err != nil { - return false, err - } - if kip.Equal(ip) { - return false, nil - } - kport, err := GetPortFromKubeConfig(filename, machineName) - if err != nil { - return false, err - } - con, err := readOrNew(filename) - if err != nil { - return false, errors.Wrap(err, "Error getting kubeconfig status") - } - // Safe to lookup server because if field non-existent getIPFromKubeconfig would have given an error - con.Clusters[machineName].Server = "https://" + ip.String() + ":" + strconv.Itoa(kport) - err = writeToFile(con, filename) - if err != nil { - return false, err - } - // Kubeconfig IP reconfigured - return true, nil -} - // extractIP returns the IP address stored for minikube in the kubeconfig specified func extractIP(filename, machineName string) (net.IP, error) { con, err := readOrNew(filename) @@ -248,37 +225,6 @@ func extractIP(filename, machineName string) (net.IP, error) { return ip, nil } -// GetPortFromKubeConfig returns the Port number stored for minikube in the kubeconfig specified -func GetPortFromKubeConfig(filename, machineName string) (int, error) { - con, err := readOrNew(filename) - if err != nil { - return 0, errors.Wrap(err, "Error getting kubeconfig status") - } - cluster, ok := con.Clusters[machineName] - if !ok { - return 0, errors.Errorf("Kubeconfig does not have a record of the machine cluster") - } - kurl, err := url.Parse(cluster.Server) - if err != nil { - return constants.APIServerPort, nil - } - _, kport, err := net.SplitHostPort(kurl.Host) - if err != nil { - return constants.APIServerPort, nil - } - port, err := strconv.Atoi(kport) - return port, err -} - -// GetKubeConfigPath gets the path to the first kubeconfig -func Path() string { - kubeConfigEnv := os.Getenv(constants.KubeconfigEnvVar) - if kubeConfigEnv == "" { - return constants.KubeconfigPath - } - return filepath.SplitList(kubeConfigEnv)[0] -} - // decode reads a Config object from bytes. // Returns empty config if no bytes. func decode(data []byte) (*api.Config, error) { diff --git a/pkg/minikube/kubeconfig/kubeconfig_test.go b/pkg/minikube/kubeconfig/kubeconfig_test.go index 36048b035f..ecd15e6c2b 100644 --- a/pkg/minikube/kubeconfig/kubeconfig_test.go +++ b/pkg/minikube/kubeconfig/kubeconfig_test.go @@ -96,7 +96,7 @@ users: client-key: /home/la-croix/apiserver.key `) -func TestSetupKubeConfig(t *testing.T) { +func Test_update(t *testing.T) { setupCfg := &Setup{ ClusterName: "test", ClusterServerAddress: "192.168.1.1:8080", @@ -153,7 +153,7 @@ func TestSetupKubeConfig(t *testing.T) { t.Fatalf("WriteFile: %v", err) } } - err = SetupKubeConfig(test.cfg) + err = update(test.cfg) if err != nil && !test.err { t.Errorf("Got unexpected error: %v", err) } @@ -177,7 +177,7 @@ func TestSetupKubeConfig(t *testing.T) { } } -func TestGetKubeConfigStatus(t *testing.T) { +func TestVeryifyMachineIP(t *testing.T) { var tests = []struct { description string @@ -215,7 +215,7 @@ func TestGetKubeConfigStatus(t *testing.T) { t.Run(test.description, func(t *testing.T) { t.Parallel() configFilename := tempFile(t, test.existing) - statusActual, err := GetKubeConfigStatus(test.ip, configFilename, "minikube") + statusActual, err := VeryifyMachineIP(test.ip, configFilename, "minikube") if err != nil && !test.err { t.Errorf("Got unexpected error: %v", err) } @@ -373,131 +373,6 @@ func TestGetIPFromKubeConfig(t *testing.T) { } } -func TestDeleteKubeConfigContext(t *testing.T) { - configFilename := tempFile(t, fakeKubeCfg) - if err := DeleteKubeConfigContext(configFilename, "la-croix"); err != nil { - t.Fatal(err) - } - - cfg, err := readOrNew(configFilename) - if err != nil { - t.Fatal(err) - } - - if len(cfg.AuthInfos) != 0 { - t.Fail() - } - - if len(cfg.Clusters) != 0 { - t.Fail() - } - - if len(cfg.Contexts) != 0 { - t.Fail() - } -} - -func TestSetCurrentContext(t *testing.T) { - contextName := "minikube" - - kubeConfigFile, err := ioutil.TempFile("/tmp", "kubeconfig") - if err != nil { - t.Fatalf("Error not expected but got %v", err) - } - defer os.Remove(kubeConfigFile.Name()) - - cfg, err := readOrNew(kubeConfigFile.Name()) - if err != nil { - t.Fatalf("Error not expected but got %v", err) - } - - if cfg.CurrentContext != "" { - t.Errorf("Expected empty context but got %v", cfg.CurrentContext) - } - - err = SetCurrentContext(kubeConfigFile.Name(), contextName) - if err != nil { - t.Fatalf("Error not expected but got %v", err) - } - defer func() { - err := UnsetCurrentContext(kubeConfigFile.Name(), contextName) - if err != nil { - t.Fatalf("Error not expected but got %v", err) - } - }() - - cfg, err = readOrNew(kubeConfigFile.Name()) - if err != nil { - t.Fatalf("Error not expected but got %v", err) - } - - if cfg.CurrentContext != contextName { - t.Errorf("Expected context name %s but got %s", contextName, cfg.CurrentContext) - } -} - -func TestUnsetCurrentContext(t *testing.T) { - kubeConfigFile := "./testdata/kubeconfig/config1" - contextName := "minikube" - - cfg, err := readOrNew(kubeConfigFile) - if err != nil { - t.Fatalf("Error not expected but got %v", err) - } - - if cfg.CurrentContext != contextName { - t.Errorf("Expected context name %s but got %s", contextName, cfg.CurrentContext) - } - - err = UnsetCurrentContext(kubeConfigFile, contextName) - if err != nil { - t.Fatalf("Error not expected but got %v", err) - } - defer func() { - err := SetCurrentContext(kubeConfigFile, contextName) - if err != nil { - t.Fatalf("Error not expected but got %v", err) - } - }() - - cfg, err = readOrNew(kubeConfigFile) - if err != nil { - t.Fatalf("Error not expected but got %v", err) - } - - if cfg.CurrentContext != "" { - t.Errorf("Expected empty context but got %v", cfg.CurrentContext) - } -} - -func TestUnsetCurrentContextOnlyChangesIfProfileIsTheCurrentContext(t *testing.T) { - contextName := "minikube" - kubeConfigFile := "./testdata/kubeconfig/config2" - - cfg, err := readOrNew(kubeConfigFile) - if err != nil { - t.Fatalf("Error not expected but got %v", err) - } - - if cfg.CurrentContext != contextName { - t.Errorf("Expected context name %s but got %s", contextName, cfg.CurrentContext) - } - - err = UnsetCurrentContext(kubeConfigFile, "differentContextName") - if err != nil { - t.Fatalf("Error not expected but got %v", err) - } - - cfg, err = readOrNew(kubeConfigFile) - if err != nil { - t.Fatalf("Error not expected but got %v", err) - } - - if cfg.CurrentContext != contextName { - t.Errorf("Expected context name %s but got %s", contextName, cfg.CurrentContext) - } -} - // tempFile creates a temporary with the provided bytes as its contents. // The caller is responsible for deleting file after use. func tempFile(t *testing.T, data []byte) string { diff --git a/pkg/minikube/kubeconfig/update.go b/pkg/minikube/kubeconfig/update.go index a8c87895f0..7080ee09ea 100644 --- a/pkg/minikube/kubeconfig/update.go +++ b/pkg/minikube/kubeconfig/update.go @@ -17,10 +17,14 @@ limitations under the License. package kubeconfig import ( + "fmt" + "net" "strconv" "strings" "github.com/docker/machine/libmachine/host" + "github.com/golang/glog" + "github.com/pkg/errors" "github.com/spf13/viper" cfg "k8s.io/minikube/pkg/minikube/config" "k8s.io/minikube/pkg/minikube/constants" @@ -49,8 +53,62 @@ func Update(h *host.Host, c *cfg.Config) *Setup { EmbedCerts: viper.GetBool("embed-certs"), } kcs.setPath(Path()) - if err := SetupKubeConfig(kcs); err != nil { + if err := update(kcs); err != nil { exit.WithError("Failed to setup kubeconfig", err) } return kcs } + +// update reads config from disk, adds the minikube settings, and writes it back. +// activeContext is true when minikube is the CurrentContext +// If no CurrentContext is set, the given name will be used. +func update(cfg *Setup) error { + glog.Infoln("Using kubeconfig: ", cfg.fileContent()) + + // read existing config or create new if does not exist + config, err := readOrNew(cfg.fileContent()) + if err != nil { + return err + } + + err = PopulateKubeConfig(cfg, config) + if err != nil { + return err + } + + // write back to disk + if err := writeToFile(config, cfg.fileContent()); err != nil { + return errors.Wrap(err, "writing kubeconfig") + } + return nil +} + +// UpdateIP overwrites the IP stored in kubeconfig with the provided IP. +func UpdateIP(ip net.IP, filename string, machineName string) (bool, error) { + if ip == nil { + return false, fmt.Errorf("error, empty ip passed") + } + kip, err := extractIP(filename, machineName) + if err != nil { + return false, err + } + if kip.Equal(ip) { + return false, nil + } + kport, err := Port(filename, machineName) + if err != nil { + return false, err + } + con, err := readOrNew(filename) + if err != nil { + return false, errors.Wrap(err, "Error getting kubeconfig status") + } + // Safe to lookup server because if field non-existent getIPFromKubeconfig would have given an error + con.Clusters[machineName].Server = "https://" + ip.String() + ":" + strconv.Itoa(kport) + err = writeToFile(con, filename) + if err != nil { + return false, err + } + // Kubeconfig IP reconfigured + return true, nil +} From 9ab4892806349e377629ff70a1b007dcc40d8e1b Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Tue, 6 Aug 2019 17:44:31 -0700 Subject: [PATCH 032/115] move test data --- pkg/{util => minikube/kubeconfig}/testdata/kubeconfig/config1 | 0 pkg/{util => minikube/kubeconfig}/testdata/kubeconfig/config2 | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename pkg/{util => minikube/kubeconfig}/testdata/kubeconfig/config1 (100%) rename pkg/{util => minikube/kubeconfig}/testdata/kubeconfig/config2 (100%) diff --git a/pkg/util/testdata/kubeconfig/config1 b/pkg/minikube/kubeconfig/testdata/kubeconfig/config1 similarity index 100% rename from pkg/util/testdata/kubeconfig/config1 rename to pkg/minikube/kubeconfig/testdata/kubeconfig/config1 diff --git a/pkg/util/testdata/kubeconfig/config2 b/pkg/minikube/kubeconfig/testdata/kubeconfig/config2 similarity index 100% rename from pkg/util/testdata/kubeconfig/config2 rename to pkg/minikube/kubeconfig/testdata/kubeconfig/config2 From ac79541826c8410dc0fc9fe742cba7f48ccd11e6 Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Tue, 6 Aug 2019 17:54:46 -0700 Subject: [PATCH 033/115] rename test name --- pkg/minikube/kubeconfig/kubeconfig_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/minikube/kubeconfig/kubeconfig_test.go b/pkg/minikube/kubeconfig/kubeconfig_test.go index ecd15e6c2b..21c56975c6 100644 --- a/pkg/minikube/kubeconfig/kubeconfig_test.go +++ b/pkg/minikube/kubeconfig/kubeconfig_test.go @@ -337,7 +337,7 @@ func TestNewConfig(t *testing.T) { } } -func TestGetIPFromKubeConfig(t *testing.T) { +func Test_extractIP(t *testing.T) { var tests = []struct { description string From f41a937f5ea1c937374d60a696f3c8029d0c52f2 Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Tue, 6 Aug 2019 20:33:32 -0700 Subject: [PATCH 034/115] rename funcs --- pkg/minikube/bootstrapper/certs.go | 2 +- pkg/minikube/kubeconfig/kubeconfig.go | 49 ----------------------- pkg/minikube/kubeconfig/setup.go | 56 ++++++++++++++++++++++++++- pkg/minikube/kubeconfig/update.go | 2 +- 4 files changed, 57 insertions(+), 52 deletions(-) diff --git a/pkg/minikube/bootstrapper/certs.go b/pkg/minikube/bootstrapper/certs.go index 29f768cbc8..4cfb8f424e 100644 --- a/pkg/minikube/bootstrapper/certs.go +++ b/pkg/minikube/bootstrapper/certs.go @@ -77,7 +77,7 @@ func SetupCerts(cmd command.Runner, k8s config.KubernetesConfig) error { } kubeCfg := api.NewConfig() - err := kubeconfig.PopulateKubeConfig(kubeCfgSetup, kubeCfg) + err := kubeconfig.Populate(kubeCfgSetup, kubeCfg) if err != nil { return errors.Wrap(err, "populating kubeconfig") } diff --git a/pkg/minikube/kubeconfig/kubeconfig.go b/pkg/minikube/kubeconfig/kubeconfig.go index 05e21c3b28..17b32a9801 100644 --- a/pkg/minikube/kubeconfig/kubeconfig.go +++ b/pkg/minikube/kubeconfig/kubeconfig.go @@ -34,55 +34,6 @@ import ( pkgutil "k8s.io/minikube/pkg/util" ) -// PopulateKubeConfig populates an api.Config object. -func PopulateKubeConfig(cfg *Setup, kubecfg *api.Config) error { - var err error - clusterName := cfg.ClusterName - cluster := api.NewCluster() - cluster.Server = cfg.ClusterServerAddress - if cfg.EmbedCerts { - cluster.CertificateAuthorityData, err = ioutil.ReadFile(cfg.CertificateAuthority) - if err != nil { - return err - } - } else { - cluster.CertificateAuthority = cfg.CertificateAuthority - } - kubecfg.Clusters[clusterName] = cluster - - // user - userName := cfg.ClusterName - user := api.NewAuthInfo() - if cfg.EmbedCerts { - user.ClientCertificateData, err = ioutil.ReadFile(cfg.ClientCertificate) - if err != nil { - return err - } - user.ClientKeyData, err = ioutil.ReadFile(cfg.ClientKey) - if err != nil { - return err - } - } else { - user.ClientCertificate = cfg.ClientCertificate - user.ClientKey = cfg.ClientKey - } - kubecfg.AuthInfos[userName] = user - - // context - contextName := cfg.ClusterName - context := api.NewContext() - context.Cluster = cfg.ClusterName - context.AuthInfo = userName - kubecfg.Contexts[contextName] = context - - // Only set current context to minikube if the user has not used the keepContext flag - if !cfg.KeepContext { - kubecfg.CurrentContext = cfg.ClusterName - } - - return nil -} - // VeryifyMachineIP verifies the ip stored in kubeconfig. func VeryifyMachineIP(ip net.IP, filename string, machineName string) (bool, error) { if ip == nil { diff --git a/pkg/minikube/kubeconfig/setup.go b/pkg/minikube/kubeconfig/setup.go index acf44c74c9..238c79c915 100644 --- a/pkg/minikube/kubeconfig/setup.go +++ b/pkg/minikube/kubeconfig/setup.go @@ -16,7 +16,12 @@ limitations under the License. package kubeconfig -import "sync/atomic" +import ( + "io/ioutil" + "sync/atomic" + + "k8s.io/client-go/tools/clientcmd/api" +) // Setup is the kubeconfig setup type Setup struct { @@ -55,3 +60,52 @@ func (k *Setup) setPath(kubeConfigFile string) { func (k *Setup) fileContent() string { return k.kubeConfigFile.Load().(string) } + +// Populate populates an api.Config object with values from *Setup +func Populate(cfg *Setup, apiCfg *api.Config) error { + var err error + clusterName := cfg.ClusterName + cluster := api.NewCluster() + cluster.Server = cfg.ClusterServerAddress + if cfg.EmbedCerts { + cluster.CertificateAuthorityData, err = ioutil.ReadFile(cfg.CertificateAuthority) + if err != nil { + return err + } + } else { + cluster.CertificateAuthority = cfg.CertificateAuthority + } + apiCfg.Clusters[clusterName] = cluster + + // user + userName := cfg.ClusterName + user := api.NewAuthInfo() + if cfg.EmbedCerts { + user.ClientCertificateData, err = ioutil.ReadFile(cfg.ClientCertificate) + if err != nil { + return err + } + user.ClientKeyData, err = ioutil.ReadFile(cfg.ClientKey) + if err != nil { + return err + } + } else { + user.ClientCertificate = cfg.ClientCertificate + user.ClientKey = cfg.ClientKey + } + apiCfg.AuthInfos[userName] = user + + // context + contextName := cfg.ClusterName + context := api.NewContext() + context.Cluster = cfg.ClusterName + context.AuthInfo = userName + apiCfg.Contexts[contextName] = context + + // Only set current context to minikube if the user has not used the keepContext flag + if !cfg.KeepContext { + apiCfg.CurrentContext = cfg.ClusterName + } + + return nil +} diff --git a/pkg/minikube/kubeconfig/update.go b/pkg/minikube/kubeconfig/update.go index 7080ee09ea..41c72b9a24 100644 --- a/pkg/minikube/kubeconfig/update.go +++ b/pkg/minikube/kubeconfig/update.go @@ -71,7 +71,7 @@ func update(cfg *Setup) error { return err } - err = PopulateKubeConfig(cfg, config) + err = Populate(cfg, config) if err != nil { return err } From 56213550049ae0fe6b2da23db14a4638e6246ac2 Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Tue, 6 Aug 2019 20:43:35 -0700 Subject: [PATCH 035/115] ranem DeleteContext func --- cmd/minikube/cmd/delete.go | 2 +- pkg/minikube/kubeconfig/context.go | 4 ++-- pkg/minikube/kubeconfig/context_test.go | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/minikube/cmd/delete.go b/cmd/minikube/cmd/delete.go index 72f40a4068..c8daa2e353 100644 --- a/cmd/minikube/cmd/delete.go +++ b/cmd/minikube/cmd/delete.go @@ -89,7 +89,7 @@ func runDelete(cmd *cobra.Command, args []string) { out.T(out.Crushed, `The "{{.cluster_name}}" cluster has been deleted.`, out.V{"cluster_name": profile}) machineName := pkg_config.GetMachineName() - if err := kubeconfig.DeleteKubeConfigContext(constants.KubeconfigPath, machineName); err != nil { + if err := kubeconfig.DeleteContext(constants.KubeconfigPath, machineName); err != nil { exit.WithError("update config", err) } diff --git a/pkg/minikube/kubeconfig/context.go b/pkg/minikube/kubeconfig/context.go index 14e53f0d41..f62e45def4 100644 --- a/pkg/minikube/kubeconfig/context.go +++ b/pkg/minikube/kubeconfig/context.go @@ -54,8 +54,8 @@ func SetCurrentContext(kubeCfgPath, name string) error { return nil } -// DeleteKubeConfigContext deletes the specified machine's kubeconfig context -func DeleteKubeConfigContext(kubeCfgPath, machineName string) error { +// DeleteContext deletes the specified machine's kubeconfig context +func DeleteContext(kubeCfgPath, machineName string) error { kcfg, err := readOrNew(kubeCfgPath) if err != nil { return errors.Wrap(err, "Error getting kubeconfig status") diff --git a/pkg/minikube/kubeconfig/context_test.go b/pkg/minikube/kubeconfig/context_test.go index 38e87cc492..0077c21c8d 100644 --- a/pkg/minikube/kubeconfig/context_test.go +++ b/pkg/minikube/kubeconfig/context_test.go @@ -22,9 +22,9 @@ import ( "testing" ) -func TestDeleteKubeConfigContext(t *testing.T) { +func TestDeleteContext(t *testing.T) { configFilename := tempFile(t, fakeKubeCfg) - if err := DeleteKubeConfigContext(configFilename, "la-croix"); err != nil { + if err := DeleteContext(configFilename, "la-croix"); err != nil { t.Fatal(err) } From 70a1d3b55d7ab486629d6e405554b073afbec73d Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Wed, 7 Aug 2019 12:01:13 -0700 Subject: [PATCH 036/115] chanfges --- pkg/minikube/kubeconfig/kubeconfig.go | 225 +++++++++++++++----------- pkg/minikube/kubeconfig/update.go | 108 +++++++++++++ 2 files changed, 243 insertions(+), 90 deletions(-) diff --git a/pkg/minikube/kubeconfig/kubeconfig.go b/pkg/minikube/kubeconfig/kubeconfig.go index 17b32a9801..a502690cdb 100644 --- a/pkg/minikube/kubeconfig/kubeconfig.go +++ b/pkg/minikube/kubeconfig/kubeconfig.go @@ -1,12 +1,9 @@ /* Copyright 2019 The Kubernetes Authors All rights reserved. - Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -34,12 +31,16 @@ import ( pkgutil "k8s.io/minikube/pkg/util" ) -// VeryifyMachineIP verifies the ip stored in kubeconfig. -func VeryifyMachineIP(ip net.IP, filename string, machineName string) (bool, error) { +// IsClusterInConfig verifies the ip stored in kubeconfig. +func IsClusterInConfig(ip net.IP, clusterName string, configPath ...string) (bool, error) { + path := PathFromEnv() + if configPath != nil { + path = configPath[0] + } if ip == nil { return false, fmt.Errorf("error, empty ip passed") } - kip, err := extractIP(filename, machineName) + kip, err := extractIP(clusterName, path) if err != nil { return false, err } @@ -51,13 +52,17 @@ func VeryifyMachineIP(ip net.IP, filename string, machineName string) (bool, err } -// GetPortFromKubeConfig returns the Port number stored for minikube in the kubeconfig specified -func Port(filename, machineName string) (int, error) { - con, err := readOrNew(filename) +// Port returns the Port number stored for minikube in the kubeconfig specified +func Port(clusterName string, configPath ...string) (int, error) { + path := PathFromEnv() + if configPath != nil { + path = configPath[0] + } + cfg, err := readOrNew(path) if err != nil { return 0, errors.Wrap(err, "Error getting kubeconfig status") } - cluster, ok := con.Clusters[machineName] + cluster, ok := cfg.Clusters[clusterName] if !ok { return 0, errors.Errorf("Kubeconfig does not have a record of the machine cluster") } @@ -73,8 +78,8 @@ func Port(filename, machineName string) (int, error) { return port, err } -// GetKubeConfigPath gets the path to the first kubeconfig -func Path() string { +// PathFromEnv() gets the path to the first kubeconfig +func PathFromEnv() string { kubeConfigEnv := os.Getenv(constants.KubeconfigEnvVar) if kubeConfigEnv == "" { return constants.KubeconfigPath @@ -82,85 +87,17 @@ func Path() string { return filepath.SplitList(kubeConfigEnv)[0] } -// readOrNew retrieves Kubernetes client configuration from a file. -// If no files exists, an empty configuration is returned. -func readOrNew(filename string) (*api.Config, error) { - data, err := ioutil.ReadFile(filename) - if os.IsNotExist(err) { - return api.NewConfig(), nil - } else if err != nil { - return nil, errors.Wrapf(err, "Error reading file %q", filename) - } - - // decode config, empty if no bytes - config, err := decode(data) - if err != nil { - return nil, errors.Errorf("could not read config: %v", err) - } - - // initialize nil maps - if config.AuthInfos == nil { - config.AuthInfos = map[string]*api.AuthInfo{} - } - if config.Clusters == nil { - config.Clusters = map[string]*api.Cluster{} - } - if config.Contexts == nil { - config.Contexts = map[string]*api.Context{} - } - - return config, nil -} - -<<<<<<< HEAD -// WriteConfig encodes the configuration and writes it to the given file. -// If the file exists, its contents will be overwritten. -func WriteConfig(config *api.Config, filename string) error { -||||||| merged common ancestors -// WriteConfig encodes the configuration and writes it to the given file. -// If the file exists, it's contents will be overwritten. -func WriteConfig(config *api.Config, filename string) error { -======= -// writeToFile encodes the configuration and writes it to the given file. -// If the file exists, it's contents will be overwritten. -func writeToFile(config runtime.Object, filename string) error { ->>>>>>> statisfy lint interfacer - if config == nil { - glog.Errorf("could not write to '%s': config can't be nil", filename) - } - - // encode config to YAML - data, err := runtime.Encode(latest.Codec, config) - if err != nil { - return errors.Errorf("could not write to '%s': failed to encode config: %v", filename, err) - } - - // create parent dir if doesn't exist - dir := filepath.Dir(filename) - if _, err := os.Stat(dir); os.IsNotExist(err) { - if err = os.MkdirAll(dir, 0755); err != nil { - return errors.Wrapf(err, "Error creating directory: %s", dir) - } - } - - // write with restricted permissions - if err := ioutil.WriteFile(filename, data, 0600); err != nil { - return errors.Wrapf(err, "Error writing file %s", filename) - } - if err := pkgutil.MaybeChownDirRecursiveToMinikubeUser(dir); err != nil { - return errors.Wrapf(err, "Error recursively changing ownership for dir: %s", dir) - } - - return nil -} - // extractIP returns the IP address stored for minikube in the kubeconfig specified -func extractIP(filename, machineName string) (net.IP, error) { - con, err := readOrNew(filename) +func extractIP(machineName string, configPath ...string) (net.IP, error) { + path := PathFromEnv() + if configPath != nil { + path = configPath[0] + } + apiCfg, err := readOrNew(path) if err != nil { return nil, errors.Wrap(err, "Error getting kubeconfig status") } - cluster, ok := con.Clusters[machineName] + cluster, ok := apiCfg.Clusters[machineName] if !ok { return nil, errors.Errorf("Kubeconfig does not have a record of the machine cluster") } @@ -176,6 +113,114 @@ func extractIP(filename, machineName string) (net.IP, error) { return ip, nil } +// UpdateIP overwrites the IP stored in kubeconfig with the provided IP. +func UpdateIP(ip net.IP, machineName string, configPath ...string) (bool, error) { + path := PathFromEnv() + if configPath != nil { + path = configPath[0] + } + + if ip == nil { + return false, fmt.Errorf("error, empty ip passed") + } + + kip, err := extractIP(machineName, path) + if err != nil { + return false, err + } + if kip.Equal(ip) { + return false, nil + } + kport, err := Port(machineName, path) + if err != nil { + return false, err + } + cfg, err := readOrNew(path) + if err != nil { + return false, errors.Wrap(err, "Error getting kubeconfig status") + } + // Safe to lookup server because if field non-existent getIPFromKubeconfig would have given an error + cfg.Clusters[machineName].Server = "https://" + ip.String() + ":" + strconv.Itoa(kport) + err = writeToFile(cfg, path) + if err != nil { + return false, err + } + // Kubeconfig IP reconfigured + return true, nil +} + +// writeToFile encodes the configuration and writes it to the given file. +// If the file exists, it's contents will be overwritten. +func writeToFile(config runtime.Object, configPath ...string) error { + fPath := PathFromEnv() + if configPath != nil { + fPath = configPath[0] + } + + if config == nil { + glog.Errorf("could not write to '%s': config can't be nil", fPath) + } + + // encode config to YAML + data, err := runtime.Encode(latest.Codec, config) + if err != nil { + return errors.Errorf("could not write to '%s': failed to encode config: %v", fPath, err) + } + + // create parent dir if doesn't exist + dir := filepath.Dir(fPath) + if _, err := os.Stat(dir); os.IsNotExist(err) { + if err = os.MkdirAll(dir, 0755); err != nil { + return errors.Wrapf(err, "Error creating directory: %s", dir) + } + } + + // write with restricted permissions + if err := ioutil.WriteFile(fPath, data, 0600); err != nil { + return errors.Wrapf(err, "Error writing file %s", fPath) + } + if err := pkgutil.MaybeChownDirRecursiveToMinikubeUser(dir); err != nil { + return errors.Wrapf(err, "Error recursively changing ownership for dir: %s", dir) + } + + return nil +} + +// readOrNew retrieves Kubernetes client configuration from a file. +// If no files exists, an empty configuration is returned. +func readOrNew(configPath ...string) (*api.Config, error) { + fPath := PathFromEnv() + if configPath != nil { + fPath = configPath[0] + } + + data, err := ioutil.ReadFile(fPath) + if os.IsNotExist(err) { + return api.NewConfig(), nil + } else if err != nil { + return nil, errors.Wrapf(err, "Error reading file %q", fPath) + } + + // decode config, empty if no bytes + kcfg, err := decode(data) + if err != nil { + return nil, errors.Errorf("could not read config: %v", err) + } + + // initialize nil maps + if kcfg.AuthInfos == nil { + kcfg.AuthInfos = map[string]*api.AuthInfo{} + } + if kcfg.Clusters == nil { + kcfg.Clusters = map[string]*api.Cluster{} + } + if kcfg.Contexts == nil { + kcfg.Contexts = map[string]*api.Context{} + } + + return kcfg, nil +} + // decode reads a Config object from bytes. // Returns empty config if no bytes. func decode(data []byte) (*api.Config, error) { @@ -184,10 +229,10 @@ func decode(data []byte) (*api.Config, error) { return api.NewConfig(), nil } - config, _, err := latest.Codec.Decode(data, nil, nil) + kcfg, _, err := latest.Codec.Decode(data, nil, nil) if err != nil { return nil, errors.Wrapf(err, "Error decoding config from data: %s", string(data)) } - return config.(*api.Config), nil -} + return kcfg.(*api.Config), nil +} \ No newline at end of file diff --git a/pkg/minikube/kubeconfig/update.go b/pkg/minikube/kubeconfig/update.go index 41c72b9a24..99ddb9ed84 100644 --- a/pkg/minikube/kubeconfig/update.go +++ b/pkg/minikube/kubeconfig/update.go @@ -18,7 +18,11 @@ package kubeconfig import ( "fmt" + "io/ioutil" "net" + "net/url" + "os" + "path/filepath" "strconv" "strings" @@ -26,9 +30,13 @@ import ( "github.com/golang/glog" "github.com/pkg/errors" "github.com/spf13/viper" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/client-go/tools/clientcmd/api" + "k8s.io/kubernetes/pkg/scheduler/api/latest" cfg "k8s.io/minikube/pkg/minikube/config" "k8s.io/minikube/pkg/minikube/constants" "k8s.io/minikube/pkg/minikube/exit" + pkgutil "k8s.io/minikube/pkg/util" ) // Update sets up kubeconfig to be used by kubectl @@ -112,3 +120,103 @@ func UpdateIP(ip net.IP, filename string, machineName string) (bool, error) { // Kubeconfig IP reconfigured return true, nil } + +// writeToFile encodes the configuration and writes it to the given file. +// If the file exists, it's contents will be overwritten. +func writeToFile(config runtime.Object, filename string) error { + if config == nil { + glog.Errorf("could not write to '%s': config can't be nil", filename) + } + + // encode config to YAML + data, err := runtime.Encode(latest.Codec, config) + if err != nil { + return errors.Errorf("could not write to '%s': failed to encode config: %v", filename, err) + } + + // create parent dir if doesn't exist + dir := filepath.Dir(filename) + if _, err := os.Stat(dir); os.IsNotExist(err) { + if err = os.MkdirAll(dir, 0755); err != nil { + return errors.Wrapf(err, "Error creating directory: %s", dir) + } + } + + // write with restricted permissions + if err := ioutil.WriteFile(filename, data, 0600); err != nil { + return errors.Wrapf(err, "Error writing file %s", filename) + } + if err := pkgutil.MaybeChownDirRecursiveToMinikubeUser(dir); err != nil { + return errors.Wrapf(err, "Error recursively changing ownership for dir: %s", dir) + } + + return nil +} + +// readOrNew retrieves Kubernetes client configuration from a file. +// If no files exists, an empty configuration is returned. +func readOrNew(filename string) (*api.Config, error) { + data, err := ioutil.ReadFile(filename) + if os.IsNotExist(err) { + return api.NewConfig(), nil + } else if err != nil { + return nil, errors.Wrapf(err, "Error reading file %q", filename) + } + + // decode config, empty if no bytes + config, err := decode(data) + if err != nil { + return nil, errors.Errorf("could not read config: %v", err) + } + + // initialize nil maps + if config.AuthInfos == nil { + config.AuthInfos = map[string]*api.AuthInfo{} + } + if config.Clusters == nil { + config.Clusters = map[string]*api.Cluster{} + } + if config.Contexts == nil { + config.Contexts = map[string]*api.Context{} + } + + return config, nil +} + +// extractIP returns the IP address stored for minikube in the kubeconfig specified +func extractIP(filename, machineName string) (net.IP, error) { + con, err := readOrNew(filename) + if err != nil { + return nil, errors.Wrap(err, "Error getting kubeconfig status") + } + cluster, ok := con.Clusters[machineName] + if !ok { + return nil, errors.Errorf("Kubeconfig does not have a record of the machine cluster") + } + kurl, err := url.Parse(cluster.Server) + if err != nil { + return net.ParseIP(cluster.Server), nil + } + kip, _, err := net.SplitHostPort(kurl.Host) + if err != nil { + return net.ParseIP(kurl.Host), nil + } + ip := net.ParseIP(kip) + return ip, nil +} + +// decode reads a Config object from bytes. +// Returns empty config if no bytes. +func decode(data []byte) (*api.Config, error) { + // if no data, return empty config + if len(data) == 0 { + return api.NewConfig(), nil + } + + config, _, err := latest.Codec.Decode(data, nil, nil) + if err != nil { + return nil, errors.Wrapf(err, "Error decoding config from data: %s", string(data)) + } + + return config.(*api.Config), nil +} From 5a2a849bd209d0400fcff2ffe2638813830efd42 Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Wed, 7 Aug 2019 15:10:22 -0700 Subject: [PATCH 037/115] use file path --- pkg/minikube/kubeconfig/context_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/minikube/kubeconfig/context_test.go b/pkg/minikube/kubeconfig/context_test.go index 0077c21c8d..607c1e8be1 100644 --- a/pkg/minikube/kubeconfig/context_test.go +++ b/pkg/minikube/kubeconfig/context_test.go @@ -19,6 +19,7 @@ package kubeconfig import ( "io/ioutil" "os" + "path/filepath" "testing" ) @@ -121,8 +122,8 @@ func TestUnsetCurrentContext(t *testing.T) { func TestUnsetCurrentContextOnlyChangesIfProfileIsTheCurrentContext(t *testing.T) { contextName := "minikube" - kubeConfigFile := "./testdata/kubeconfig/config2" + kubeConfigFile := filepath.Join("testdata", "kubeconfig", "config2") cfg, err := readOrNew(kubeConfigFile) if err != nil { t.Fatalf("Error not expected but got %v", err) From 8899900889a9c0ed5add0dd3cdc25c9a482c10cd Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Wed, 7 Aug 2019 15:56:56 -0700 Subject: [PATCH 038/115] fix the wrong import --- pkg/minikube/kubeconfig/update.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/minikube/kubeconfig/update.go b/pkg/minikube/kubeconfig/update.go index 99ddb9ed84..1d839b2bed 100644 --- a/pkg/minikube/kubeconfig/update.go +++ b/pkg/minikube/kubeconfig/update.go @@ -32,7 +32,7 @@ import ( "github.com/spf13/viper" "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/tools/clientcmd/api" - "k8s.io/kubernetes/pkg/scheduler/api/latest" + "k8s.io/client-go/tools/clientcmd/api/latest" cfg "k8s.io/minikube/pkg/minikube/config" "k8s.io/minikube/pkg/minikube/constants" "k8s.io/minikube/pkg/minikube/exit" From 733ba21a36a3ac66fe0d28c1b6dd137f464786b6 Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Wed, 7 Aug 2019 16:29:49 -0700 Subject: [PATCH 039/115] decouple kubeconfig update from Host --- cmd/minikube/cmd/start.go | 12 +++++++++++- pkg/minikube/kubeconfig/update.go | 15 +++++---------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/cmd/minikube/cmd/start.go b/cmd/minikube/cmd/start.go index df2ccfe02c..c44daabb0a 100644 --- a/cmd/minikube/cmd/start.go +++ b/cmd/minikube/cmd/start.go @@ -305,8 +305,10 @@ func runStart(cmd *cobra.Command, args []string) { // setup kube adm and certs and return bootstrapperx bs := setupKubeAdm(machineAPI, config.KubernetesConfig) + // The kube config must be update must come before bootstrapping, otherwise health checks may use a stale IP - kubeconfig := kubeconfig.Update(host, &config) + kubeconfig := setupKubeconfig(host, &config) + // pull images or restart cluster bootstrapCluster(bs, cr, mRunner, config.KubernetesConfig, preExists, isUpgrade) configureMounts() @@ -324,6 +326,14 @@ func runStart(cmd *cobra.Command, args []string) { } +func setupKubeconfig(host *host.Host, config *cfg.Config) *kubeconfig.Setup { + addr, err := host.Driver.GetURL() + if err != nil { + exit.WithError("Failed to get host URL", err) + } + return kubeconfig.Update(addr, config) +} + func handleDownloadOnly(cacheGroup *errgroup.Group, k8sVersion string) { // If --download-only, complete the remaining downloads and exit. if !viper.GetBool(downloadOnly) { diff --git a/pkg/minikube/kubeconfig/update.go b/pkg/minikube/kubeconfig/update.go index 1d839b2bed..54b0c2b50e 100644 --- a/pkg/minikube/kubeconfig/update.go +++ b/pkg/minikube/kubeconfig/update.go @@ -26,7 +26,6 @@ import ( "strconv" "strings" - "github.com/docker/machine/libmachine/host" "github.com/golang/glog" "github.com/pkg/errors" "github.com/spf13/viper" @@ -40,20 +39,16 @@ import ( ) // Update sets up kubeconfig to be used by kubectl -func Update(h *host.Host, c *cfg.Config) *Setup { - addr, err := h.Driver.GetURL() - if err != nil { - exit.WithError("Failed to get driver URL", err) - } - addr = strings.Replace(addr, "tcp://", "https://", -1) - addr = strings.Replace(addr, ":2376", ":"+strconv.Itoa(c.KubernetesConfig.NodePort), -1) +func Update(clusterURL string, c *cfg.Config) *Setup { + clusterURL = strings.Replace(clusterURL, "tcp://", "https://", -1) + clusterURL = strings.Replace(clusterURL, ":2376", ":"+strconv.Itoa(c.KubernetesConfig.NodePort), -1) if c.KubernetesConfig.APIServerName != constants.APIServerName { - addr = strings.Replace(addr, c.KubernetesConfig.NodeIP, c.KubernetesConfig.APIServerName, -1) + clusterURL = strings.Replace(clusterURL, c.KubernetesConfig.NodeIP, c.KubernetesConfig.APIServerName, -1) } kcs := &Setup{ ClusterName: cfg.GetMachineName(), - ClusterServerAddress: addr, + ClusterServerAddress: clusterURL, ClientCertificate: constants.MakeMiniPath("client.crt"), ClientKey: constants.MakeMiniPath("client.key"), CertificateAuthority: constants.MakeMiniPath("ca.crt"), From a15201b131b8fa868bdd19d7fb32de5bd48492c7 Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Wed, 7 Aug 2019 16:39:37 -0700 Subject: [PATCH 040/115] remove exit from kubeconfig update lib --- cmd/minikube/cmd/start.go | 9 ++++++--- pkg/minikube/kubeconfig/kubeconfig_test.go | 6 +++--- pkg/minikube/kubeconfig/setup.go | 10 +++++----- pkg/minikube/kubeconfig/update.go | 14 +++++++------- 4 files changed, 21 insertions(+), 18 deletions(-) diff --git a/cmd/minikube/cmd/start.go b/cmd/minikube/cmd/start.go index c44daabb0a..7ac5f87a4d 100644 --- a/cmd/minikube/cmd/start.go +++ b/cmd/minikube/cmd/start.go @@ -307,7 +307,10 @@ func runStart(cmd *cobra.Command, args []string) { bs := setupKubeAdm(machineAPI, config.KubernetesConfig) // The kube config must be update must come before bootstrapping, otherwise health checks may use a stale IP - kubeconfig := setupKubeconfig(host, &config) + kubeconfig, err := setupKubeconfig(host, &config) + if err != nil { + exit.WithError("Failed to setup kubeconfig", err) + } // pull images or restart cluster bootstrapCluster(bs, cr, mRunner, config.KubernetesConfig, preExists, isUpgrade) @@ -326,12 +329,12 @@ func runStart(cmd *cobra.Command, args []string) { } -func setupKubeconfig(host *host.Host, config *cfg.Config) *kubeconfig.Setup { +func setupKubeconfig(host *host.Host, config *cfg.Config) (*kubeconfig.Setup, error) { addr, err := host.Driver.GetURL() if err != nil { exit.WithError("Failed to get host URL", err) } - return kubeconfig.Update(addr, config) + return kubeconfig.Setup(addr, config) } func handleDownloadOnly(cacheGroup *errgroup.Group, k8sVersion string) { diff --git a/pkg/minikube/kubeconfig/kubeconfig_test.go b/pkg/minikube/kubeconfig/kubeconfig_test.go index 21c56975c6..f0185a3ac3 100644 --- a/pkg/minikube/kubeconfig/kubeconfig_test.go +++ b/pkg/minikube/kubeconfig/kubeconfig_test.go @@ -97,7 +97,7 @@ users: `) func Test_update(t *testing.T) { - setupCfg := &Setup{ + setupCfg := &KCS{ ClusterName: "test", ClusterServerAddress: "192.168.1.1:8080", ClientCertificate: "/home/apiserver.crt", @@ -108,7 +108,7 @@ func Test_update(t *testing.T) { var tests = []struct { description string - cfg *Setup + cfg *KCS existingCfg []byte expected api.Config err bool @@ -128,7 +128,7 @@ func Test_update(t *testing.T) { }, { description: "keep context", - cfg: &Setup{ + cfg: &KCS{ ClusterName: "test", ClusterServerAddress: "192.168.1.1:8080", ClientCertificate: "/home/apiserver.crt", diff --git a/pkg/minikube/kubeconfig/setup.go b/pkg/minikube/kubeconfig/setup.go index 238c79c915..2cbceb8fde 100644 --- a/pkg/minikube/kubeconfig/setup.go +++ b/pkg/minikube/kubeconfig/setup.go @@ -23,8 +23,8 @@ import ( "k8s.io/client-go/tools/clientcmd/api" ) -// Setup is the kubeconfig setup -type Setup struct { +// KCS is the kubeconfig setup +type KCS struct { // The name of the cluster for this context ClusterName string @@ -52,17 +52,17 @@ type Setup struct { } // SetKubeConfigFile sets the kubeconfig file -func (k *Setup) setPath(kubeConfigFile string) { +func (k *KCS) setPath(kubeConfigFile string) { k.kubeConfigFile.Store(kubeConfigFile) } // fileContent gets the kubeconfig file -func (k *Setup) fileContent() string { +func (k *KCS) fileContent() string { return k.kubeConfigFile.Load().(string) } // Populate populates an api.Config object with values from *Setup -func Populate(cfg *Setup, apiCfg *api.Config) error { +func Populate(cfg *KCS, apiCfg *api.Config) error { var err error clusterName := cfg.ClusterName cluster := api.NewCluster() diff --git a/pkg/minikube/kubeconfig/update.go b/pkg/minikube/kubeconfig/update.go index 54b0c2b50e..44cf4ce437 100644 --- a/pkg/minikube/kubeconfig/update.go +++ b/pkg/minikube/kubeconfig/update.go @@ -34,19 +34,18 @@ import ( "k8s.io/client-go/tools/clientcmd/api/latest" cfg "k8s.io/minikube/pkg/minikube/config" "k8s.io/minikube/pkg/minikube/constants" - "k8s.io/minikube/pkg/minikube/exit" pkgutil "k8s.io/minikube/pkg/util" ) -// Update sets up kubeconfig to be used by kubectl -func Update(clusterURL string, c *cfg.Config) *Setup { +// Setup sets up kubeconfig to be used by kubectl +func Setup(clusterURL string, c *cfg.Config) (*KCS, error) { clusterURL = strings.Replace(clusterURL, "tcp://", "https://", -1) clusterURL = strings.Replace(clusterURL, ":2376", ":"+strconv.Itoa(c.KubernetesConfig.NodePort), -1) if c.KubernetesConfig.APIServerName != constants.APIServerName { clusterURL = strings.Replace(clusterURL, c.KubernetesConfig.NodeIP, c.KubernetesConfig.APIServerName, -1) } - kcs := &Setup{ + kcs := &KCS{ ClusterName: cfg.GetMachineName(), ClusterServerAddress: clusterURL, ClientCertificate: constants.MakeMiniPath("client.crt"), @@ -57,15 +56,16 @@ func Update(clusterURL string, c *cfg.Config) *Setup { } kcs.setPath(Path()) if err := update(kcs); err != nil { - exit.WithError("Failed to setup kubeconfig", err) + return kcs, fmt.Errorf("error update kubeconfig: %v", err) + } - return kcs + return kcs, nil } // update reads config from disk, adds the minikube settings, and writes it back. // activeContext is true when minikube is the CurrentContext // If no CurrentContext is set, the given name will be used. -func update(cfg *Setup) error { +func update(cfg *KCS) error { glog.Infoln("Using kubeconfig: ", cfg.fileContent()) // read existing config or create new if does not exist From 1e8961f385ac9e073f74eb34bb77e2a623851f56 Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Wed, 7 Aug 2019 16:41:13 -0700 Subject: [PATCH 041/115] rename file --- pkg/minikube/kubeconfig/{setup.go => kcs.go} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename pkg/minikube/kubeconfig/{setup.go => kcs.go} (100%) diff --git a/pkg/minikube/kubeconfig/setup.go b/pkg/minikube/kubeconfig/kcs.go similarity index 100% rename from pkg/minikube/kubeconfig/setup.go rename to pkg/minikube/kubeconfig/kcs.go From 08e3e1426369c576fb5c166a3fafe7f28219d87c Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Wed, 7 Aug 2019 17:13:09 -0700 Subject: [PATCH 042/115] add embeded-certs flag to config, decouple kubeconfig from viper --- cmd/minikube/cmd/start.go | 46 +++++++++++++++-------------- pkg/minikube/bootstrapper/certs.go | 4 +-- pkg/minikube/config/types.go | 1 + pkg/minikube/constants/constants.go | 2 ++ pkg/minikube/kubeconfig/kcs.go | 2 +- pkg/minikube/kubeconfig/update.go | 15 +++++----- 6 files changed, 37 insertions(+), 33 deletions(-) diff --git a/cmd/minikube/cmd/start.go b/cmd/minikube/cmd/start.go index 7ac5f87a4d..c99d8ef41e 100644 --- a/cmd/minikube/cmd/start.go +++ b/cmd/minikube/cmd/start.go @@ -97,12 +97,12 @@ const ( uuid = "uuid" vpnkitSock = "hyperkit-vpnkit-sock" vsockPorts = "hyperkit-vsock-ports" - // embedCerts = "embed-certs" //TODO medya - noVTXCheck = "no-vtx-check" - downloadOnly = "download-only" - dnsProxy = "dns-proxy" - hostDNSResolver = "host-dns-resolver" - waitUntilHealthy = "wait" + embedCerts = "embed-certs" + noVTXCheck = "no-vtx-check" + downloadOnly = "download-only" + dnsProxy = "dns-proxy" + hostDNSResolver = "host-dns-resolver" + waitUntilHealthy = "wait" ) var ( @@ -134,20 +134,21 @@ func initMinikubeFlags() { viper.SetEnvKeyReplacer(strings.NewReplacer("-", "_")) viper.AutomaticEnv() - startCmd.Flags().Int(cpus, constants.DefaultCPUS, "Number of CPUs allocated to the minikube VM") - startCmd.Flags().String(memory, constants.DefaultMemorySize, "Amount of RAM allocated to the minikube VM (format: [], where unit = b, k, m or g)") - startCmd.Flags().String(humanReadableDiskSize, constants.DefaultDiskSize, "Disk size allocated to the minikube VM (format: [], where unit = b, k, m or g)") + startCmd.Flags().Int(cpus, constants.DefaultCPUS, "Number of CPUs allocated to the minikube VM.") + startCmd.Flags().String(memory, constants.DefaultMemorySize, "Amount of RAM allocated to the minikube VM (format: [], where unit = b, k, m or g).") + startCmd.Flags().String(humanReadableDiskSize, constants.DefaultDiskSize, "Disk size allocated to the minikube VM (format: [], where unit = b, k, m or g).") startCmd.Flags().Bool(downloadOnly, false, "If true, only download and cache files for later use - don't install or start anything.") startCmd.Flags().Bool(cacheImages, true, "If true, cache docker images for the current bootstrapper and load them into the machine. Always false with --vm-driver=none.") - startCmd.Flags().String(isoURL, constants.DefaultISOURL, "Location of the minikube iso") + startCmd.Flags().String(isoURL, constants.DefaultISOURL, "Location of the minikube iso.") startCmd.Flags().Bool(keepContext, constants.DefaultKeepContext, "This will keep the existing kubectl context and will create a minikube context.") - startCmd.Flags().String(containerRuntime, "docker", "The container runtime to be used (docker, crio, containerd)") - startCmd.Flags().Bool(createMount, false, "This will start the mount daemon and automatically mount files into minikube") - startCmd.Flags().String(mountString, constants.DefaultMountDir+":"+constants.DefaultMountEndpoint, "The argument to pass the minikube mount command on start") - startCmd.Flags().String(criSocket, "", "The cri socket path to be used") - startCmd.Flags().String(networkPlugin, "", "The name of the network plugin") - startCmd.Flags().Bool(enableDefaultCNI, false, "Enable the default CNI plugin (/etc/cni/net.d/k8s.conf). Used in conjunction with \"--network-plugin=cni\"") - startCmd.Flags().Bool(waitUntilHealthy, true, "Wait until Kubernetes core services are healthy before exiting") + startCmd.Flags().Bool(embedCerts, constants.DefaultEmbedCerts, "if true, will embed the certs in kubeconfig.") + startCmd.Flags().String(containerRuntime, "docker", "The container runtime to be used (docker, crio, containerd).") + startCmd.Flags().Bool(createMount, false, "This will start the mount daemon and automatically mount files into minikube.") + startCmd.Flags().String(mountString, constants.DefaultMountDir+":"+constants.DefaultMountEndpoint, "The argument to pass the minikube mount command on start.") + startCmd.Flags().String(criSocket, "", "The cri socket path to be used.") + startCmd.Flags().String(networkPlugin, "", "The name of the network plugin.") + startCmd.Flags().Bool(enableDefaultCNI, false, "Enable the default CNI plugin (/etc/cni/net.d/k8s.conf). Used in conjunction with \"--network-plugin=cni\".") + startCmd.Flags().Bool(waitUntilHealthy, true, "Wait until Kubernetes core services are healthy before exiting.") } // initKubernetesFlags inits the commandline flags for kubernetes related options @@ -273,7 +274,7 @@ func runStart(cmd *cobra.Command, args []string) { validateDriverVersion(viper.GetString(vmDriver)) k8sVersion, isUpgrade := getKubernetesVersion() - config, err := generateConfig(cmd, k8sVersion) + config, err := generateCfgFromFlags(cmd, k8sVersion) if err != nil { exit.WithError("Failed to generate config", err) } @@ -329,7 +330,7 @@ func runStart(cmd *cobra.Command, args []string) { } -func setupKubeconfig(host *host.Host, config *cfg.Config) (*kubeconfig.Setup, error) { +func setupKubeconfig(host *host.Host, config *cfg.Config) (*kubeconfig.KCS, error) { addr, err := host.Driver.GetURL() if err != nil { exit.WithError("Failed to get host URL", err) @@ -414,7 +415,7 @@ func showVersionInfo(k8sVersion string, cr cruntime.Manager) { } } -func showKubectlConnectInfo(kubeconfig *kubeconfig.Setup) { +func showKubectlConnectInfo(kubeconfig *kubeconfig.KCS) { if kubeconfig.KeepContext { out.T(out.Kubectl, "To connect to this cluster, use: kubectl --context={{.name}}", out.V{"name": kubeconfig.ClusterName}) } else { @@ -572,8 +573,8 @@ func waitCacheImages(g *errgroup.Group) { } } -// generateConfig generates cfg.Config based on flags and supplied arguments -func generateConfig(cmd *cobra.Command, k8sVersion string) (cfg.Config, error) { +// generateCfgFromFlags generates cfg.Config based on flags and supplied arguments +func generateCfgFromFlags(cmd *cobra.Command, k8sVersion string) (cfg.Config, error) { r, err := cruntime.New(cruntime.Config{Type: viper.GetString(containerRuntime)}) if err != nil { return cfg.Config{}, err @@ -629,6 +630,7 @@ func generateConfig(cmd *cobra.Command, k8sVersion string) (cfg.Config, error) { cfg := cfg.Config{ MachineConfig: cfg.MachineConfig{ KeepContext: viper.GetBool(keepContext), + EmbedCerts: viper.GetBool(embedCerts), MinikubeISO: viper.GetString(isoURL), Memory: pkgutil.CalculateSizeInMB(viper.GetString(memory)), CPUs: viper.GetInt(cpus), diff --git a/pkg/minikube/bootstrapper/certs.go b/pkg/minikube/bootstrapper/certs.go index 4cfb8f424e..adaadc732a 100644 --- a/pkg/minikube/bootstrapper/certs.go +++ b/pkg/minikube/bootstrapper/certs.go @@ -67,7 +67,7 @@ func SetupCerts(cmd command.Runner, k8s config.KubernetesConfig) error { copyableFiles = append(copyableFiles, certFile) } - kubeCfgSetup := &kubeconfig.Setup{ + kcs := &kubeconfig.KCS{ ClusterName: k8s.NodeName, ClusterServerAddress: fmt.Sprintf("https://localhost:%d", k8s.NodePort), ClientCertificate: path.Join(util.DefaultCertPath, "apiserver.crt"), @@ -77,7 +77,7 @@ func SetupCerts(cmd command.Runner, k8s config.KubernetesConfig) error { } kubeCfg := api.NewConfig() - err := kubeconfig.Populate(kubeCfgSetup, kubeCfg) + err := kubeconfig.Populate(kcs, kubeCfg) if err != nil { return errors.Wrap(err, "populating kubeconfig") } diff --git a/pkg/minikube/config/types.go b/pkg/minikube/config/types.go index 5716bb4c33..0f7f7708e1 100644 --- a/pkg/minikube/config/types.go +++ b/pkg/minikube/config/types.go @@ -37,6 +37,7 @@ type Config struct { // MachineConfig contains the parameters used to start a cluster. type MachineConfig struct { KeepContext bool // used by start and profile command to or not to switch kubectl's current context + EmbedCerts bool // used by kubeconfig.Setup MinikubeISO string Memory int CPUs int diff --git a/pkg/minikube/constants/constants.go b/pkg/minikube/constants/constants.go index cbd0497c2f..83e93edb23 100644 --- a/pkg/minikube/constants/constants.go +++ b/pkg/minikube/constants/constants.go @@ -129,6 +129,8 @@ func MakeMiniPath(fileName ...string) string { var MountProcessFileName = ".mount-process" const ( + // DefaultEmbedCerts is if the certs should be embedded in the kubeconfig file + DefaultEmbedCerts = false // DefaultKeepContext is if we should keep context by default DefaultKeepContext = false // SHASuffix is the suffix of a SHA-256 checksum file diff --git a/pkg/minikube/kubeconfig/kcs.go b/pkg/minikube/kubeconfig/kcs.go index 2cbceb8fde..634ad11906 100644 --- a/pkg/minikube/kubeconfig/kcs.go +++ b/pkg/minikube/kubeconfig/kcs.go @@ -61,7 +61,7 @@ func (k *KCS) fileContent() string { return k.kubeConfigFile.Load().(string) } -// Populate populates an api.Config object with values from *Setup +// Populate populates an api.Config object with values from *KCS func Populate(cfg *KCS, apiCfg *api.Config) error { var err error clusterName := cfg.ClusterName diff --git a/pkg/minikube/kubeconfig/update.go b/pkg/minikube/kubeconfig/update.go index 44cf4ce437..cb7f1978be 100644 --- a/pkg/minikube/kubeconfig/update.go +++ b/pkg/minikube/kubeconfig/update.go @@ -28,7 +28,6 @@ import ( "github.com/golang/glog" "github.com/pkg/errors" - "github.com/spf13/viper" "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/tools/clientcmd/api" "k8s.io/client-go/tools/clientcmd/api/latest" @@ -51,8 +50,8 @@ func Setup(clusterURL string, c *cfg.Config) (*KCS, error) { ClientCertificate: constants.MakeMiniPath("client.crt"), ClientKey: constants.MakeMiniPath("client.key"), CertificateAuthority: constants.MakeMiniPath("ca.crt"), - KeepContext: viper.GetBool("keep-context"), - EmbedCerts: viper.GetBool("embed-certs"), + KeepContext: c.MachineConfig.KeepContext, + EmbedCerts: c.MachineConfig.EmbedCerts, } kcs.setPath(Path()) if err := update(kcs); err != nil { @@ -65,22 +64,22 @@ func Setup(clusterURL string, c *cfg.Config) (*KCS, error) { // update reads config from disk, adds the minikube settings, and writes it back. // activeContext is true when minikube is the CurrentContext // If no CurrentContext is set, the given name will be used. -func update(cfg *KCS) error { - glog.Infoln("Using kubeconfig: ", cfg.fileContent()) +func update(kcs *KCS) error { + glog.Infoln("Using kubeconfig: ", kcs.fileContent()) // read existing config or create new if does not exist - config, err := readOrNew(cfg.fileContent()) + config, err := readOrNew(kcs.fileContent()) if err != nil { return err } - err = Populate(cfg, config) + err = Populate(kcs, config) if err != nil { return err } // write back to disk - if err := writeToFile(config, cfg.fileContent()); err != nil { + if err := writeToFile(config, kcs.fileContent()); err != nil { return errors.Wrap(err, "writing kubeconfig") } return nil From c064d5088185f7a6daeeb4895428c0bae0055efc Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Wed, 7 Aug 2019 17:35:55 -0700 Subject: [PATCH 043/115] more clearn func names and move var closer where used --- cmd/minikube/cmd/status.go | 2 +- pkg/minikube/kubeconfig/context_test.go | 6 ++---- pkg/minikube/kubeconfig/kubeconfig_test.go | 4 ++-- pkg/minikube/kubeconfig/update.go | 23 ---------------------- 4 files changed, 5 insertions(+), 30 deletions(-) diff --git a/cmd/minikube/cmd/status.go b/cmd/minikube/cmd/status.go index 83822cb13b..20f9c25cf0 100644 --- a/cmd/minikube/cmd/status.go +++ b/cmd/minikube/cmd/status.go @@ -105,7 +105,7 @@ var statusCmd = &cobra.Command{ returnCode |= clusterNotRunningStatusFlag } - ks, err := kubeconfig.VeryifyMachineIP(ip, kubeconfig.Path(), config.GetMachineName()) + ks, err := kubeconfig.IsMachineInConfig(ip, config.GetMachineName(), kubeconfig.Path()) if err != nil { glog.Errorln("Error kubeconfig status:", err) } diff --git a/pkg/minikube/kubeconfig/context_test.go b/pkg/minikube/kubeconfig/context_test.go index 607c1e8be1..a07ce8a0f2 100644 --- a/pkg/minikube/kubeconfig/context_test.go +++ b/pkg/minikube/kubeconfig/context_test.go @@ -48,8 +48,6 @@ func TestDeleteContext(t *testing.T) { } func TestSetCurrentContext(t *testing.T) { - contextName := "minikube" - kubeConfigFile, err := ioutil.TempFile("/tmp", "kubeconfig") if err != nil { t.Fatalf("Error not expected but got %v", err) @@ -65,6 +63,7 @@ func TestSetCurrentContext(t *testing.T) { t.Errorf("Expected empty context but got %v", cfg.CurrentContext) } + contextName := "minikube" err = SetCurrentContext(kubeConfigFile.Name(), contextName) if err != nil { t.Fatalf("Error not expected but got %v", err) @@ -80,9 +79,8 @@ func TestSetCurrentContext(t *testing.T) { if err != nil { t.Fatalf("Error not expected but got %v", err) } - if cfg.CurrentContext != contextName { - t.Errorf("Expected context name %s but got %s", contextName, cfg.CurrentContext) + t.Errorf("Expected context name %s but got %v : ", contextName, cfg.CurrentContext) } } diff --git a/pkg/minikube/kubeconfig/kubeconfig_test.go b/pkg/minikube/kubeconfig/kubeconfig_test.go index f0185a3ac3..b5b3b32223 100644 --- a/pkg/minikube/kubeconfig/kubeconfig_test.go +++ b/pkg/minikube/kubeconfig/kubeconfig_test.go @@ -177,7 +177,7 @@ func Test_update(t *testing.T) { } } -func TestVeryifyMachineIP(t *testing.T) { +func TestIsMachineInConfig(t *testing.T) { var tests = []struct { description string @@ -215,7 +215,7 @@ func TestVeryifyMachineIP(t *testing.T) { t.Run(test.description, func(t *testing.T) { t.Parallel() configFilename := tempFile(t, test.existing) - statusActual, err := VeryifyMachineIP(test.ip, configFilename, "minikube") + statusActual, err := IsMachineInConfig(test.ip, configFilename, "minikube") if err != nil && !test.err { t.Errorf("Got unexpected error: %v", err) } diff --git a/pkg/minikube/kubeconfig/update.go b/pkg/minikube/kubeconfig/update.go index cb7f1978be..c0eeba4d7d 100644 --- a/pkg/minikube/kubeconfig/update.go +++ b/pkg/minikube/kubeconfig/update.go @@ -20,7 +20,6 @@ import ( "fmt" "io/ioutil" "net" - "net/url" "os" "path/filepath" "strconv" @@ -177,28 +176,6 @@ func readOrNew(filename string) (*api.Config, error) { return config, nil } -// extractIP returns the IP address stored for minikube in the kubeconfig specified -func extractIP(filename, machineName string) (net.IP, error) { - con, err := readOrNew(filename) - if err != nil { - return nil, errors.Wrap(err, "Error getting kubeconfig status") - } - cluster, ok := con.Clusters[machineName] - if !ok { - return nil, errors.Errorf("Kubeconfig does not have a record of the machine cluster") - } - kurl, err := url.Parse(cluster.Server) - if err != nil { - return net.ParseIP(cluster.Server), nil - } - kip, _, err := net.SplitHostPort(kurl.Host) - if err != nil { - return net.ParseIP(kurl.Host), nil - } - ip := net.ParseIP(kip) - return ip, nil -} - // decode reads a Config object from bytes. // Returns empty config if no bytes. func decode(data []byte) (*api.Config, error) { From d3e4e78caadbd1b50bfff21dd9f67fea89104443 Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Wed, 7 Aug 2019 17:39:58 -0700 Subject: [PATCH 044/115] remove redudnent arugment --- cmd/minikube/cmd/status.go | 4 ++-- pkg/minikube/kubeconfig/kubeconfig_test.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/minikube/cmd/status.go b/cmd/minikube/cmd/status.go index 20f9c25cf0..c34abb9869 100644 --- a/cmd/minikube/cmd/status.go +++ b/cmd/minikube/cmd/status.go @@ -92,7 +92,7 @@ var statusCmd = &cobra.Command{ glog.Errorln("Error host driver ip status:", err) } - apiserverPort, err := kubeconfig.Port(kubeconfig.Path(), config.GetMachineName()) + apiserverPort, err := kubeconfig.Port(config.GetMachineName()) if err != nil { // Fallback to presuming default apiserver port apiserverPort = constants.APIServerPort @@ -105,7 +105,7 @@ var statusCmd = &cobra.Command{ returnCode |= clusterNotRunningStatusFlag } - ks, err := kubeconfig.IsMachineInConfig(ip, config.GetMachineName(), kubeconfig.Path()) + ks, err := kubeconfig.IsClusterInConfig(ip, config.GetMachineName()) if err != nil { glog.Errorln("Error kubeconfig status:", err) } diff --git a/pkg/minikube/kubeconfig/kubeconfig_test.go b/pkg/minikube/kubeconfig/kubeconfig_test.go index b5b3b32223..d6a757afdf 100644 --- a/pkg/minikube/kubeconfig/kubeconfig_test.go +++ b/pkg/minikube/kubeconfig/kubeconfig_test.go @@ -177,7 +177,7 @@ func Test_update(t *testing.T) { } } -func TestIsMachineInConfig(t *testing.T) { +func TestIsClusterInConfig(t *testing.T) { var tests = []struct { description string @@ -215,7 +215,7 @@ func TestIsMachineInConfig(t *testing.T) { t.Run(test.description, func(t *testing.T) { t.Parallel() configFilename := tempFile(t, test.existing) - statusActual, err := IsMachineInConfig(test.ip, configFilename, "minikube") + statusActual, err := IsClusterInConfig(test.ip, configFilename, "minikube") if err != nil && !test.err { t.Errorf("Got unexpected error: %v", err) } From d60664df78daeb58f38cf80a08822086d389ed65 Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Fri, 9 Aug 2019 11:06:19 -0700 Subject: [PATCH 045/115] refactor fix tests --- cmd/minikube/cmd/start.go | 33 +++- pkg/minikube/bootstrapper/certs.go | 2 +- pkg/minikube/kubeconfig/context.go | 34 ++-- pkg/minikube/kubeconfig/context_test.go | 44 ++--- pkg/minikube/kubeconfig/kcs.go | 38 +++- pkg/minikube/kubeconfig/kubeconfig.go | 2 +- pkg/minikube/kubeconfig/kubeconfig_test.go | 18 +- pkg/minikube/kubeconfig/update.go | 193 --------------------- 8 files changed, 114 insertions(+), 250 deletions(-) delete mode 100644 pkg/minikube/kubeconfig/update.go diff --git a/cmd/minikube/cmd/start.go b/cmd/minikube/cmd/start.go index c99d8ef41e..27f0a9f1f6 100644 --- a/cmd/minikube/cmd/start.go +++ b/cmd/minikube/cmd/start.go @@ -330,12 +330,31 @@ func runStart(cmd *cobra.Command, args []string) { } -func setupKubeconfig(host *host.Host, config *cfg.Config) (*kubeconfig.KCS, error) { - addr, err := host.Driver.GetURL() +func setupKubeconfig(h *host.Host, c *cfg.Config) (*kubeconfig.KCS, error) { + addr, err := h.Driver.GetURL() if err != nil { - exit.WithError("Failed to get host URL", err) + exit.WithError("Failed to get driver URL", err) } - return kubeconfig.Setup(addr, config) + addr = strings.Replace(addr, "tcp://", "https://", -1) + addr = strings.Replace(addr, ":2376", ":"+strconv.Itoa(c.KubernetesConfig.NodePort), -1) + if c.KubernetesConfig.APIServerName != constants.APIServerName { + addr = strings.Replace(addr, c.KubernetesConfig.NodeIP, c.KubernetesConfig.APIServerName, -1) + } + + kcs := &kubeconfig.KCS{ + ClusterName: cfg.GetMachineName(), + ClusterServerAddress: addr, + ClientCertificate: constants.MakeMiniPath("client.crt"), + ClientKey: constants.MakeMiniPath("client.key"), + CertificateAuthority: constants.MakeMiniPath("ca.crt"), + KeepContext: viper.GetBool(keepContext), + EmbedCerts: viper.GetBool(embedCerts), + } + kcs.SetPath(kubeconfig.PathFromEnv()) + if err := kubeconfig.Update(kcs); err != nil { + return kcs, err + } + return kcs, nil } func handleDownloadOnly(cacheGroup *errgroup.Group, k8sVersion string) { @@ -415,9 +434,9 @@ func showVersionInfo(k8sVersion string, cr cruntime.Manager) { } } -func showKubectlConnectInfo(kubeconfig *kubeconfig.KCS) { - if kubeconfig.KeepContext { - out.T(out.Kubectl, "To connect to this cluster, use: kubectl --context={{.name}}", out.V{"name": kubeconfig.ClusterName}) +func showKubectlConnectInfo(kcs *kubeconfig.KCS) { + if kcs.KeepContext { + out.T(out.Kubectl, "To connect to this cluster, use: kubectl --context={{.name}}", out.V{"name": kcs.ClusterName}) } else { out.T(out.Ready, `Done! kubectl is now configured to use "{{.name}}"`, out.V{"name": cfg.GetMachineName()}) } diff --git a/pkg/minikube/bootstrapper/certs.go b/pkg/minikube/bootstrapper/certs.go index adaadc732a..4e0fb8ce0a 100644 --- a/pkg/minikube/bootstrapper/certs.go +++ b/pkg/minikube/bootstrapper/certs.go @@ -77,7 +77,7 @@ func SetupCerts(cmd command.Runner, k8s config.KubernetesConfig) error { } kubeCfg := api.NewConfig() - err := kubeconfig.Populate(kcs, kubeCfg) + err := kubeconfig.PopulateFromSetup(kcs, kubeCfg) if err != nil { return errors.Wrap(err, "populating kubeconfig") } diff --git a/pkg/minikube/kubeconfig/context.go b/pkg/minikube/kubeconfig/context.go index f62e45def4..f082acdc4a 100644 --- a/pkg/minikube/kubeconfig/context.go +++ b/pkg/minikube/kubeconfig/context.go @@ -23,16 +23,20 @@ import ( ) // UnsetCurrentContext unsets the current-context from minikube to "" on minikube stop -func UnsetCurrentContext(filename, machineName string) error { - confg, err := readOrNew(filename) +func UnsetCurrentContext(machineName string, configPath ...string) error { + fPath := PathFromEnv() + if configPath != nil { + fPath = configPath[0] + } + kCfg, err := readOrNew(fPath) if err != nil { return errors.Wrap(err, "Error getting kubeconfig status") } // Unset current-context only if profile is the current-context - if confg.CurrentContext == machineName { - confg.CurrentContext = "" - if err := writeToFile(confg, filename); err != nil { + if kCfg.CurrentContext == machineName { + kCfg.CurrentContext = "" + if err := writeToFile(kCfg, fPath); err != nil { return errors.Wrap(err, "writing kubeconfig") } return nil @@ -42,21 +46,29 @@ func UnsetCurrentContext(filename, machineName string) error { } // SetCurrentContext sets the kubectl's current-context -func SetCurrentContext(kubeCfgPath, name string) error { - kcfg, err := readOrNew(kubeCfgPath) +func SetCurrentContext(name string, configPath ...string) error { + fPath := PathFromEnv() + if configPath != nil { + fPath = configPath[0] + } + kcfg, err := readOrNew(fPath) if err != nil { return errors.Wrap(err, "Error getting kubeconfig status") } kcfg.CurrentContext = name - if err := writeToFile(kcfg, kubeCfgPath); err != nil { + if err := writeToFile(kcfg, fPath); err != nil { return errors.Wrap(err, "writing kubeconfig") } return nil } // DeleteContext deletes the specified machine's kubeconfig context -func DeleteContext(kubeCfgPath, machineName string) error { - kcfg, err := readOrNew(kubeCfgPath) +func DeleteContext(machineName string, configPath ...string) error { + fPath := PathFromEnv() + if configPath != nil { + fPath = configPath[0] + } + kcfg, err := readOrNew(fPath) if err != nil { return errors.Wrap(err, "Error getting kubeconfig status") } @@ -74,7 +86,7 @@ func DeleteContext(kubeCfgPath, machineName string) error { kcfg.CurrentContext = "" } - if err := writeToFile(kcfg, kubeCfgPath); err != nil { + if err := writeToFile(kcfg, fPath); err != nil { return errors.Wrap(err, "writing kubeconfig") } return nil diff --git a/pkg/minikube/kubeconfig/context_test.go b/pkg/minikube/kubeconfig/context_test.go index a07ce8a0f2..29a3b604ca 100644 --- a/pkg/minikube/kubeconfig/context_test.go +++ b/pkg/minikube/kubeconfig/context_test.go @@ -24,12 +24,12 @@ import ( ) func TestDeleteContext(t *testing.T) { - configFilename := tempFile(t, fakeKubeCfg) - if err := DeleteContext(configFilename, "la-croix"); err != nil { + fn := tempFile(t, fakeKubeCfg) + if err := DeleteContext("la-croix", fn); err != nil { t.Fatal(err) } - cfg, err := readOrNew(configFilename) + cfg, err := readOrNew(fn) if err != nil { t.Fatal(err) } @@ -48,47 +48,47 @@ func TestDeleteContext(t *testing.T) { } func TestSetCurrentContext(t *testing.T) { - kubeConfigFile, err := ioutil.TempFile("/tmp", "kubeconfig") + f, err := ioutil.TempFile("/tmp", "kubeconfig") if err != nil { t.Fatalf("Error not expected but got %v", err) } - defer os.Remove(kubeConfigFile.Name()) + defer os.Remove(f.Name()) - cfg, err := readOrNew(kubeConfigFile.Name()) + kcfg, err := readOrNew(f.Name()) if err != nil { t.Fatalf("Error not expected but got %v", err) } - if cfg.CurrentContext != "" { - t.Errorf("Expected empty context but got %v", cfg.CurrentContext) + if kcfg.CurrentContext != "" { + t.Errorf("Expected empty context but got %v", kcfg.CurrentContext) } contextName := "minikube" - err = SetCurrentContext(kubeConfigFile.Name(), contextName) + err = SetCurrentContext(contextName, f.Name()) if err != nil { t.Fatalf("Error not expected but got %v", err) } defer func() { - err := UnsetCurrentContext(kubeConfigFile.Name(), contextName) + err := UnsetCurrentContext(contextName, f.Name()) if err != nil { t.Fatalf("Error not expected but got %v", err) } }() - cfg, err = readOrNew(kubeConfigFile.Name()) + kcfg, err = readOrNew(f.Name()) if err != nil { t.Fatalf("Error not expected but got %v", err) } - if cfg.CurrentContext != contextName { - t.Errorf("Expected context name %s but got %v : ", contextName, cfg.CurrentContext) + if kcfg.CurrentContext != contextName { + t.Errorf("Expected context name %s but got %v : ", contextName, kcfg.CurrentContext) } } func TestUnsetCurrentContext(t *testing.T) { - kubeConfigFile := "./testdata/kubeconfig/config1" + fn := filepath.Join("testdata", "kubeconfig", "config1") contextName := "minikube" - cfg, err := readOrNew(kubeConfigFile) + cfg, err := readOrNew(fn) if err != nil { t.Fatalf("Error not expected but got %v", err) } @@ -97,18 +97,18 @@ func TestUnsetCurrentContext(t *testing.T) { t.Errorf("Expected context name %s but got %s", contextName, cfg.CurrentContext) } - err = UnsetCurrentContext(kubeConfigFile, contextName) + err = UnsetCurrentContext(contextName, fn) if err != nil { t.Fatalf("Error not expected but got %v", err) } defer func() { - err := SetCurrentContext(kubeConfigFile, contextName) + err := SetCurrentContext(contextName, fn) if err != nil { t.Fatalf("Error not expected but got %v", err) } }() - cfg, err = readOrNew(kubeConfigFile) + cfg, err = readOrNew(fn) if err != nil { t.Fatalf("Error not expected but got %v", err) } @@ -121,8 +121,8 @@ func TestUnsetCurrentContext(t *testing.T) { func TestUnsetCurrentContextOnlyChangesIfProfileIsTheCurrentContext(t *testing.T) { contextName := "minikube" - kubeConfigFile := filepath.Join("testdata", "kubeconfig", "config2") - cfg, err := readOrNew(kubeConfigFile) + fn := filepath.Join("testdata", "kubeconfig", "config2") + cfg, err := readOrNew(fn) if err != nil { t.Fatalf("Error not expected but got %v", err) } @@ -131,12 +131,12 @@ func TestUnsetCurrentContextOnlyChangesIfProfileIsTheCurrentContext(t *testing.T t.Errorf("Expected context name %s but got %s", contextName, cfg.CurrentContext) } - err = UnsetCurrentContext(kubeConfigFile, "differentContextName") + err = UnsetCurrentContext("differentContextName", fn) if err != nil { t.Fatalf("Error not expected but got %v", err) } - cfg, err = readOrNew(kubeConfigFile) + cfg, err = readOrNew(fn) if err != nil { t.Fatalf("Error not expected but got %v", err) } diff --git a/pkg/minikube/kubeconfig/kcs.go b/pkg/minikube/kubeconfig/kcs.go index 634ad11906..5c90b277a1 100644 --- a/pkg/minikube/kubeconfig/kcs.go +++ b/pkg/minikube/kubeconfig/kcs.go @@ -20,10 +20,12 @@ import ( "io/ioutil" "sync/atomic" + "github.com/golang/glog" + "github.com/pkg/errors" "k8s.io/client-go/tools/clientcmd/api" ) -// KCS is the kubeconfig setup +// KCS is the minikubes settings for kubeconfig type KCS struct { // The name of the cluster for this context ClusterName string @@ -51,18 +53,18 @@ type KCS struct { kubeConfigFile atomic.Value } -// SetKubeConfigFile sets the kubeconfig file -func (k *KCS) setPath(kubeConfigFile string) { +// SetPath sets the setting for kubeconfig filepath +func (k *KCS) SetPath(kubeConfigFile string) { k.kubeConfigFile.Store(kubeConfigFile) } -// fileContent gets the kubeconfig file -func (k *KCS) fileContent() string { +// filePath gets the kubeconfig file +func (k *KCS) filePath() string { return k.kubeConfigFile.Load().(string) } // Populate populates an api.Config object with values from *KCS -func Populate(cfg *KCS, apiCfg *api.Config) error { +func PopulateFromSetup(cfg *KCS, apiCfg *api.Config) error { var err error clusterName := cfg.ClusterName cluster := api.NewCluster() @@ -109,3 +111,27 @@ func Populate(cfg *KCS, apiCfg *api.Config) error { return nil } + +// update reads config from disk, adds the minikube settings, and writes it back. +// activeContext is true when minikube is the CurrentContext +// If no CurrentContext is set, the given name will be used. +func Update(kcs *KCS) error { + glog.Infoln("Using kubeconfig: ", kcs.filePath()) + + // read existing config or create new if does not exist + kcfg, err := readOrNew(kcs.filePath()) + if err != nil { + return err + } + + err = PopulateFromSetup(kcs, kcfg) + if err != nil { + return err + } + + // write back to disk + if err := writeToFile(kcfg, kcs.filePath()); err != nil { + return errors.Wrap(err, "writing kubeconfig") + } + return nil +} diff --git a/pkg/minikube/kubeconfig/kubeconfig.go b/pkg/minikube/kubeconfig/kubeconfig.go index a502690cdb..4634b6a388 100644 --- a/pkg/minikube/kubeconfig/kubeconfig.go +++ b/pkg/minikube/kubeconfig/kubeconfig.go @@ -235,4 +235,4 @@ func decode(data []byte) (*api.Config, error) { } return kcfg.(*api.Config), nil -} \ No newline at end of file +} diff --git a/pkg/minikube/kubeconfig/kubeconfig_test.go b/pkg/minikube/kubeconfig/kubeconfig_test.go index d6a757afdf..768cbad618 100644 --- a/pkg/minikube/kubeconfig/kubeconfig_test.go +++ b/pkg/minikube/kubeconfig/kubeconfig_test.go @@ -96,7 +96,7 @@ users: client-key: /home/la-croix/apiserver.key `) -func Test_update(t *testing.T) { +func TestUpdate(t *testing.T) { setupCfg := &KCS{ ClusterName: "test", ClusterServerAddress: "192.168.1.1:8080", @@ -147,20 +147,20 @@ func Test_update(t *testing.T) { if err != nil { t.Fatalf("Error making temp directory %v", err) } - test.cfg.setPath(filepath.Join(tmpDir, "kubeconfig")) + test.cfg.SetPath(filepath.Join(tmpDir, "kubeconfig")) if len(test.existingCfg) != 0 { - if err := ioutil.WriteFile(test.cfg.fileContent(), test.existingCfg, 0600); err != nil { + if err := ioutil.WriteFile(test.cfg.filePath(), test.existingCfg, 0600); err != nil { t.Fatalf("WriteFile: %v", err) } } - err = update(test.cfg) + err = Update(test.cfg) if err != nil && !test.err { t.Errorf("Got unexpected error: %v", err) } if err == nil && test.err { t.Errorf("Expected error but got none") } - config, err := readOrNew(test.cfg.fileContent()) + config, err := readOrNew(test.cfg.filePath()) if err != nil { t.Errorf("Error reading kubeconfig file: %v", err) } @@ -215,7 +215,7 @@ func TestIsClusterInConfig(t *testing.T) { t.Run(test.description, func(t *testing.T) { t.Parallel() configFilename := tempFile(t, test.existing) - statusActual, err := IsClusterInConfig(test.ip, configFilename, "minikube") + statusActual, err := IsClusterInConfig(test.ip, "minikube", configFilename) if err != nil && !test.err { t.Errorf("Got unexpected error: %v", err) } @@ -272,7 +272,7 @@ func TestUpdateIP(t *testing.T) { t.Run(test.description, func(t *testing.T) { t.Parallel() configFilename := tempFile(t, test.existing) - statusActual, err := UpdateIP(test.ip, configFilename, "minikube") + statusActual, err := UpdateIP(test.ip, "minikube", configFilename) if err != nil && !test.err { t.Errorf("Got unexpected error: %v", err) } @@ -359,7 +359,7 @@ func Test_extractIP(t *testing.T) { for _, test := range tests { t.Run(test.description, func(t *testing.T) { configFilename := tempFile(t, test.cfg) - ip, err := extractIP(configFilename, "minikube") + ip, err := extractIP("minikube", configFilename) if err != nil && !test.err { t.Errorf("Got unexpected error: %v", err) } @@ -559,7 +559,7 @@ func TestGetKubeConfigPath(t *testing.T) { for _, test := range tests { os.Setenv(clientcmd.RecommendedConfigPathEnvVar, test.input) - if result := Path(); result != test.want { + if result := PathFromEnv(); result != test.want { t.Errorf("Expected first splitted chunk, got: %s", result) } } diff --git a/pkg/minikube/kubeconfig/update.go b/pkg/minikube/kubeconfig/update.go deleted file mode 100644 index c0eeba4d7d..0000000000 --- a/pkg/minikube/kubeconfig/update.go +++ /dev/null @@ -1,193 +0,0 @@ -/* -Copyright 2019 The Kubernetes Authors All rights reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package kubeconfig - -import ( - "fmt" - "io/ioutil" - "net" - "os" - "path/filepath" - "strconv" - "strings" - - "github.com/golang/glog" - "github.com/pkg/errors" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/client-go/tools/clientcmd/api" - "k8s.io/client-go/tools/clientcmd/api/latest" - cfg "k8s.io/minikube/pkg/minikube/config" - "k8s.io/minikube/pkg/minikube/constants" - pkgutil "k8s.io/minikube/pkg/util" -) - -// Setup sets up kubeconfig to be used by kubectl -func Setup(clusterURL string, c *cfg.Config) (*KCS, error) { - clusterURL = strings.Replace(clusterURL, "tcp://", "https://", -1) - clusterURL = strings.Replace(clusterURL, ":2376", ":"+strconv.Itoa(c.KubernetesConfig.NodePort), -1) - if c.KubernetesConfig.APIServerName != constants.APIServerName { - clusterURL = strings.Replace(clusterURL, c.KubernetesConfig.NodeIP, c.KubernetesConfig.APIServerName, -1) - } - - kcs := &KCS{ - ClusterName: cfg.GetMachineName(), - ClusterServerAddress: clusterURL, - ClientCertificate: constants.MakeMiniPath("client.crt"), - ClientKey: constants.MakeMiniPath("client.key"), - CertificateAuthority: constants.MakeMiniPath("ca.crt"), - KeepContext: c.MachineConfig.KeepContext, - EmbedCerts: c.MachineConfig.EmbedCerts, - } - kcs.setPath(Path()) - if err := update(kcs); err != nil { - return kcs, fmt.Errorf("error update kubeconfig: %v", err) - - } - return kcs, nil -} - -// update reads config from disk, adds the minikube settings, and writes it back. -// activeContext is true when minikube is the CurrentContext -// If no CurrentContext is set, the given name will be used. -func update(kcs *KCS) error { - glog.Infoln("Using kubeconfig: ", kcs.fileContent()) - - // read existing config or create new if does not exist - config, err := readOrNew(kcs.fileContent()) - if err != nil { - return err - } - - err = Populate(kcs, config) - if err != nil { - return err - } - - // write back to disk - if err := writeToFile(config, kcs.fileContent()); err != nil { - return errors.Wrap(err, "writing kubeconfig") - } - return nil -} - -// UpdateIP overwrites the IP stored in kubeconfig with the provided IP. -func UpdateIP(ip net.IP, filename string, machineName string) (bool, error) { - if ip == nil { - return false, fmt.Errorf("error, empty ip passed") - } - kip, err := extractIP(filename, machineName) - if err != nil { - return false, err - } - if kip.Equal(ip) { - return false, nil - } - kport, err := Port(filename, machineName) - if err != nil { - return false, err - } - con, err := readOrNew(filename) - if err != nil { - return false, errors.Wrap(err, "Error getting kubeconfig status") - } - // Safe to lookup server because if field non-existent getIPFromKubeconfig would have given an error - con.Clusters[machineName].Server = "https://" + ip.String() + ":" + strconv.Itoa(kport) - err = writeToFile(con, filename) - if err != nil { - return false, err - } - // Kubeconfig IP reconfigured - return true, nil -} - -// writeToFile encodes the configuration and writes it to the given file. -// If the file exists, it's contents will be overwritten. -func writeToFile(config runtime.Object, filename string) error { - if config == nil { - glog.Errorf("could not write to '%s': config can't be nil", filename) - } - - // encode config to YAML - data, err := runtime.Encode(latest.Codec, config) - if err != nil { - return errors.Errorf("could not write to '%s': failed to encode config: %v", filename, err) - } - - // create parent dir if doesn't exist - dir := filepath.Dir(filename) - if _, err := os.Stat(dir); os.IsNotExist(err) { - if err = os.MkdirAll(dir, 0755); err != nil { - return errors.Wrapf(err, "Error creating directory: %s", dir) - } - } - - // write with restricted permissions - if err := ioutil.WriteFile(filename, data, 0600); err != nil { - return errors.Wrapf(err, "Error writing file %s", filename) - } - if err := pkgutil.MaybeChownDirRecursiveToMinikubeUser(dir); err != nil { - return errors.Wrapf(err, "Error recursively changing ownership for dir: %s", dir) - } - - return nil -} - -// readOrNew retrieves Kubernetes client configuration from a file. -// If no files exists, an empty configuration is returned. -func readOrNew(filename string) (*api.Config, error) { - data, err := ioutil.ReadFile(filename) - if os.IsNotExist(err) { - return api.NewConfig(), nil - } else if err != nil { - return nil, errors.Wrapf(err, "Error reading file %q", filename) - } - - // decode config, empty if no bytes - config, err := decode(data) - if err != nil { - return nil, errors.Errorf("could not read config: %v", err) - } - - // initialize nil maps - if config.AuthInfos == nil { - config.AuthInfos = map[string]*api.AuthInfo{} - } - if config.Clusters == nil { - config.Clusters = map[string]*api.Cluster{} - } - if config.Contexts == nil { - config.Contexts = map[string]*api.Context{} - } - - return config, nil -} - -// decode reads a Config object from bytes. -// Returns empty config if no bytes. -func decode(data []byte) (*api.Config, error) { - // if no data, return empty config - if len(data) == 0 { - return api.NewConfig(), nil - } - - config, _, err := latest.Codec.Decode(data, nil, nil) - if err != nil { - return nil, errors.Wrapf(err, "Error decoding config from data: %s", string(data)) - } - - return config.(*api.Config), nil -} From a7986993e362bc22c136c5c645fbb0519c44dc1e Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Fri, 9 Aug 2019 11:16:06 -0700 Subject: [PATCH 046/115] get rid of cmd/util package --- cmd/minikube/cmd/delete.go | 57 ++++++++++++++++++++++- cmd/minikube/cmd/mount.go | 21 +++++++-- cmd/minikube/cmd/stop.go | 3 +- cmd/util/util.go | 95 -------------------------------------- 4 files changed, 74 insertions(+), 102 deletions(-) delete mode 100644 cmd/util/util.go diff --git a/cmd/minikube/cmd/delete.go b/cmd/minikube/cmd/delete.go index c8daa2e353..9c52ecd552 100644 --- a/cmd/minikube/cmd/delete.go +++ b/cmd/minikube/cmd/delete.go @@ -17,15 +17,20 @@ limitations under the License. package cmd import ( + "fmt" + "io/ioutil" "os" + "path/filepath" + "strconv" "github.com/docker/machine/libmachine" "github.com/docker/machine/libmachine/mcnerror" + "github.com/golang/glog" + ps "github.com/mitchellh/go-ps" "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/spf13/viper" cmdcfg "k8s.io/minikube/cmd/minikube/cmd/config" - cmdUtil "k8s.io/minikube/cmd/util" "k8s.io/minikube/pkg/minikube/cluster" pkg_config "k8s.io/minikube/pkg/minikube/config" "k8s.io/minikube/pkg/minikube/constants" @@ -75,7 +80,7 @@ func runDelete(cmd *cobra.Command, args []string) { } } - if err := cmdUtil.KillMountProcess(); err != nil { + if err := killMountProcess(); err != nil { out.FatalT("Failed to kill mount process: {{.error}}", out.V{"error": err}) } @@ -107,3 +112,51 @@ func uninstallKubernetes(api libmachine.API, kc pkg_config.KubernetesConfig, bsN out.ErrT(out.Empty, "Failed to delete cluster: {{.error}}", out.V{"error": err}) } } + +// killMountProcess kills the mount process, if it is running +func killMountProcess() error { + pidPath := filepath.Join(constants.GetMinipath(), constants.MountProcessFileName) + if _, err := os.Stat(pidPath); os.IsNotExist(err) { + return nil + } + + glog.Infof("Found %s ...", pidPath) + out, err := ioutil.ReadFile(pidPath) + if err != nil { + return errors.Wrap(err, "ReadFile") + } + glog.Infof("pidfile contents: %s", out) + pid, err := strconv.Atoi(string(out)) + if err != nil { + return errors.Wrap(err, "error parsing pid") + } + // os.FindProcess does not check if pid is running :( + entry, err := ps.FindProcess(pid) + if err != nil { + return errors.Wrap(err, "ps.FindProcess") + } + if entry == nil { + glog.Infof("Stale pid: %d", pid) + if err := os.Remove(pidPath); err != nil { + return errors.Wrap(err, "Removing stale pid") + } + return nil + } + + // We found a process, but it still may not be ours. + glog.Infof("Found process %d: %s", pid, entry.Executable()) + proc, err := os.FindProcess(pid) + if err != nil { + return errors.Wrap(err, "os.FindProcess") + } + + glog.Infof("Killing pid %d ...", pid) + if err := proc.Kill(); err != nil { + glog.Infof("Kill failed with %v - removing probably stale pid...", err) + if err := os.Remove(pidPath); err != nil { + return errors.Wrap(err, "Removing likely stale unkillable pid") + } + return errors.Wrap(err, fmt.Sprintf("Kill(%d/%s)", pid, entry.Executable())) + } + return nil +} diff --git a/cmd/minikube/cmd/mount.go b/cmd/minikube/cmd/mount.go index 942cd98460..d2942699de 100644 --- a/cmd/minikube/cmd/mount.go +++ b/cmd/minikube/cmd/mount.go @@ -27,8 +27,8 @@ import ( "syscall" "github.com/golang/glog" + "github.com/pkg/errors" "github.com/spf13/cobra" - cmdUtil "k8s.io/minikube/cmd/util" "k8s.io/minikube/pkg/minikube/cluster" "k8s.io/minikube/pkg/minikube/config" "k8s.io/minikube/pkg/minikube/constants" @@ -62,7 +62,7 @@ var mountCmd = &cobra.Command{ Long: `Mounts the specified directory into minikube.`, Run: func(cmd *cobra.Command, args []string) { if isKill { - if err := cmdUtil.KillMountProcess(); err != nil { + if err := killMountProcess(); err != nil { exit.WithError("Error killing mount process", err) } os.Exit(0) @@ -118,7 +118,7 @@ var mountCmd = &cobra.Command{ exit.WithCodeT(exit.Data, "error parsing the input ip address for mount") } } - port, err := cmdUtil.GetPort() + port, err := getPort() if err != nil { exit.WithError("Error finding port for mount", err) } @@ -210,3 +210,18 @@ func init() { mountCmd.Flags().StringSliceVar(&options, "options", []string{}, "Additional mount options, such as cache=fscache") mountCmd.Flags().IntVar(&mSize, "msize", constants.DefaultMsize, "The number of bytes to use for 9p packet payload") } + +// getPort asks the kernel for a free open port that is ready to use +func getPort() (int, error) { + addr, err := net.ResolveTCPAddr("tcp", "localhost:0") + if err != nil { + panic(err) + } + + l, err := net.ListenTCP("tcp", addr) + if err != nil { + return -1, errors.Errorf("Error accessing port %d", addr.Port) + } + defer l.Close() + return l.Addr().(*net.TCPAddr).Port, nil +} diff --git a/cmd/minikube/cmd/stop.go b/cmd/minikube/cmd/stop.go index 1e925c1855..1014c7af14 100644 --- a/cmd/minikube/cmd/stop.go +++ b/cmd/minikube/cmd/stop.go @@ -23,7 +23,6 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/spf13/viper" - cmdUtil "k8s.io/minikube/cmd/util" "k8s.io/minikube/pkg/minikube/cluster" pkg_config "k8s.io/minikube/pkg/minikube/config" "k8s.io/minikube/pkg/minikube/constants" @@ -72,7 +71,7 @@ func runStop(cmd *cobra.Command, args []string) { out.T(out.Stopped, `"{{.profile_name}}" stopped.`, out.V{"profile_name": profile}) } - if err := cmdUtil.KillMountProcess(); err != nil { + if err := killMountProcess(); err != nil { out.T(out.WarningType, "Unable to kill mount process: {{.error}}", out.V{"error": err}) } diff --git a/cmd/util/util.go b/cmd/util/util.go deleted file mode 100644 index d93729c0c4..0000000000 --- a/cmd/util/util.go +++ /dev/null @@ -1,95 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors All rights reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package util is a hodge-podge of utility functions that should be moved elsewhere. -package util - -import ( - "fmt" - "io/ioutil" - "net" - "os" - "path/filepath" - "strconv" - - "github.com/golang/glog" - ps "github.com/mitchellh/go-ps" - "github.com/pkg/errors" - "k8s.io/minikube/pkg/minikube/constants" -) - -// GetPort asks the kernel for a free open port that is ready to use -func GetPort() (int, error) { - addr, err := net.ResolveTCPAddr("tcp", "localhost:0") - if err != nil { - panic(err) - } - - l, err := net.ListenTCP("tcp", addr) - if err != nil { - return -1, errors.Errorf("Error accessing port %d", addr.Port) - } - defer l.Close() - return l.Addr().(*net.TCPAddr).Port, nil -} - -// KillMountProcess kills the mount process, if it is running -func KillMountProcess() error { - pidPath := filepath.Join(constants.GetMinipath(), constants.MountProcessFileName) - if _, err := os.Stat(pidPath); os.IsNotExist(err) { - return nil - } - - glog.Infof("Found %s ...", pidPath) - out, err := ioutil.ReadFile(pidPath) - if err != nil { - return errors.Wrap(err, "ReadFile") - } - glog.Infof("pidfile contents: %s", out) - pid, err := strconv.Atoi(string(out)) - if err != nil { - return errors.Wrap(err, "error parsing pid") - } - // os.FindProcess does not check if pid is running :( - entry, err := ps.FindProcess(pid) - if err != nil { - return errors.Wrap(err, "ps.FindProcess") - } - if entry == nil { - glog.Infof("Stale pid: %d", pid) - if err := os.Remove(pidPath); err != nil { - return errors.Wrap(err, "Removing stale pid") - } - return nil - } - - // We found a process, but it still may not be ours. - glog.Infof("Found process %d: %s", pid, entry.Executable()) - proc, err := os.FindProcess(pid) - if err != nil { - return errors.Wrap(err, "os.FindProcess") - } - - glog.Infof("Killing pid %d ...", pid) - if err := proc.Kill(); err != nil { - glog.Infof("Kill failed with %v - removing probably stale pid...", err) - if err := os.Remove(pidPath); err != nil { - return errors.Wrap(err, "Removing likely stale unkillable pid") - } - return errors.Wrap(err, fmt.Sprintf("Kill(%d/%s)", pid, entry.Executable())) - } - return nil -} From 362f5eaf7b6ea48f5321fd0bbefed22cd6f87e10 Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Fri, 9 Aug 2019 13:46:14 -0700 Subject: [PATCH 047/115] fix bilerplate --- pkg/minikube/kubeconfig/kubeconfig.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/minikube/kubeconfig/kubeconfig.go b/pkg/minikube/kubeconfig/kubeconfig.go index 4634b6a388..bfe6ce8ed0 100644 --- a/pkg/minikube/kubeconfig/kubeconfig.go +++ b/pkg/minikube/kubeconfig/kubeconfig.go @@ -1,9 +1,12 @@ /* Copyright 2019 The Kubernetes Authors All rights reserved. + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. From 8763e6d692e780f58855e768a16aaaf46a49b464 Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Fri, 9 Aug 2019 15:52:48 -0700 Subject: [PATCH 048/115] Add integration test for kubeconfig current-context --- test/integration/start_stop_delete_test.go | 3 --- test/integration/z_proxy_test.go | 20 +++++++++++++++++--- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/test/integration/start_stop_delete_test.go b/test/integration/start_stop_delete_test.go index cb2199981c..f0cb7c93db 100644 --- a/test/integration/start_stop_delete_test.go +++ b/test/integration/start_stop_delete_test.go @@ -108,9 +108,6 @@ func TestStartStop(t *testing.T) { err = util.RetryX(stop, 10*time.Second, 2*time.Minute) mk.CheckStatus(state.Stopped.String()) - // TODO medyagh: - // https://github.com/kubernetes/minikube/issues/4854 - stdout, stderr, err = mk.Start(tc.args...) if err != nil { t.Fatalf("failed to start minikube (for profile %s) failed : %v\nstdout: %s\nstderr: %s", t.Name(), err, stdout, stderr) diff --git a/test/integration/z_proxy_test.go b/test/integration/z_proxy_test.go index 69a14be0c7..86b9e2e1fc 100644 --- a/test/integration/z_proxy_test.go +++ b/test/integration/z_proxy_test.go @@ -37,6 +37,7 @@ import ( retryablehttp "github.com/hashicorp/go-retryablehttp" "github.com/phayes/freeport" "github.com/pkg/errors" + "k8s.io/minikube/test/integration/util" ) // setUpProxy runs a local http proxy and sets the env vars for it. @@ -70,7 +71,6 @@ func TestProxy(t *testing.T) { origHP := os.Getenv("HTTP_PROXY") origNP := os.Getenv("NO_PROXY") p := profileName(t) // profile name - if isTestNoneDriver(t) { // TODO fix this later t.Skip("Skipping proxy warning for none") @@ -105,14 +105,14 @@ func TestProxy(t *testing.T) { }(t) t.Run("ProxyConsoleWarnning", testProxyWarning) t.Run("ProxyDashboard", testProxyDashboard) - + t.Run("KubeconfigContext", testKubeConfigCurrentCtx) } // testProxyWarning checks user is warned correctly about the proxy related env vars func testProxyWarning(t *testing.T) { p := profileName(t) // profile name mk := NewMinikubeRunner(t, p) - stdout, stderr, err := mk.Start() + stdout, stderr, err := mk.Start("--wait=false") if err != nil { t.Fatalf("failed to start minikube (for profile %s) failed : %v\nstdout: %s\nstderr: %s", t.Name(), err, stdout, stderr) } @@ -162,3 +162,17 @@ func testProxyDashboard(t *testing.T) { t.Errorf("%s returned status code %d, expected %d.\nbody:\n%s", u, resp.StatusCode, http.StatusOK, body) } } + +// testKubeConfigCurrentCtx checks weather the current-context is set after star +func testKubeConfigCurrentCtx(t *testing.T) { + p := profileName(t) // profile name + kr := util.NewKubectlRunner(t, p) + ctxAfter, err := kr.RunCommand([]string{"config", "current-context"}, false) + if err != nil { + t.Errorf("expected not to get error for kubectl config current-context but got error: %v", err) + } + + if !strings.Contains(string(ctxAfter), p) { + t.Errorf("expected kubecontext after start to be %s but got %s", p, ctxAfter) + } +} From 3f18cf3b899dda3e2dfd7a9425a53250eee5f66b Mon Sep 17 00:00:00 2001 From: Sharif Elgamal Date: Fri, 9 Aug 2019 15:55:17 -0700 Subject: [PATCH 049/115] Adding GOPROXY to Travis (#5018) * Adding GOPROXY to Travis and fixing libmachine go mod entry * add comment for weird version --- .travis.yml | 2 ++ go.mod | 2 +- go.sum | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0f82068494..cd5ca58f96 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,8 @@ language: go os: linux +env: + - GOPROXY=https://proxy.golang.org matrix: include: - go: 1.12.7 diff --git a/go.mod b/go.mod index 39ca21b95d..29c1484d8d 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ require ( github.com/cloudfoundry/jibber_jabber v0.0.0-20151120183258-bcc4c8345a21 // indirect github.com/docker/docker v1.13.1 // indirect github.com/docker/go-units v0.3.3 - github.com/docker/machine v0.16.1-0.20190718054102-a555e4f7a8f5 + github.com/docker/machine v0.7.1-0.20190718054102-a555e4f7a8f5 // version is 0.7.1 to pin to a555e4f7a8f5 github.com/elazarl/goproxy v0.0.0-20190421051319-9d40249d3c2f github.com/elazarl/goproxy/ext v0.0.0-20190421051319-9d40249d3c2f // indirect github.com/go-ole/go-ole v1.2.4 // indirect diff --git a/go.sum b/go.sum index d984677ef8..14dbc2dbec 100644 --- a/go.sum +++ b/go.sum @@ -106,8 +106,8 @@ github.com/docker/go-connections v0.3.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5Xh github.com/docker/go-units v0.3.3 h1:Xk8S3Xj5sLGlG5g67hJmYMmUgXv5N4PhkjJHHqrwnTk= github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/libnetwork v0.0.0-20180830151422-a9cd636e3789/go.mod h1:93m0aTqz6z+g32wla4l4WxTrdtvBRmVzYRkYvasA5Z8= -github.com/docker/machine v0.16.1-0.20190718054102-a555e4f7a8f5 h1:5OiV/JwT55JRKNJsM9HZrTlJH/TRp97Ee89ahtB78+w= -github.com/docker/machine v0.16.1-0.20190718054102-a555e4f7a8f5/go.mod h1:I8mPNDeK1uH+JTcUU7X0ZW8KiYz0jyAgNaeSJ1rCfDI= +github.com/docker/machine v0.7.1-0.20190718054102-a555e4f7a8f5 h1:/2G2PrqxKga8hAVGPri/5NEv24rvDwXoH5pjPXUBCpA= +github.com/docker/machine v0.7.1-0.20190718054102-a555e4f7a8f5/go.mod h1:I8mPNDeK1uH+JTcUU7X0ZW8KiYz0jyAgNaeSJ1rCfDI= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96 h1:cenwrSVm+Z7QLSV/BsnenAOcDXdX4cMv4wP0B/5QbPg= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= From 3ad2aecb82cc2db514d00a3f969d688f71a8e0ad Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Fri, 9 Aug 2019 15:56:05 -0700 Subject: [PATCH 050/115] add kubecontext integraiton tests to functional tests as well --- test/integration/functional_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/test/integration/functional_test.go b/test/integration/functional_test.go index f8b57d2097..3b72026e48 100644 --- a/test/integration/functional_test.go +++ b/test/integration/functional_test.go @@ -48,6 +48,7 @@ func TestFunctional(t *testing.T) { t.Run("ServicesList", testServicesList) t.Run("Provisioning", testProvisioning) t.Run("Tunnel", testTunnel) + t.Run("kubecontext", testKubeConfigCurrentCtx) if !isTestNoneDriver(t) { t.Run("EnvVars", testClusterEnv) From f0f4352bb1ed8a24f003d5ccc709cad716e125f4 Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Fri, 9 Aug 2019 16:08:14 -0700 Subject: [PATCH 051/115] goimport --- test/integration/functional_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/integration/functional_test.go b/test/integration/functional_test.go index 3b72026e48..bae1efded5 100644 --- a/test/integration/functional_test.go +++ b/test/integration/functional_test.go @@ -48,7 +48,7 @@ func TestFunctional(t *testing.T) { t.Run("ServicesList", testServicesList) t.Run("Provisioning", testProvisioning) t.Run("Tunnel", testTunnel) - t.Run("kubecontext", testKubeConfigCurrentCtx) + t.Run("kubecontext", testKubeConfigCurrentCtx) if !isTestNoneDriver(t) { t.Run("EnvVars", testClusterEnv) From 84bd77f34d46e33411610585fddb0826a35210b9 Mon Sep 17 00:00:00 2001 From: Thomas Stromberg Date: Fri, 9 Aug 2019 16:32:52 -0700 Subject: [PATCH 052/115] Address sanguinecloud's feedback --- docs/persistent_volumes.md | 4 ++-- site/content/en/docs/Contributing/guide.en.md | 11 ++++++----- site/content/en/docs/Reference/Networking/proxy.md | 2 +- site/content/en/docs/Tasks/debug.md | 2 +- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/docs/persistent_volumes.md b/docs/persistent_volumes.md index 0f734ee616..838bac61de 100644 --- a/docs/persistent_volumes.md +++ b/docs/persistent_volumes.md @@ -32,8 +32,8 @@ You can also achieve persistence by creating a PV in a mounted host folder. ## Dynamic provisioning and CSI -In addition, minikube implements a very simple, canonical implementation of dynamic storage controller that runs alongside its deployment. This manages provisioning of *hostPath* volumes (rather then via the previous, in-tree hostPath provider). +In addition, minikube implements a very simple, canonical implementation of dynamic storage controller that runs alongside its deployment. This manages provisioning of *hostPath* volumes (rather then via the previous, in-tree hostPath provider). The default [Storage Provisioner Controller](https://github.com/kubernetes/minikube/blob/master/pkg/storage/storage_provisioner.go) is managed internally, in the minikube codebase, demonstrating how easy it is to plug a custom storage controller into kubernetes as a storage component of the system, and provides pods with dynamically, to test your pod's behaviour when persistent storage is mapped to it. -Note that this is not a CSI based storage provider, rather, it simply declares a PersistentVolume object of type hostpath dynamically when the controller see's that there is an outstanding storage request. +NOTE: this is not a CSI based storage provider. It simply declares an appropriate PersistentVolume in response to an incoming storage request. diff --git a/site/content/en/docs/Contributing/guide.en.md b/site/content/en/docs/Contributing/guide.en.md index 7fa996ea0e..1d3eae544f 100644 --- a/site/content/en/docs/Contributing/guide.en.md +++ b/site/content/en/docs/Contributing/guide.en.md @@ -17,15 +17,16 @@ We'd love to accept your patches! Before we can take them, [please fill out eith ### Finding issues to work on * ["good first issue"](https://github.com/kubernetes/minikube/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) - issues where there is a clear path to resolution -* ["help wanted"](https://github.com/kubernetes/minikube/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22+) - any issue where we've identified a need, but not the resources to work on it. -* High impact issues are labelled as *priority/important-soon* or *priority/important-longterm* +* ["help wanted"](https://github.com/kubernetes/minikube/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22+) - issues where we've identified a need but not resources to work on them +"priority/important-soon" or "priority/important-longterm: - high impact issues that need to be addressed in the next couple of releases. + * Ask on the #minikube Slack if you aren't sure Once you've discovered an issue to work on: -* add a comment mentioning that you plan to work on the issue -* send a PR out that mentions the issue -* Once there is a PR, comment on the issue with `/assign` to assign it to yourself +* Add a comment mentioning that you plan to work on the issue +* Send a PR out that mentions the issue +* Comment on the issue with `/assign` to assign it to yourself ### Contributing A Patch diff --git a/site/content/en/docs/Reference/Networking/proxy.md b/site/content/en/docs/Reference/Networking/proxy.md index 043ce16c48..875a14c7e4 100644 --- a/site/content/en/docs/Reference/Networking/proxy.md +++ b/site/content/en/docs/Reference/Networking/proxy.md @@ -102,7 +102,7 @@ Then run `minikube delete` and `minikube start`. ## downloading binaries: proxyconnect tcp: tls: oversized record received with length 20527 -Your need to set a correct `HTTPS_PROXY` value. +The supplied value of `HTTPS_PROXY` is probably incorrect. Verify that this value is not pointing to an HTTP proxy rather than an HTTPS proxy. ## Additional Information diff --git a/site/content/en/docs/Tasks/debug.md b/site/content/en/docs/Tasks/debug.md index 2adfeb0a54..bab4de45c7 100644 --- a/site/content/en/docs/Tasks/debug.md +++ b/site/content/en/docs/Tasks/debug.md @@ -20,7 +20,7 @@ To debug issues with minikube (not *Kubernetes* but **minikube** itself), you ca Example: -`minikube start --v=7` Will start minikube and output all the important debug logs to stdout. +`minikube start --v=7` will start minikube and output all the important debug logs to stdout. ## Gathering VM logs From 3cf9fcaaba0455d17dea204f8c945d660f972823 Mon Sep 17 00:00:00 2001 From: Thomas Stromberg Date: Fri, 9 Aug 2019 16:45:38 -0700 Subject: [PATCH 053/115] Improve contrib doc organization --- .../en/docs/Contributing/building.en.md | 81 ++------------ site/content/en/docs/Contributing/guide.en.md | 1 + site/content/en/docs/Contributing/iso.md | 102 ++++++++++++++++++ .../en/docs/Contributing/testing.en.md | 2 +- 4 files changed, 112 insertions(+), 74 deletions(-) create mode 100644 site/content/en/docs/Contributing/iso.md diff --git a/site/content/en/docs/Contributing/building.en.md b/site/content/en/docs/Contributing/building.en.md index e2fa9a42d6..1379135c0e 100644 --- a/site/content/en/docs/Contributing/building.en.md +++ b/site/content/en/docs/Contributing/building.en.md @@ -1,13 +1,10 @@ --- -title: "Building minikube" +linkTitle: "Building" +title: "Building the minikube binary" date: 2019-07-31 -weight: 4 -description: > - Building minikube +weight: 2 --- -This guide covers both building the minikube binary and the ISO. - ## Prerequisites * A recent Go distribution (>=1.12) @@ -27,13 +24,15 @@ git clone https://github.com/kubernetes/minikube.git cd minikube ``` -## Building the binary +## Compiling minikube ```shell make ``` -Alternatively, you may cross-compile to/from different operating systems: +## Compiling minikube using Docker + +To cross-compile to/from different operating systems: ```shell MINIKUBE_BUILD_IN_DOCKER=y make cross @@ -51,71 +50,7 @@ Start the cluster using your built minikube with: ## Building the ISO -The minikube ISO is booted by each hypervisor to provide a stable minimal Linux environment to start Kubernetes from. It is based on coreboot, uses systemd, and includes all necessary container runtimes and hypervisor guest drivers. - -### Prerequisites - -See the above requirements for building the minikube binary. Additionally, you will need: - -```shell -sudo apt-get install build-essential gnupg2 p7zip-full git wget cpio python \ - unzip bc gcc-multilib automake libtool locales -``` -### Build instructions - -```shell -$ make buildroot-image -$ make out/minikube.iso -``` - -The build will occur inside a docker container. If you want to do this on -baremetal, replace `make out/minikube.iso` with `IN_DOCKER=1 make out/minikube.iso`. -The bootable ISO image will be available in `out/minikube.iso`. - -### Using a local ISO image - -```shell -$ ./out/minikube start --iso-url=file://$(pwd)/out/minikube.iso -``` - -### Modifying buildroot components - -To change which Linux userland components are included by the guest VM, use this to modify the buildroot configuration: - -```shell -cd out/buildroot -make menuconfig -make -``` - -To save these configuration changes, execute: - -```shell -make savedefconfig -``` - -The changes will be reflected in the `minikube-iso/configs/minikube_defconfig` file. - -### Adding kernel modules - -To make kernel configuration changes and save them, execute: - -```shell -$ make linux-menuconfig -``` - -This will open the kernel configuration menu, and then save your changes to our -iso directory after they've been selected. - -### Adding third-party packages - -To add your own package to the minikube ISO, create a package directory under `iso/minikube-iso/package`. This directory will require at least 3 files: - -`.mk` - A Makefile describing how to download the source code and build the program -`.hash` - Checksums to verify the downloaded source code -`Config.in` - buildroot configuration. - -For a relatively simple example to start with, you may want to reference the `podman` package. +See [Building the minikube ISO](../iso) ## Continuous Integration Builds diff --git a/site/content/en/docs/Contributing/guide.en.md b/site/content/en/docs/Contributing/guide.en.md index 1d3eae544f..af7bbbaa01 100644 --- a/site/content/en/docs/Contributing/guide.en.md +++ b/site/content/en/docs/Contributing/guide.en.md @@ -1,5 +1,6 @@ --- title: "Contributor Guide" +linkTitle: "Guide" date: 2019-07-31 weight: 1 description: > diff --git a/site/content/en/docs/Contributing/iso.md b/site/content/en/docs/Contributing/iso.md new file mode 100644 index 0000000000..f764d05388 --- /dev/null +++ b/site/content/en/docs/Contributing/iso.md @@ -0,0 +1,102 @@ +--- +linkTitle: "ISO" +title: "Building the minikube ISO" +date: 2019-08-09 +weight: 4 +--- +## Overview + +The minikube ISO is booted by each hypervisor to provide a stable minimal Linux environment to start Kubernetes from. It is based on coreboot, uses systemd, and includes all necessary container runtimes and hypervisor guest drivers. + +## Prerequisites + +* A recent Go distribution (>=1.12) +* If you are on Windows, you'll need Docker to be installed. +* 4GB of RAM +* Build tools: + +```shell +sudo apt-get install build-essential gnupg2 p7zip-full git wget cpio python \ + unzip bc gcc-multilib automake libtool locales +``` + +Additionally, if you are on Fedora, you will need to install `glibc-static`: + +```shell +sudo dnf install -y glibc-static +``` + +## Downloading the source + +```shell +git clone https://github.com/kubernetes/minikube.git +cd minikube +``` + +### Building + +```shell +$ make buildroot-image +$ make out/minikube.iso +``` + +The build will occur inside a docker container. If you want to do this on +baremetal, replace `make out/minikube.iso` with `IN_DOCKER=1 make out/minikube.iso`. +The bootable ISO image will be available in `out/minikube.iso`. + +### Using a local ISO image + +```shell +$ ./out/minikube start --iso-url=file://$(pwd)/out/minikube.iso +``` + +### Modifying buildroot components + +To change which Linux userland components are included by the guest VM, use this to modify the buildroot configuration: + +```shell +cd out/buildroot +make menuconfig +make +``` + +To save these configuration changes, execute: + +```shell +make savedefconfig +``` + +The changes will be reflected in the `minikube-iso/configs/minikube_defconfig` file. + +### Adding kernel modules + +To make kernel configuration changes and save them, execute: + +```shell +$ make linux-menuconfig +``` + +This will open the kernel configuration menu, and then save your changes to our +iso directory after they've been selected. + +### Adding third-party packages + +To add your own package to the minikube ISO, create a package directory under `iso/minikube-iso/package`. This directory will require at least 3 files: + +`.mk` - A Makefile describing how to download the source code and build the program +`.hash` - Checksums to verify the downloaded source code +`Config.in` - buildroot configuration. + +For a relatively simple example to start with, you may want to reference the `podman` package. + +## Continuous Integration Builds + +We publish CI builds of minikube, built at every Pull Request. Builds are available at (substitute in the relevant PR number): + +- +- +- + +We also publish CI builds of minikube-iso, built at every Pull Request that touches deploy/iso/minikube-iso. Builds are available at: + +- diff --git a/site/content/en/docs/Contributing/testing.en.md b/site/content/en/docs/Contributing/testing.en.md index 9f3d35ec88..693170241b 100644 --- a/site/content/en/docs/Contributing/testing.en.md +++ b/site/content/en/docs/Contributing/testing.en.md @@ -1,7 +1,7 @@ --- title: "Testing" date: 2019-07-31 -weight: 4 +weight: 3 description: > How to run tests --- From 7ae63dd4da918a81725df56f16d70b46b41fb0fb Mon Sep 17 00:00:00 2001 From: Thomas Stromberg Date: Fri, 9 Aug 2019 17:46:01 -0700 Subject: [PATCH 054/115] Address review comments --- docs/reusing_the_docker_daemon.md | 8 ++------ .../en/docs/Reference/Drivers/hyperkit.md | 10 +++++----- .../en/docs/Reference/Drivers/hyperv.md | 2 +- .../Reference/Drivers/includes/hyperv_usage.md | 18 +++++++++++++----- .../Drivers/includes/virtualbox_usage.md | 2 +- site/content/en/docs/Reference/Drivers/kvm2.md | 8 ++++---- .../en/docs/Reference/Drivers/virtualbox.md | 4 ++-- site/content/en/docs/Tasks/loadbalancer.md | 18 +++++++++--------- .../docs/Tutorials/continuous_integration.md | 1 - 9 files changed, 37 insertions(+), 34 deletions(-) diff --git a/docs/reusing_the_docker_daemon.md b/docs/reusing_the_docker_daemon.md index 7060bb3f8a..28e6511f44 100644 --- a/docs/reusing_the_docker_daemon.md +++ b/docs/reusing_the_docker_daemon.md @@ -16,13 +16,9 @@ You should now be able to use docker on the command line on your host mac/linux docker ps ``` -Docker may report following forbidden error if you are using http proxy and the `$(minikube ip)` is not added to `no_proxy`/`NO_PROXY`: +### Troubleshooting -```shell -error during connect: Get https://192.168.39.98:2376/v1.39/containers/json: Forbidden -``` - -On Centos 7, docker may report the following error: +On CentOS 7, Docker may report the following error: ```shell Could not read CA certificate "/etc/docker/ca.pem": open /etc/docker/ca.pem: no such file or directory diff --git a/site/content/en/docs/Reference/Drivers/hyperkit.md b/site/content/en/docs/Reference/Drivers/hyperkit.md index 22581e7d23..05cffe90f4 100644 --- a/site/content/en/docs/Reference/Drivers/hyperkit.md +++ b/site/content/en/docs/Reference/Drivers/hyperkit.md @@ -18,11 +18,11 @@ description: > minikube start supports additional hyperkit specific flags: -* **\--hyperkit-vpnkit-sock**: Location of the VPNKit socket used for networking. If empty, disables Hyperkit VPNKitSock, if 'auto' uses Docker for Mac VPNKit connection, otherwise uses the specified VSoc -* **\--hyperkit-vsock-ports**: List of guest VSock ports that should be exposed as sockets on the host -* **\--nfs-share**: Local folders to share with Guest via NFS mounts -* **\--nfs-shares-root**: Where to root the NFS Shares (default "/nfsshares") -* **\--uuid**: Provide VM UUID to restore MAC address +* **`--hyperkit-vpnkit-sock`**: Location of the VPNKit socket used for networking. If empty, disables Hyperkit VPNKitSock, if 'auto' uses Docker for Mac VPNKit connection, otherwise uses the specified VSoc +* **`--hyperkit-vsock-ports`**: List of guest VSock ports that should be exposed as sockets on the host +* **`--nfs-share`**: Local folders to share with Guest via NFS mounts +* **`--nfs-shares-root`**: Where to root the NFS Shares (default "/nfsshares") +* **`--uuid`**: Provide VM UUID to restore MAC address ## Issues diff --git a/site/content/en/docs/Reference/Drivers/hyperv.md b/site/content/en/docs/Reference/Drivers/hyperv.md index edfa78c9ca..ff14868f87 100644 --- a/site/content/en/docs/Reference/Drivers/hyperv.md +++ b/site/content/en/docs/Reference/Drivers/hyperv.md @@ -18,7 +18,7 @@ Hyper-V is a native hypervisor built in to modern versions of Microsoft Windows. The `minikube start` command supports additional hyperv specific flags: -* **\--hyperv-virtual-switch**: The hyperv virtual switch name. Defaults to first found +* **`--hyperv-virtual-switch`**: The hyperv virtual switch name. Defaults to first found ## Issues diff --git a/site/content/en/docs/Reference/Drivers/includes/hyperv_usage.md b/site/content/en/docs/Reference/Drivers/includes/hyperv_usage.md index a90c6c9640..96ffa54148 100644 --- a/site/content/en/docs/Reference/Drivers/includes/hyperv_usage.md +++ b/site/content/en/docs/Reference/Drivers/includes/hyperv_usage.md @@ -2,9 +2,9 @@ * Windows 10 Pro * Hyper-V enabled -* A Hyper-V switch created +* An active Hyper-V switch -## Configuring Hyper-V +## Enabling Hyper-V Open a PowerShell console as Administrator, and run the following command: @@ -12,13 +12,21 @@ Open a PowerShell console as Administrator, and run the following command: Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All ``` -Reboot, and create a new external network switch: +If Hyper-V was not previously active, you will need to reboot. + +## Network Configuration + +Create a Hyper-V external network switch + +{{% alert title="Untested" color="warning" %}} +This command is speculative, and may not work in all environments. You may need to use the Hyper-V Administrator UI for wireless interfaces. +{{% /alert %}} ```powershell -New-VMSwitch -name ExternalSwitch -NetAdapterName Ethernet -AllowManagementOS $true +New-VMSwitch -name ExternalSwitch -NetAdapterName Ethernet -AllowManagementOS $true ``` -Set this network switch as the minikube default: +Set this switch as the minikube default: ```shell minikube config set hyperv-virtual-switch ExternalSwitch diff --git a/site/content/en/docs/Reference/Drivers/includes/virtualbox_usage.md b/site/content/en/docs/Reference/Drivers/includes/virtualbox_usage.md index 148dc7b745..bb67f88d29 100644 --- a/site/content/en/docs/Reference/Drivers/includes/virtualbox_usage.md +++ b/site/content/en/docs/Reference/Drivers/includes/virtualbox_usage.md @@ -1,6 +1,6 @@ ## Requirements -- [https://www.virtualbox.org/wiki/Downloads](VirtualBox) 5.2 or higher +- [VirtualBox](https://www.virtualbox.org/wiki/Downloads) 5.2 or higher ## Usage diff --git a/site/content/en/docs/Reference/Drivers/kvm2.md b/site/content/en/docs/Reference/Drivers/kvm2.md index e5da5b34ff..2b933b91a5 100644 --- a/site/content/en/docs/Reference/Drivers/kvm2.md +++ b/site/content/en/docs/Reference/Drivers/kvm2.md @@ -18,13 +18,13 @@ description: > The `minikube start` command supports 3 additional kvm specific flags: -* **\--gpu**: Enable experimental NVIDIA GPU support in minikube -* **\--hidden**: Hide the hypervisor signature from the guest in minikube -* **\--kvm-network**: The KVM network name +* **`--gpu`**: Enable experimental NVIDIA GPU support in minikube +* **`--hidden`**: Hide the hypervisor signature from the guest in minikube +* **`--kvm-network`**: The KVM network name ## Issues -* `minikube` will repeatedly for root password if user is not in the correct `libvirt` group [#3467](https://github.com/kubernetes/minikube/issues/3467) +* `minikube` will repeatedly for the root password if user is not in the correct `libvirt` group [#3467](https://github.com/kubernetes/minikube/issues/3467) * `Machine didn't return an IP after 120 seconds` when firewall prevents VM network access [#3566](https://github.com/kubernetes/minikube/issues/3566) * `unable to set user and group to '65534:992` when `dynamic ownership = 1` in `qemu.conf` [#4467](https://github.com/kubernetes/minikube/issues/4467) * KVM VM's cannot be used simultaneously with VirtualBox [#4913](https://github.com/kubernetes/minikube/issues/4913) diff --git a/site/content/en/docs/Reference/Drivers/virtualbox.md b/site/content/en/docs/Reference/Drivers/virtualbox.md index 4303387eb1..fa0a0350a3 100644 --- a/site/content/en/docs/Reference/Drivers/virtualbox.md +++ b/site/content/en/docs/Reference/Drivers/virtualbox.md @@ -17,8 +17,8 @@ VirtualBox is the oldest and most stable VM driver for minikube. minikube start supports some VirtualBox specific flags: -* **\--host-only-cidr**: The CIDR to be used for the minikube VM (default "192.168.99.1/24") -* **\--no-vtx-check**: Disable checking for the availability of hardware virtualization +* **`--host-only-cidr`**: The CIDR to be used for the minikube VM (default "192.168.99.1/24") +* **`--no-vtx-check`**: Disable checking for the availability of hardware virtualization ## Issues diff --git a/site/content/en/docs/Tasks/loadbalancer.md b/site/content/en/docs/Tasks/loadbalancer.md index 38c70c991d..2c18063860 100644 --- a/site/content/en/docs/Tasks/loadbalancer.md +++ b/site/content/en/docs/Tasks/loadbalancer.md @@ -7,8 +7,11 @@ description: > How to access a LoadBalancer service in minikube --- +## Overview + A LoadBalancer service is the standard way to expose a service to the internet. With this method, each service gets it's own IP address. + ## Using `minikube tunnel` Services of type `LoadBalancer` can be exposed via the `minikube tunnel` command. It will run until Ctrl-C is hit. @@ -33,26 +36,23 @@ Status: loadbalancer emulator: no errors ``` -Tunnel might ask you for password for creating and deleting network routes. -### DNS resolution +`minikube tunnel` runs as a separate daemon, creating a network route on the host to the service CIDR of the cluster using the cluster's IP address as a gateway. The tunnel command exposes the external IP directly to any program running on the host operating system. + +### DNS resolution (experimental) If you are on macOS, the tunnel command also allows DNS resolution for Kubernetes services from the host. ### Cleaning up orphaned routes -If the `minikube tunnel` shuts down in an unclean way, it might leave a network route around. -This case the ~/.minikube/tunnels.json file will contain an entry for that tunnel. -To cleanup orphaned routes, run: +If the `minikube tunnel` shuts down in an abrupt manner, it may leave orphaned network routes on your system. If this happens, the ~/.minikube/tunnels.json file will contain an entry for that tunnel. To remove orphaned routes, run: ````shell minikube tunnel --cleanup ```` -### Avoid entering password multiple times +### Avoiding password prompts -`minikube tunnel` runs as a separate daemon, creates a network route on the host to the service CIDR of the cluster using the cluster's IP address as a gateway. Adding a route requires root privileges for the user, and thus there are differences in how to run `minikube tunnel` depending on the OS. - -If you want to avoid entering the root password, consider setting NOPASSWD for "ip" and "route" commands: +Adding a route requires root privileges for the user, and thus there are differences in how to run `minikube tunnel` depending on the OS. If you want to avoid entering the root password, consider setting NOPASSWD for "ip" and "route" commands: diff --git a/site/content/en/docs/Tutorials/continuous_integration.md b/site/content/en/docs/Tutorials/continuous_integration.md index 41ede84714..eaf357a964 100644 --- a/site/content/en/docs/Tutorials/continuous_integration.md +++ b/site/content/en/docs/Tutorials/continuous_integration.md @@ -41,4 +41,3 @@ touch $KUBECONFIG sudo -E minikube start --vm-driver=none ``` -## Troubleshooting From e696d33206e0335692d28a2d376b9b77be1a8b2a Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Fri, 9 Aug 2019 17:51:51 -0700 Subject: [PATCH 055/115] renamed funky name to Settings --- cmd/minikube/cmd/start.go | 6 ++--- pkg/minikube/bootstrapper/certs.go | 4 ++-- pkg/minikube/kubeconfig/kubeconfig_test.go | 6 ++--- .../kubeconfig/{kcs.go => settings.go} | 22 +++++++++---------- 4 files changed, 19 insertions(+), 19 deletions(-) rename pkg/minikube/kubeconfig/{kcs.go => settings.go} (84%) diff --git a/cmd/minikube/cmd/start.go b/cmd/minikube/cmd/start.go index 27f0a9f1f6..3287bddca8 100644 --- a/cmd/minikube/cmd/start.go +++ b/cmd/minikube/cmd/start.go @@ -330,7 +330,7 @@ func runStart(cmd *cobra.Command, args []string) { } -func setupKubeconfig(h *host.Host, c *cfg.Config) (*kubeconfig.KCS, error) { +func setupKubeconfig(h *host.Host, c *cfg.Config) (*kubeconfig.Settings, error) { addr, err := h.Driver.GetURL() if err != nil { exit.WithError("Failed to get driver URL", err) @@ -341,7 +341,7 @@ func setupKubeconfig(h *host.Host, c *cfg.Config) (*kubeconfig.KCS, error) { addr = strings.Replace(addr, c.KubernetesConfig.NodeIP, c.KubernetesConfig.APIServerName, -1) } - kcs := &kubeconfig.KCS{ + kcs := &kubeconfig.Settings{ ClusterName: cfg.GetMachineName(), ClusterServerAddress: addr, ClientCertificate: constants.MakeMiniPath("client.crt"), @@ -434,7 +434,7 @@ func showVersionInfo(k8sVersion string, cr cruntime.Manager) { } } -func showKubectlConnectInfo(kcs *kubeconfig.KCS) { +func showKubectlConnectInfo(kcs *kubeconfig.Settings) { if kcs.KeepContext { out.T(out.Kubectl, "To connect to this cluster, use: kubectl --context={{.name}}", out.V{"name": kcs.ClusterName}) } else { diff --git a/pkg/minikube/bootstrapper/certs.go b/pkg/minikube/bootstrapper/certs.go index 4e0fb8ce0a..e0de8a1402 100644 --- a/pkg/minikube/bootstrapper/certs.go +++ b/pkg/minikube/bootstrapper/certs.go @@ -67,7 +67,7 @@ func SetupCerts(cmd command.Runner, k8s config.KubernetesConfig) error { copyableFiles = append(copyableFiles, certFile) } - kcs := &kubeconfig.KCS{ + kcs := &kubeconfig.Settings{ ClusterName: k8s.NodeName, ClusterServerAddress: fmt.Sprintf("https://localhost:%d", k8s.NodePort), ClientCertificate: path.Join(util.DefaultCertPath, "apiserver.crt"), @@ -77,7 +77,7 @@ func SetupCerts(cmd command.Runner, k8s config.KubernetesConfig) error { } kubeCfg := api.NewConfig() - err := kubeconfig.PopulateFromSetup(kcs, kubeCfg) + err := kubeconfig.PopulateFromSettings(kcs, kubeCfg) if err != nil { return errors.Wrap(err, "populating kubeconfig") } diff --git a/pkg/minikube/kubeconfig/kubeconfig_test.go b/pkg/minikube/kubeconfig/kubeconfig_test.go index 768cbad618..18be965b76 100644 --- a/pkg/minikube/kubeconfig/kubeconfig_test.go +++ b/pkg/minikube/kubeconfig/kubeconfig_test.go @@ -97,7 +97,7 @@ users: `) func TestUpdate(t *testing.T) { - setupCfg := &KCS{ + setupCfg := &Settings{ ClusterName: "test", ClusterServerAddress: "192.168.1.1:8080", ClientCertificate: "/home/apiserver.crt", @@ -108,7 +108,7 @@ func TestUpdate(t *testing.T) { var tests = []struct { description string - cfg *KCS + cfg *Settings existingCfg []byte expected api.Config err bool @@ -128,7 +128,7 @@ func TestUpdate(t *testing.T) { }, { description: "keep context", - cfg: &KCS{ + cfg: &Settings{ ClusterName: "test", ClusterServerAddress: "192.168.1.1:8080", ClientCertificate: "/home/apiserver.crt", diff --git a/pkg/minikube/kubeconfig/kcs.go b/pkg/minikube/kubeconfig/settings.go similarity index 84% rename from pkg/minikube/kubeconfig/kcs.go rename to pkg/minikube/kubeconfig/settings.go index 5c90b277a1..1fb1f2ba26 100644 --- a/pkg/minikube/kubeconfig/kcs.go +++ b/pkg/minikube/kubeconfig/settings.go @@ -25,8 +25,8 @@ import ( "k8s.io/client-go/tools/clientcmd/api" ) -// KCS is the minikubes settings for kubeconfig -type KCS struct { +// Settings is the minikubes settings for kubeconfig +type Settings struct { // The name of the cluster for this context ClusterName string @@ -54,17 +54,17 @@ type KCS struct { } // SetPath sets the setting for kubeconfig filepath -func (k *KCS) SetPath(kubeConfigFile string) { +func (k *Settings) SetPath(kubeConfigFile string) { k.kubeConfigFile.Store(kubeConfigFile) } // filePath gets the kubeconfig file -func (k *KCS) filePath() string { +func (k *Settings) filePath() string { return k.kubeConfigFile.Load().(string) } -// Populate populates an api.Config object with values from *KCS -func PopulateFromSetup(cfg *KCS, apiCfg *api.Config) error { +// Populate populates an api.Config object with values from *Settings +func PopulateFromSettings(cfg *Settings, apiCfg *api.Config) error { var err error clusterName := cfg.ClusterName cluster := api.NewCluster() @@ -72,7 +72,7 @@ func PopulateFromSetup(cfg *KCS, apiCfg *api.Config) error { if cfg.EmbedCerts { cluster.CertificateAuthorityData, err = ioutil.ReadFile(cfg.CertificateAuthority) if err != nil { - return err + return errors.Wrapf(err, "reading CertificateAuthority %s", cfg.CertificateAuthority) } } else { cluster.CertificateAuthority = cfg.CertificateAuthority @@ -85,11 +85,11 @@ func PopulateFromSetup(cfg *KCS, apiCfg *api.Config) error { if cfg.EmbedCerts { user.ClientCertificateData, err = ioutil.ReadFile(cfg.ClientCertificate) if err != nil { - return err + return errors.Wrapf(err, "reading ClientCertificate %s", cfg.ClientCertificate) } user.ClientKeyData, err = ioutil.ReadFile(cfg.ClientKey) if err != nil { - return err + return errors.Wrapf(err, "reading ClientKey %s", cfg.ClientKey) } } else { user.ClientCertificate = cfg.ClientCertificate @@ -115,7 +115,7 @@ func PopulateFromSetup(cfg *KCS, apiCfg *api.Config) error { // update reads config from disk, adds the minikube settings, and writes it back. // activeContext is true when minikube is the CurrentContext // If no CurrentContext is set, the given name will be used. -func Update(kcs *KCS) error { +func Update(kcs *Settings) error { glog.Infoln("Using kubeconfig: ", kcs.filePath()) // read existing config or create new if does not exist @@ -124,7 +124,7 @@ func Update(kcs *KCS) error { return err } - err = PopulateFromSetup(kcs, kcfg) + err = PopulateFromSettings(kcs, kcfg) if err != nil { return err } From 7713e888a761e01eaa6e279513affc5d96029964 Mon Sep 17 00:00:00 2001 From: Thomas Stromberg Date: Fri, 9 Aug 2019 17:57:19 -0700 Subject: [PATCH 056/115] Add modiifed community links --- site/layouts/partials/community-links.html | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 site/layouts/partials/community-links.html diff --git a/site/layouts/partials/community-links.html b/site/layouts/partials/community-links.html new file mode 100644 index 0000000000..9c5545d4dc --- /dev/null +++ b/site/layouts/partials/community-links.html @@ -0,0 +1,29 @@ +{{ $links := .Site.Params.links }} + + + +{{ define "community-links-list" }} + +{{ end }} From ff4a5324e8862209d7300f8876d4f1678d73c522 Mon Sep 17 00:00:00 2001 From: Thomas Stromberg Date: Fri, 9 Aug 2019 18:16:11 -0700 Subject: [PATCH 057/115] Address markdown lint issues, hide includes from tree --- .../{post_install.md => post_install.inc} | 0 site/content/en/docs/Getting started/linux.md | 8 ++++---- site/content/en/docs/Getting started/macos.md | 10 +++++----- site/content/en/docs/Getting started/windows.md | 17 ++++++++--------- .../en/docs/Reference/Drivers/hyperkit.md | 5 ++--- .../content/en/docs/Reference/Drivers/hyperv.md | 2 +- .../{hyperkit_usage.md => hyperkit_usage.inc} | 0 .../{hyperv_usage.md => hyperv_usage.inc} | 4 ++-- .../includes/{kvm2_usage.md => kvm2_usage.inc} | 0 .../includes/{none_usage.md => none_usage.inc} | 0 .../{parallels_usage.md => parallels_usage.inc} | 2 +- ...virtualbox_usage.md => virtualbox_usage.inc} | 0 ...re_macos_usage.md => vmware_macos_usage.inc} | 4 ++-- site/content/en/docs/Reference/Drivers/kvm2.md | 5 ++--- site/content/en/docs/Reference/Drivers/none.md | 2 +- .../en/docs/Reference/Drivers/parallels.md | 3 +-- .../en/docs/Reference/Drivers/virtualbox.md | 6 +++--- .../content/en/docs/Reference/Drivers/vmware.md | 4 ++-- 18 files changed, 34 insertions(+), 38 deletions(-) rename site/content/en/docs/Getting started/includes/{post_install.md => post_install.inc} (100%) rename site/content/en/docs/Reference/Drivers/includes/{hyperkit_usage.md => hyperkit_usage.inc} (100%) rename site/content/en/docs/Reference/Drivers/includes/{hyperv_usage.md => hyperv_usage.inc} (83%) rename site/content/en/docs/Reference/Drivers/includes/{kvm2_usage.md => kvm2_usage.inc} (100%) rename site/content/en/docs/Reference/Drivers/includes/{none_usage.md => none_usage.inc} (100%) rename site/content/en/docs/Reference/Drivers/includes/{parallels_usage.md => parallels_usage.inc} (98%) rename site/content/en/docs/Reference/Drivers/includes/{virtualbox_usage.md => virtualbox_usage.inc} (100%) rename site/content/en/docs/Reference/Drivers/includes/{vmware_macos_usage.md => vmware_macos_usage.inc} (98%) diff --git a/site/content/en/docs/Getting started/includes/post_install.md b/site/content/en/docs/Getting started/includes/post_install.inc similarity index 100% rename from site/content/en/docs/Getting started/includes/post_install.md rename to site/content/en/docs/Getting started/includes/post_install.inc diff --git a/site/content/en/docs/Getting started/linux.md b/site/content/en/docs/Getting started/linux.md index 19cd96089f..7e01ab9568 100644 --- a/site/content/en/docs/Getting started/linux.md +++ b/site/content/en/docs/Getting started/linux.md @@ -55,16 +55,16 @@ If the above command outputs "no": {{% tabs %}} {{% tab "VirtualBox" %}} -{{% readfile file="/docs/Reference/Drivers/includes/virtualbox_usage.md" %}} +{{% readfile file="/docs/Reference/Drivers/includes/virtualbox_usage.inc" %}} {{% /tab %}} {{% tab "KVM" %}} -{{% readfile file="/docs/Reference/Drivers/includes/kvm2_usage.md" %}} +{{% readfile file="/docs/Reference/Drivers/includes/kvm2_usage.inc" %}} {{% /tab %}} {{% tab "None (bare-metal)" %}} If you are already running minikube from inside a VM, it is possible to skip the creation of an additional VM layer by using the `none` driver. -{{% readfile file="/docs/Reference/Drivers/includes/none_usage.md" %}} +{{% readfile file="/docs/Reference/Drivers/includes/none_usage.inc" %}} {{% /tab %}} {{% /tabs %}} -{{% readfile file="/docs/Getting started/includes/post_install.md" %}} +{{% readfile file="/docs/Getting started/includes/post_install.inc" %}} diff --git a/site/content/en/docs/Getting started/macos.md b/site/content/en/docs/Getting started/macos.md index 2f51c89143..c85a25b254 100644 --- a/site/content/en/docs/Getting started/macos.md +++ b/site/content/en/docs/Getting started/macos.md @@ -36,18 +36,18 @@ curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-darwin {{% tabs %}} {{% tab "VirtualBox" %}} -{{% readfile file="/docs/Reference/Drivers/includes/virtualbox_usage.md" %}} +{{% readfile file="/docs/Reference/Drivers/includes/virtualbox_usage.inc" %}} {{% /tab %}} {{% tab "Hyperkit" %}} -{{% readfile file="/docs/Reference/Drivers/includes/hyperkit_usage.md" %}} +{{% readfile file="/docs/Reference/Drivers/includes/hyperkit_usage.inc" %}} {{% /tab %}} {{% tab "Parallels" %}} -{{% readfile file="/docs/Reference/Drivers/includes/parallels_usage.md" %}} +{{% readfile file="/docs/Reference/Drivers/includes/parallels_usage.inc" %}} {{% /tab %}} {{% tab "VMware" %}} -{{% readfile file="/docs/Reference/Drivers/includes/vmware_macos_usage.md" %}} +{{% readfile file="/docs/Reference/Drivers/includes/vmware_macos_usage.inc" %}} {{% /tab %}} {{% /tabs %}} -{{% readfile file="/docs/Getting started/includes/post_install.md" %}} \ No newline at end of file +{{% readfile file="/docs/Getting started/includes/post_install.inc" %}} diff --git a/site/content/en/docs/Getting started/windows.md b/site/content/en/docs/Getting started/windows.md index 747a8004d5..82bebb0983 100644 --- a/site/content/en/docs/Getting started/windows.md +++ b/site/content/en/docs/Getting started/windows.md @@ -6,10 +6,10 @@ weight: 3 ### Prerequisites - * Windows 8 or above - * A hypervisor, such as Hyper-V or VirtualBox - * Hardware virtualization support must be enabled in BIOS - * 4GB of RAM +* Windows 8 or above +* A hypervisor, such as Hyper-V or VirtualBox +* Hardware virtualization support must be enabled in BIOS +* 4GB of RAM ### Installation @@ -30,7 +30,6 @@ After it has installed, close the current CLI session and reopen it. minikube sh {{% /tab %}} {{% /tabs %}} - ## Hypervisor Setup To check if virtualization is supported, run the following command on your Windows terminal or command prompt. @@ -49,17 +48,17 @@ Hyper-V Requirements: VM Monitor Mode Extensions: Yes If you see the following output, your system already has a Hypervisor installed and you can skip the next step. -``` +```shell Hyper-V Requirements: A hypervisor has been detected. ``` {{% tabs %}} {{% tab "VirtualBox" %}} -{{% readfile file="/docs/Reference/Drivers/includes/virtualbox_usage.md" %}} +{{% readfile file="/docs/Reference/Drivers/includes/virtualbox_usage.inc" %}} {{% /tab %}} {{% tab "Hyper-V" %}} -{{% readfile file="/docs/Reference/Drivers/includes/hyperv_usage.md" %}} +{{% readfile file="/docs/Reference/Drivers/includes/hyperv_usage.inc" %}} {{% /tab %}} {{% /tabs %}} -{{% readfile file="/docs/Getting started/includes/post_install.md" %}} \ No newline at end of file +{{% readfile file="/docs/Getting started/includes/post_install.inc" %}} diff --git a/site/content/en/docs/Reference/Drivers/hyperkit.md b/site/content/en/docs/Reference/Drivers/hyperkit.md index 05cffe90f4..6ca563a794 100644 --- a/site/content/en/docs/Reference/Drivers/hyperkit.md +++ b/site/content/en/docs/Reference/Drivers/hyperkit.md @@ -11,18 +11,17 @@ description: > [HyperKit](https://github.com/moby/hyperkit) is an open-source hypervisor for macOS hypervisor, optimized for lightweight virtual machines and container deployment. -{{% readfile file="/docs/Reference/Drivers/includes/hyperkit_usage.md" %}} +{{% readfile file="/docs/Reference/Drivers/includes/hyperkit_usage.inc" %}} ## Special features minikube start supports additional hyperkit specific flags: - * **`--hyperkit-vpnkit-sock`**: Location of the VPNKit socket used for networking. If empty, disables Hyperkit VPNKitSock, if 'auto' uses Docker for Mac VPNKit connection, otherwise uses the specified VSoc * **`--hyperkit-vsock-ports`**: List of guest VSock ports that should be exposed as sockets on the host * **`--nfs-share`**: Local folders to share with Guest via NFS mounts * **`--nfs-shares-root`**: Where to root the NFS Shares (default "/nfsshares") -* **`--uuid`**: Provide VM UUID to restore MAC address +* **`--uuid`**: Provide VM UUID to restore MAC address ## Issues diff --git a/site/content/en/docs/Reference/Drivers/hyperv.md b/site/content/en/docs/Reference/Drivers/hyperv.md index ff14868f87..909f1e03f8 100644 --- a/site/content/en/docs/Reference/Drivers/hyperv.md +++ b/site/content/en/docs/Reference/Drivers/hyperv.md @@ -12,7 +12,7 @@ description: > Hyper-V is a native hypervisor built in to modern versions of Microsoft Windows. -{{% readfile file="/docs/Reference/Drivers/includes/hyperv_usage.md" %}} +{{% readfile file="/docs/Reference/Drivers/includes/hyperv_usage.inc" %}} ## Special features diff --git a/site/content/en/docs/Reference/Drivers/includes/hyperkit_usage.md b/site/content/en/docs/Reference/Drivers/includes/hyperkit_usage.inc similarity index 100% rename from site/content/en/docs/Reference/Drivers/includes/hyperkit_usage.md rename to site/content/en/docs/Reference/Drivers/includes/hyperkit_usage.inc diff --git a/site/content/en/docs/Reference/Drivers/includes/hyperv_usage.md b/site/content/en/docs/Reference/Drivers/includes/hyperv_usage.inc similarity index 83% rename from site/content/en/docs/Reference/Drivers/includes/hyperv_usage.md rename to site/content/en/docs/Reference/Drivers/includes/hyperv_usage.inc index 96ffa54148..a823aa0b7f 100644 --- a/site/content/en/docs/Reference/Drivers/includes/hyperv_usage.md +++ b/site/content/en/docs/Reference/Drivers/includes/hyperv_usage.inc @@ -1,6 +1,6 @@ ## Requirements -* Windows 10 Pro +* Windows 10 Enterprise, Pro, or Education ([system requirements](https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/reference/hyper-v-requirements)) * Hyper-V enabled * An active Hyper-V switch @@ -23,7 +23,7 @@ This command is speculative, and may not work in all environments. You may need {{% /alert %}} ```powershell -New-VMSwitch -name ExternalSwitch -NetAdapterName Ethernet -AllowManagementOS $true +New-VMSwitch -name ExternalSwitch -NetAdapterName Ethernet -AllowManagementOS $true ``` Set this switch as the minikube default: diff --git a/site/content/en/docs/Reference/Drivers/includes/kvm2_usage.md b/site/content/en/docs/Reference/Drivers/includes/kvm2_usage.inc similarity index 100% rename from site/content/en/docs/Reference/Drivers/includes/kvm2_usage.md rename to site/content/en/docs/Reference/Drivers/includes/kvm2_usage.inc diff --git a/site/content/en/docs/Reference/Drivers/includes/none_usage.md b/site/content/en/docs/Reference/Drivers/includes/none_usage.inc similarity index 100% rename from site/content/en/docs/Reference/Drivers/includes/none_usage.md rename to site/content/en/docs/Reference/Drivers/includes/none_usage.inc diff --git a/site/content/en/docs/Reference/Drivers/includes/parallels_usage.md b/site/content/en/docs/Reference/Drivers/includes/parallels_usage.inc similarity index 98% rename from site/content/en/docs/Reference/Drivers/includes/parallels_usage.md rename to site/content/en/docs/Reference/Drivers/includes/parallels_usage.inc index 831e119d65..7e26181b49 100644 --- a/site/content/en/docs/Reference/Drivers/includes/parallels_usage.md +++ b/site/content/en/docs/Reference/Drivers/includes/parallels_usage.inc @@ -6,7 +6,7 @@ If the [Brew Package Manager](https://brew.sh/) is installed, run: -``` +```shell brew install docker-machine-driver-parallels ``` diff --git a/site/content/en/docs/Reference/Drivers/includes/virtualbox_usage.md b/site/content/en/docs/Reference/Drivers/includes/virtualbox_usage.inc similarity index 100% rename from site/content/en/docs/Reference/Drivers/includes/virtualbox_usage.md rename to site/content/en/docs/Reference/Drivers/includes/virtualbox_usage.inc diff --git a/site/content/en/docs/Reference/Drivers/includes/vmware_macos_usage.md b/site/content/en/docs/Reference/Drivers/includes/vmware_macos_usage.inc similarity index 98% rename from site/content/en/docs/Reference/Drivers/includes/vmware_macos_usage.md rename to site/content/en/docs/Reference/Drivers/includes/vmware_macos_usage.inc index 5048b256d7..e7f15b381f 100644 --- a/site/content/en/docs/Reference/Drivers/includes/vmware_macos_usage.md +++ b/site/content/en/docs/Reference/Drivers/includes/vmware_macos_usage.inc @@ -6,7 +6,7 @@ If the [Brew Package Manager](https://brew.sh/) is installed, run: -``` +```shell brew install docker-machine-driver-vmware ``` @@ -28,4 +28,4 @@ To make vmware the default driver: ```shell minikube config set vm-driver vmware -``` \ No newline at end of file +``` diff --git a/site/content/en/docs/Reference/Drivers/kvm2.md b/site/content/en/docs/Reference/Drivers/kvm2.md index 2b933b91a5..066eabb4a9 100644 --- a/site/content/en/docs/Reference/Drivers/kvm2.md +++ b/site/content/en/docs/Reference/Drivers/kvm2.md @@ -12,7 +12,7 @@ description: > [KVM (Kernel-based Virtual Machine)](https://www.linux-kvm.org/page/Main_Page) is a full virtualization solution for Linux on x86 hardware containing virtualization extensions. To work with KVM, minikube uses the [libvirt virtualization API](https://libvirt.org/) -{{% readfile file="/docs/Reference/Drivers/includes/kvm2_usage.md" %}} +{{% readfile file="/docs/Reference/Drivers/includes/kvm2_usage.inc" %}} ## Special features @@ -26,7 +26,7 @@ The `minikube start` command supports 3 additional kvm specific flags: * `minikube` will repeatedly for the root password if user is not in the correct `libvirt` group [#3467](https://github.com/kubernetes/minikube/issues/3467) * `Machine didn't return an IP after 120 seconds` when firewall prevents VM network access [#3566](https://github.com/kubernetes/minikube/issues/3566) -* `unable to set user and group to '65534:992` when `dynamic ownership = 1` in `qemu.conf` [#4467](https://github.com/kubernetes/minikube/issues/4467) +* `unable to set user and group to '65534:992` when `dynamic ownership = 1` in `qemu.conf` [#4467](https://github.com/kubernetes/minikube/issues/4467) * KVM VM's cannot be used simultaneously with VirtualBox [#4913](https://github.com/kubernetes/minikube/issues/4913) * On some distributions, libvirt bridge networking may fail until the host reboots @@ -37,4 +37,3 @@ Also see [co/kvm2 open issues](https://github.com/kubernetes/minikube/labels/co% * Run `minikube start --alsologtostderr -v=7` to debug crashes * Run `docker-machine-driver-kvm2 version` to verify the kvm2 driver executes properly. * Read [How to debug Virtualization problems](https://fedoraproject.org/wiki/How_to_debug_Virtualization_problems) - \ No newline at end of file diff --git a/site/content/en/docs/Reference/Drivers/none.md b/site/content/en/docs/Reference/Drivers/none.md index 38c4b4fa65..d1a5300fa2 100644 --- a/site/content/en/docs/Reference/Drivers/none.md +++ b/site/content/en/docs/Reference/Drivers/none.md @@ -12,7 +12,7 @@ description: > This document is written for system integrators who are familiar with minikube, and wish to run it within a customized VM environment. The `none` driver allows advanced minikube users to skip VM creation, allowing minikube to be run on a user-supplied VM. -{{% readfile file="/docs/Reference/Drivers/includes/none_usage.md" %}} +{{% readfile file="/docs/Reference/Drivers/includes/none_usage.inc" %}} ## Issues diff --git a/site/content/en/docs/Reference/Drivers/parallels.md b/site/content/en/docs/Reference/Drivers/parallels.md index e1458be93f..8bcfbb0222 100644 --- a/site/content/en/docs/Reference/Drivers/parallels.md +++ b/site/content/en/docs/Reference/Drivers/parallels.md @@ -11,7 +11,7 @@ description: > The Parallels driver is particularly useful for users who own Parallels Desktop, as it does not require VT-x hardware support. -{{% readfile file="/docs/Reference/Drivers/includes/parallels_usage.md" %}} +{{% readfile file="/docs/Reference/Drivers/includes/parallels_usage.inc" %}} ## Issues @@ -20,4 +20,3 @@ The Parallels driver is particularly useful for users who own Parallels Desktop, ## Troubleshooting * Run `minikube start --alsologtostderr -v=7` to debug crashes -* \ No newline at end of file diff --git a/site/content/en/docs/Reference/Drivers/virtualbox.md b/site/content/en/docs/Reference/Drivers/virtualbox.md index fa0a0350a3..f979ad499e 100644 --- a/site/content/en/docs/Reference/Drivers/virtualbox.md +++ b/site/content/en/docs/Reference/Drivers/virtualbox.md @@ -11,14 +11,14 @@ description: > VirtualBox is the oldest and most stable VM driver for minikube. -{{% readfile file="/docs/Reference/Drivers/includes/virtualbox_usage.md" %}} +{{% readfile file="/docs/Reference/Drivers/includes/virtualbox_usage.inc" %}} ## Special features minikube start supports some VirtualBox specific flags: * **`--host-only-cidr`**: The CIDR to be used for the minikube VM (default "192.168.99.1/24") -* **`--no-vtx-check`**: Disable checking for the availability of hardware virtualization +* **`--no-vtx-check`**: Disable checking for the availability of hardware virtualization ## Issues @@ -26,4 +26,4 @@ minikube start supports some VirtualBox specific flags: ## Troubleshooting -* Run `minikube start --alsologtostderr -v=7` to debug crashes \ No newline at end of file +* Run `minikube start --alsologtostderr -v=7` to debug crashes diff --git a/site/content/en/docs/Reference/Drivers/vmware.md b/site/content/en/docs/Reference/Drivers/vmware.md index 604e1d0a3a..cd355144aa 100644 --- a/site/content/en/docs/Reference/Drivers/vmware.md +++ b/site/content/en/docs/Reference/Drivers/vmware.md @@ -13,7 +13,7 @@ The vmware driver supports virtualization across all VMware based hypervisors. {{% tabs %}} {{% tab "macOS" %}} -{{% readfile file="/docs/Reference/Drivers/includes/vmware_macos_usage.md" %}} +{{% readfile file="/docs/Reference/Drivers/includes/vmware_macos_usage.inc" %}} {{% /tab %}} {{% tab "Linux" %}} No documentation is available yet. @@ -29,4 +29,4 @@ No documentation is available yet. ## Troubleshooting -* Run `minikube start --alsologtostderr -v=7` to debug crashes \ No newline at end of file +* Run `minikube start --alsologtostderr -v=7` to debug crashes From 33544d21e1250083cbe5f0dafbc17355854fea6d Mon Sep 17 00:00:00 2001 From: Thomas Stromberg Date: Fri, 9 Aug 2019 18:26:45 -0700 Subject: [PATCH 058/115] Add Hyper-V manager method --- .../Drivers/includes/hyperv_usage.inc | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/site/content/en/docs/Reference/Drivers/includes/hyperv_usage.inc b/site/content/en/docs/Reference/Drivers/includes/hyperv_usage.inc index a823aa0b7f..9a5b7918e2 100644 --- a/site/content/en/docs/Reference/Drivers/includes/hyperv_usage.inc +++ b/site/content/en/docs/Reference/Drivers/includes/hyperv_usage.inc @@ -18,21 +18,29 @@ If Hyper-V was not previously active, you will need to reboot. Create a Hyper-V external network switch -{{% alert title="Untested" color="warning" %}} -This command is speculative, and may not work in all environments. You may need to use the Hyper-V Administrator UI for wireless interfaces. -{{% /alert %}} +### Using Hyper-V Manager + +1. Open the Hyper-V Manager. (On Windows 10, search for the Hyper-V Manager in the lower left search field.) +2. Select the Virtual Switch Manager on the right-hand Actions panel. +3. Set up a new external network switch to use, named `ExternalSwitch` + * If you already have another network switch set up, use that one instead but make sure it is an external switch. + +### Using PowerShell + +**NOTE: This command is speculative, and may not work in all environments. You may need to use the Hyper-V Administrator UI for wireless interfaces.** ```powershell New-VMSwitch -name ExternalSwitch -NetAdapterName Ethernet -AllowManagementOS $true ``` -Set this switch as the minikube default: +## Usage + +Set the switch you created as the minikube default: ```shell minikube config set hyperv-virtual-switch ExternalSwitch ``` -## Usage ```shell minikube start --vm-driver=hyperv From 06dcd1cb3365a62a6cf7b73b6f22acc104b3db80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Str=C3=B6mberg?= Date: Fri, 9 Aug 2019 18:38:28 -0700 Subject: [PATCH 059/115] Begin steering users to the docsy site --- README.md | 93 +++++++++---------------------------------------------- 1 file changed, 15 insertions(+), 78 deletions(-) diff --git a/README.md b/README.md index 9f259f2ada..af51a25fbe 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ minikube implements a local Kubernetes cluster on macOS, Linux, and Windows. ![screenshot](/images/start.jpg) -minikube's [primary goals](https://github.com/kubernetes/minikube/blob/master/docs/contributors/principles.md) are to be the best tool for local Kubernetes application development and to support all Kubernetes features that fit. We hope you enjoy it! +minikube's [primary goals](https://minikube.sigs.k8s.io/docs/concepts/principles/) are to be the best tool for local Kubernetes application development and to support all Kubernetes features that fit. We hope you enjoy it! ## News @@ -29,28 +29,26 @@ minikube's [primary goals](https://github.com/kubernetes/minikube/blob/master/do minikube runs the latest stable release of Kubernetes, with support for standard Kubernetes features like: -* [LoadBalancer](https://github.com/kubernetes/minikube/blob/master/docs/tunnel.md) - using `minikube tunnel` +* [LoadBalancer](https://minikube.sigs.k8s.io/docs/tasks/loadbalancer/) - using `minikube tunnel` * Multi-cluster - using `minikube start -p ` * NodePorts - using `minikube service` -* [Persistent Volumes](https://github.com/kubernetes/minikube/blob/master/docs/persistent_volumes.md) +* [Persistent Volumes](https://minikube.sigs.k8s.io/docs/reference/persistent_volumes/) * Ingress * RBAC -* [Dashboard](https://github.com/kubernetes/minikube/blob/master/docs/dashboard.md) - `minikube dashboard` -* [Container runtimes](https://github.com/kubernetes/minikube/blob/master/docs/alternative_runtimes.md) - `start --container-runtime` -* [Configure apiserver and kubelet options](https://github.com/kubernetes/minikube/blob/master/docs/configuring_kubernetes.md) via command-line flags +* [Dashboard](https://minikube.sigs.k8s.io/docs/tasks/dashboard/) - `minikube dashboard` +* [Container runtimes](https://minikube.sigs.k8s.io/docs/reference/runtimes/) - `start --container-runtime` +* [Configure apiserver and kubelet options](https://minikube.sigs.k8s.io/docs/reference/configuration/kubernetes/) via command-line flags As well as developer-friendly features: -* [Addons](https://github.com/kubernetes/minikube/blob/master/docs/addons.md) - a marketplace for developers to share configurations for running services on minikube -* [GPU support](https://github.com/kubernetes/minikube/blob/master/docs/gpu.md) - for machine learning -* [Filesystem mounts](https://github.com/kubernetes/minikube/blob/master/docs/host_folder_mount.md) +* [Addons](https://minikube.sigs.k8s.io/docs/tasks/addons/) - a marketplace for developers to share configurations for running services on minikube +* [NVIDIA GPU support](https://minikube.sigs.k8s.io/docs/tutorials/nvidia_gpu/) - for machine learning +* [Filesystem mounts](https://minikube.sigs.k8s.io/docs/tasks/mount/) * Automatic failure analysis ## Documentation -* [**Installation**](https://kubernetes.io/docs/tasks/tools/install-minikube/) -* [Advanced Topics and Tutorials](https://github.com/kubernetes/minikube/blob/master/docs/README.md) -* [Contributors Guide](https://github.com/kubernetes/minikube/blob/master/docs/contributors/README.md) +See https://minikube.sigs.k8s.io/docs/ ## Community @@ -63,74 +61,13 @@ minikube is a Kubernetes [#sig-cluster-lifecycle](https://github.com/kubernetes/ * [minikube-dev mailing list](https://groups.google.com/forum/#!forum/minikube-dev) * [Bi-weekly office hours, Mondays @ 10am PST](https://tinyurl.com/minikube-oh) -* [Contributing](https://github.com/kubernetes/minikube/blob/master/CONTRIBUTING.md) -* [Development Roadmap](https://github.com/kubernetes/minikube/blob/master/docs/contributors/roadmap.md) +* [Contributing](https://minikube.sigs.k8s.io/docs/contributing/) +* [Development Roadmap](https://minikube.sigs.k8s.io/docs/contributing/roadmap/) ## Installation -See the [installation guide](https://kubernetes.io/docs/tasks/tools/install-minikube/). For the impatient, here is the TL;DR: +See [getting started](https://minikube.sigs.k8s.io/docs/getting-started/) -* *macOS 10.12 (Sierra)* - * Requires installing a hypervisor, such as [hyperkit](https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#hyperkit-driver) (recommended) or VirtualBox - * using [brew](https://brew.sh/): `brew cask install minikube` - * manually: `curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-darwin-amd64 && sudo install minikube-darwin-amd64 /usr/local/bin/minikube` +## Examples -* *Windows 10* - * Requires a hypervisor, such as VirtualBox (recommended) or HyperV - * VT-x/AMD-v virtualization must be enabled in BIOS - * using [chocolatey](https://chocolatey.org/) `choco install minikube` - * manually: Download and run the [installer](https://storage.googleapis.com/minikube/releases/latest/minikube-installer.exe) - -* *Linux* - * Requires either the [kvm2 driver](https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#kvm2-driver) (recommended), or VirtualBox - * VT-x/AMD-v virtualization must be enabled in BIOS - * manually: `curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 && sudo install minikube-linux-amd64 /usr/local/bin/minikube` - -### Supported Hypervisors - -`minikube start` defaults to virtualbox, but supports other drivers using the `--vm-driver` argument: - -* [KVM2](https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#kvm2-driver) - Recommended Linux driver -* [hyperkit](https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#hyperkit-driver) - Recommended macOS driver -* virtualbox - Recommended Windows driver -* [none](https://github.com/kubernetes/minikube/blob/master/docs/vmdriver-none.md) - bare-metal execution on Linux, at the expense of system security and reliability - -Other drivers which are not yet part of our continuous integration system are: - -* [hyperv](https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#hyperV-driver) -* [vmware](https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#vmware-unified-driver) -* [parallels](https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#parallels-driver) - -## Quick Start - -Start a cluster by running: - -`minikube start` - -Access Kubernetes Dashboard within Minikube: - -`minikube dashboard` - -Once started, you can interact with your cluster using `kubectl`, just like any other Kubernetes cluster. For instance, starting a server: - -`kubectl run hello-minikube --image=k8s.gcr.io/echoserver:1.4 --port=8080` - -Exposing a service as a NodePort - -`kubectl expose deployment hello-minikube --type=NodePort` - -minikube makes it easy to open this exposed endpoint in your browser: - -`minikube service hello-minikube` - -Start a second local cluster: - -`minikube start -p cluster2` - -Stop your local cluster: - -`minikube stop` - -Delete your local cluster: - -`minikube delete` +See [examples](https://minikube.sigs.k8s.io/docs/examples/) From 0f6c2edb910e3f447ad452d032cb7bc7cef31c97 Mon Sep 17 00:00:00 2001 From: Thomas Stromberg Date: Fri, 9 Aug 2019 18:50:38 -0700 Subject: [PATCH 060/115] Remove obsolete MAINTAINERS file --- MAINTAINERS | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 MAINTAINERS diff --git a/MAINTAINERS b/MAINTAINERS deleted file mode 100644 index 82d4387262..0000000000 --- a/MAINTAINERS +++ /dev/null @@ -1,4 +0,0 @@ -Thomas Stromberg (@tstromberg) -Anders F Björklund (@afbjorklund) -Sharif Elgamal (@sharifelgamal) -Medya Ghazizadeh (@medyagh) From 9d9763f04d6342f1ada270fa91fe2c2931a8c684 Mon Sep 17 00:00:00 2001 From: Thomas Stromberg Date: Fri, 9 Aug 2019 20:11:00 -0700 Subject: [PATCH 061/115] Improve default styling --- site/assets/scss/_variables_project.scss | 18 +++++++++---- site/static/css/tabs.css | 32 +++++++++++++++--------- 2 files changed, 33 insertions(+), 17 deletions(-) diff --git a/site/assets/scss/_variables_project.scss b/site/assets/scss/_variables_project.scss index 1c75b2eecc..01a924faa8 100644 --- a/site/assets/scss/_variables_project.scss +++ b/site/assets/scss/_variables_project.scss @@ -36,7 +36,7 @@ $medium: $mk-medium; // Navigation bar $navbar-dark-color: $mk-dark; $navbar-dark-hover-color: $mk-light !default; -$navbar-dark-active-color: $mk-light !default; +$navbar-dark-active-color: $primary !default; $navbar-dark-disabled-color: rgba($white, 0.25) !default; .td-navbar { background: $white !important; @@ -151,7 +151,15 @@ section.td-box--height-auto { } -// Allow code tags to span most of a window length (default is 80%) -div.td-content pre { - max-width: 99% !important; -} \ No newline at end of file +div.td-content { + // Allow code tags to span most of a window length (default is 80%) + pre { + max-width: 99% !important; + } + h2 { + font-size: 1.4rem !important; + } + h3 { + font-size: 1.3rem !important; + } +} diff --git a/site/static/css/tabs.css b/site/static/css/tabs.css index 9bbc3ea8b0..09525f610d 100644 --- a/site/static/css/tabs.css +++ b/site/static/css/tabs.css @@ -15,22 +15,22 @@ div.code-tabs li.nav-tab { color: #666; font-size: 14px; - border-top: 1px solid #CBCBCB; - border-left: 1px solid #CBCBCB; - border-right: 1px solid #CBCBCB; + border-top: 1px solid #C7EAEC; + border-left: 1px solid #C7EAEC; + border-right: 1px solid #C7EAEC; margin-right: 0.5em; border-top-left-radius: 4px; border-top-right-radius: 4px; - background-color: #E5E5E5; + background-color: #c7eaec; } div.code-tabs li.active { - color:#000; - border-top: 1px solid #A9A9A9; - border-left: 1px solid #A9A9A9; - border-right: 1px solid #A9A9A9; - background: #f5f5f5; + color: #f2771a; + border-top: 1px solid #C7EAEC; + border-left: 1px solid #C7EAEC; + border-right: 1px solid #C7EAEC; + background: rgb(244, 255, 255); font-weight: bold; } @@ -47,10 +47,18 @@ div.tab-pane { div.tab-pane.active { display: block; padding: 2em; - background: #f5f5f5; - border: 1px solid #CBCBCB; + background: rgb(244, 255, 255); + border: 1px solid #C7EAEC; } div.code-tabs code { word-break: keep-all; -} \ No newline at end of file +} + +div.code-tabs h2 { + font-size: 1.2rem !important; + margin-top: 1rem; +} +div.code-tabs h3 { + font-size: 1.1rem !important; +} From 5a9da18cdac6b04389168ba595df54a3880fe323 Mon Sep 17 00:00:00 2001 From: Thomas Stromberg Date: Fri, 9 Aug 2019 20:11:37 -0700 Subject: [PATCH 062/115] Improve h2/h3 titles --- .../en/docs/Reference/Commands/addons.md | 22 +-------- .../en/docs/Reference/Commands/cache.md | 1 - .../en/docs/Reference/Commands/completion.md | 48 +++++++++---------- .../en/docs/Reference/Commands/config.md | 4 +- .../en/docs/Reference/Commands/dashboard.md | 8 ++-- .../en/docs/Reference/Commands/delete.md | 2 +- site/content/en/docs/Reference/Commands/ip.md | 2 +- .../en/docs/Reference/Commands/kubectl.md | 2 +- .../en/docs/Reference/Commands/profile.md | 4 +- .../en/docs/Reference/Commands/service.md | 2 +- .../en/docs/Reference/Commands/status.md | 2 +- .../en/docs/Reference/Commands/stop.md | 2 +- .../en/docs/Reference/Commands/tunnel.md | 2 +- .../docs/Reference/Commands/update-context.md | 8 +--- .../en/docs/Reference/Commands/version.md | 2 +- site/content/en/docs/Tasks/dashboard.md | 2 +- 16 files changed, 45 insertions(+), 68 deletions(-) diff --git a/site/content/en/docs/Reference/Commands/addons.md b/site/content/en/docs/Reference/Commands/addons.md index 37326a6f25..d15f38173b 100644 --- a/site/content/en/docs/Reference/Commands/addons.md +++ b/site/content/en/docs/Reference/Commands/addons.md @@ -7,14 +7,7 @@ description: > Modifies minikube addons files using subcommands like "minikube addons enable heapster" --- -## Usage - -``` -minikube addons SUBCOMMAND [flags] -minikube addons [command] -``` - -## Subcommands +## Overview * **configure**: Configures the addon w/ADDON_NAME within minikube * **disable**: Disables the addon w/ADDON_NAME within minikube @@ -22,13 +15,10 @@ minikube addons [command] * **list**: Lists all available minikube addons as well as their current statuses (enabled/disabled) * **open**: Opens the addon w/ADDON_NAME within minikube - ## minikube addons configure Configures the addon w/ADDON_NAME within minikube (example: minikube addons configure registry-creds). For a list of available addons use: minikube addons list -### Usage - ``` minikube addons configure ADDON_NAME [flags] ``` @@ -37,8 +27,6 @@ minikube addons configure ADDON_NAME [flags] Disables the addon w/ADDON_NAME within minikube (example: minikube addons disable dashboard). For a list of available addons use: minikube addons list -### Usage - ``` minikube addons disable ADDON_NAME [flags] ``` @@ -47,8 +35,6 @@ minikube addons disable ADDON_NAME [flags] Enables the addon w/ADDON_NAME within minikube (example: minikube addons enable dashboard). For a list of available addons use: minikube addons list -### Usage - ``` minikube addons enable ADDON_NAME [flags] ``` @@ -57,8 +43,6 @@ minikube addons enable ADDON_NAME [flags] Lists all available minikube addons as well as their current statuses (enabled/disabled) -### Usage - ``` minikube addons list [flags] ``` @@ -66,8 +50,6 @@ minikube addons list [flags] Opens the addon w/ADDON_NAME within minikube (example: minikube addons open dashboard). For a list of available addons use: minikube addons list -### Usage - ``` minikube addons open ADDON_NAME [flags] ``` @@ -84,7 +66,7 @@ minikube addons open ADDON_NAME [flags] ``` -### Options inherited from parent commands +## Options inherited from parent commands ``` --alsologtostderr log to standard error as well as files diff --git a/site/content/en/docs/Reference/Commands/cache.md b/site/content/en/docs/Reference/Commands/cache.md index 141c878eea..cd4b335f6d 100644 --- a/site/content/en/docs/Reference/Commands/cache.md +++ b/site/content/en/docs/Reference/Commands/cache.md @@ -7,7 +7,6 @@ description: > Add or delete an image from the local cache. --- -### Subcommands ## minikube cache add diff --git a/site/content/en/docs/Reference/Commands/completion.md b/site/content/en/docs/Reference/Commands/completion.md index 4fe4f4dbbf..11fa3a822f 100644 --- a/site/content/en/docs/Reference/Commands/completion.md +++ b/site/content/en/docs/Reference/Commands/completion.md @@ -8,32 +8,11 @@ description: > --- -### Synopsis +### Overview - Outputs minikube shell completion for the given shell (bash or zsh) +Outputs minikube shell completion for the given shell (bash or zsh) - This depends on the bash-completion binary. Example installation instructions: - OS X: - -```shell - $ brew install bash-completion - $ source $(brew --prefix)/etc/bash_completion - $ minikube completion bash > ~/.minikube-completion # for bash users - $ minikube completion zsh > ~/.minikube-completion # for zsh users - $ source ~/.minikube-completion -``` - - Ubuntu: -```shell - $ apt-get install bash-completion - $ source /etc/bash-completion - $ source <(minikube completion bash) # for bash users - $ source <(minikube completion zsh) # for zsh users -``` - - Additionally, you may want to output the completion to a file and source in your .bashrc - - Note for zsh users: [1] zsh completions are only supported in versions of zsh >= 5.2 +This depends on the bash-completion binary. Example installation instructions: ### Usage @@ -41,6 +20,27 @@ description: > minikube completion SHELL [flags] ``` +## Example: macOS + +```shell +brew install bash-completion +source $(brew --prefix)/etc/bash_completion +minikube completion bash > ~/.minikube-completion # for bash users +$ minikube completion zsh > ~/.minikube-completion # for zsh users +$ source ~/.minikube-completion +``` + +## Example: Ubuntu + +```shell +apt-get install bash-completion +source /etc/bash-completion +source <(minikube completion bash) # for bash users +source <(minikube completion zsh) # for zsh users +``` + +Additionally, you may want to output the completion to a file and source in your .bashrc + ### Options inherited from parent commands ``` diff --git a/site/content/en/docs/Reference/Commands/config.md b/site/content/en/docs/Reference/Commands/config.md index 785ce97f4a..7dd514c8c1 100644 --- a/site/content/en/docs/Reference/Commands/config.md +++ b/site/content/en/docs/Reference/Commands/config.md @@ -7,7 +7,7 @@ description: > Modify minikube config --- -### Synopsis +### Overview config modifies minikube config files using subcommands like "minikube config set vm-driver kvm" @@ -93,7 +93,7 @@ minikube config unset PROPERTY_NAME [flags] ## minikube config view -### Synopsis +### Overview Display values currently set in the minikube config file. diff --git a/site/content/en/docs/Reference/Commands/dashboard.md b/site/content/en/docs/Reference/Commands/dashboard.md index 27a1de5106..4457d65dae 100644 --- a/site/content/en/docs/Reference/Commands/dashboard.md +++ b/site/content/en/docs/Reference/Commands/dashboard.md @@ -7,20 +7,20 @@ description: > Access the kubernetes dashboard running within the minikube cluster --- -### Usage +## Usage ``` minikube dashboard [flags] ``` -### Options +## Options ``` -h, --help help for dashboard --url Display dashboard URL instead of opening a browser ``` -### Options inherited from parent commands +## Options inherited from parent commands ``` --alsologtostderr log to standard error as well as files @@ -32,4 +32,4 @@ minikube dashboard [flags] --stderrthreshold severity logs at or above this threshold go to stderr (default 2) -v, --v Level log level for V logs --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging -``` \ No newline at end of file +``` diff --git a/site/content/en/docs/Reference/Commands/delete.md b/site/content/en/docs/Reference/Commands/delete.md index a8ef0065bd..77fb77de51 100644 --- a/site/content/en/docs/Reference/Commands/delete.md +++ b/site/content/en/docs/Reference/Commands/delete.md @@ -7,7 +7,7 @@ description: > Deletes a local kubernetes cluster --- -### Synopsis +### Overview Deletes a local kubernetes cluster. This command deletes the VM, and removes all associated files. diff --git a/site/content/en/docs/Reference/Commands/ip.md b/site/content/en/docs/Reference/Commands/ip.md index def902bf77..020fe0ed65 100644 --- a/site/content/en/docs/Reference/Commands/ip.md +++ b/site/content/en/docs/Reference/Commands/ip.md @@ -7,7 +7,7 @@ description: > Retrieves the IP address of the running cluster --- -### Synopsis +### Overview Retrieves the IP address of the running cluster, and writes it to STDOUT. diff --git a/site/content/en/docs/Reference/Commands/kubectl.md b/site/content/en/docs/Reference/Commands/kubectl.md index 9d0bd069fa..bd1d399090 100644 --- a/site/content/en/docs/Reference/Commands/kubectl.md +++ b/site/content/en/docs/Reference/Commands/kubectl.md @@ -8,7 +8,7 @@ description: > --- -### Synopsis +### Overview Run the kubernetes client, download it if necessary. diff --git a/site/content/en/docs/Reference/Commands/profile.md b/site/content/en/docs/Reference/Commands/profile.md index 2c3a713896..86fd88f796 100644 --- a/site/content/en/docs/Reference/Commands/profile.md +++ b/site/content/en/docs/Reference/Commands/profile.md @@ -7,7 +7,7 @@ description: > Profile gets or sets the current minikube profile --- -### Synopsis +### Overview profile sets the current minikube profile, or gets the current profile if no arguments are provided. This is used to run and manage multiple minikube instance. You can return to the default minikube profile by running `minikube profile default` @@ -42,7 +42,7 @@ You can return to the default minikube profile by running `minikube profile defa Lists all minikube profiles. -### Synopsis +### Overview Lists all valid minikube profiles and detects all possible invalid profiles. diff --git a/site/content/en/docs/Reference/Commands/service.md b/site/content/en/docs/Reference/Commands/service.md index a9579d67f8..e89859fd35 100644 --- a/site/content/en/docs/Reference/Commands/service.md +++ b/site/content/en/docs/Reference/Commands/service.md @@ -7,7 +7,7 @@ description: > Gets the kubernetes URL(s) for the specified service in your local cluster --- -### Synopsis +### Overview Gets the kubernetes URL(s) for the specified service in your local cluster. In the case of multiple URLs they will be printed one at a time. diff --git a/site/content/en/docs/Reference/Commands/status.md b/site/content/en/docs/Reference/Commands/status.md index 25f256ba9c..cd08136d33 100644 --- a/site/content/en/docs/Reference/Commands/status.md +++ b/site/content/en/docs/Reference/Commands/status.md @@ -8,7 +8,7 @@ description: > --- -### Synopsis +### Overview Gets the status of a local kubernetes cluster. Exit status contains the status of minikube's VM, cluster and kubernetes encoded on it's bits in this order from right to left. diff --git a/site/content/en/docs/Reference/Commands/stop.md b/site/content/en/docs/Reference/Commands/stop.md index 335ee17611..51f8a89b4c 100644 --- a/site/content/en/docs/Reference/Commands/stop.md +++ b/site/content/en/docs/Reference/Commands/stop.md @@ -7,7 +7,7 @@ description: > Stops a running local kubernetes cluster --- -### Synopsis +### Overview Stops a local kubernetes cluster running in Virtualbox. This command stops the VM itself, leaving all files intact. The cluster can be started again with the "start" command. diff --git a/site/content/en/docs/Reference/Commands/tunnel.md b/site/content/en/docs/Reference/Commands/tunnel.md index 9cf1e636e0..e33e4d80a1 100644 --- a/site/content/en/docs/Reference/Commands/tunnel.md +++ b/site/content/en/docs/Reference/Commands/tunnel.md @@ -7,7 +7,7 @@ description: > tunnel makes services of type LoadBalancer accessible on localhost --- -### Synopsis +### Overview tunnel creates a route to services deployed with type LoadBalancer and sets their Ingress to their ClusterIP diff --git a/site/content/en/docs/Reference/Commands/update-context.md b/site/content/en/docs/Reference/Commands/update-context.md index e8c8401097..ba6e3c0b23 100644 --- a/site/content/en/docs/Reference/Commands/update-context.md +++ b/site/content/en/docs/Reference/Commands/update-context.md @@ -7,17 +7,13 @@ description: > Verify the IP address of the running cluster in kubeconfig. --- -### Synopsis - -Retrieves the IP address of the running cluster, checks it with IP in kubeconfig, and corrects kubeconfig if incorrect. - -### Usage +The `update-context` command retrieves the IP address of the running cluster, checks it with IP in kubeconfig, and corrects kubeconfig if incorrect: ``` minikube update-context [flags] ``` -### Options inherited from parent commands +## Options inherited from parent commands ``` --alsologtostderr log to standard error as well as files diff --git a/site/content/en/docs/Reference/Commands/version.md b/site/content/en/docs/Reference/Commands/version.md index e0e94daf68..df909b4153 100644 --- a/site/content/en/docs/Reference/Commands/version.md +++ b/site/content/en/docs/Reference/Commands/version.md @@ -2,7 +2,7 @@ Print the version of minikube -### Synopsis +### Overview Print the version of minikube. diff --git a/site/content/en/docs/Tasks/dashboard.md b/site/content/en/docs/Tasks/dashboard.md index 3e22064b94..3fec853830 100644 --- a/site/content/en/docs/Tasks/dashboard.md +++ b/site/content/en/docs/Tasks/dashboard.md @@ -8,7 +8,7 @@ description: > minikube has integrated support for the [Kubernetes Dashboard UI](https://github.com/kubernetes/dashboard). -## Synopsis +## Overview The Dashboard is a web-based Kubernetes user interface. You can use it to: From 42f5b11fb383d402c04d09e875a5d9977756bc8c Mon Sep 17 00:00:00 2001 From: Pranav Jituri Date: Sat, 10 Aug 2019 12:48:49 +0530 Subject: [PATCH 063/115] Fixed as per review comments --- pkg/util/progressbar.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/util/progressbar.go b/pkg/util/progressbar.go index 98826d0225..14bb33f169 100644 --- a/pkg/util/progressbar.go +++ b/pkg/util/progressbar.go @@ -45,9 +45,8 @@ func (cpb *progressBar) TrackProgress(src string, currentSize, totalSize int64, if cpb.progress == nil { cpb.progress = pb.New64(totalSize) } - tmpl := `{{ string . "filePath" }} {{ bar . "-" "█" (cycle . "↖" "↗" "↘" "↙" ) "." "-"}} {{speed . }} {{percent .}} {{ rtime . " ETA - %s"}} {{ etime . " Elapsed - %s"}}` - p := pb.ProgressBarTemplate(tmpl).Start64(totalSize) - p.Set("filePath", filepath.Base(src)) + p := pb.Full.Start64(totalSize) + p.Set("prefix", filepath.Base(src+": ")) p.SetCurrent(currentSize) p.Set(pb.Bytes, true) From 294f880106dfb2084d5c25bf4c45804b42fc3fe0 Mon Sep 17 00:00:00 2001 From: Sharif Elgamal Date: Mon, 12 Aug 2019 11:16:20 -0700 Subject: [PATCH 064/115] Localization support for help text (#4814) * Translating help text * explicity set usage template so we can localize it * cleaning up extract and translation files * Add extraction for flags help text * some comments for extract * refactor to account for new behavior * Make usage template translations more palatable. * remove commented code * fix go mod * pin to proper version in go.mod * translate command grouping headers --- cmd/minikube/cmd/config/profile_list.go | 2 +- cmd/minikube/cmd/dashboard.go | 2 +- cmd/minikube/cmd/logs.go | 2 +- cmd/minikube/cmd/root.go | 62 +++++- cmd/minikube/cmd/start.go | 6 +- cmd/minikube/main.go | 2 - .../minikube_cross_build_and_upload.sh | 4 +- hack/jenkins/minikube_set_pending.sh | 2 +- pkg/minikube/extract/extract.go | 201 ++++++++++++++---- translations/fr-FR.json | 193 +++++++++++++++-- translations/zh-CN.json | 193 +++++++++++++++-- 11 files changed, 567 insertions(+), 102 deletions(-) diff --git a/cmd/minikube/cmd/config/profile_list.go b/cmd/minikube/cmd/config/profile_list.go index 4498e6d33c..b6aa8b91e7 100644 --- a/cmd/minikube/cmd/config/profile_list.go +++ b/cmd/minikube/cmd/config/profile_list.go @@ -45,7 +45,7 @@ var profileListCmd = &cobra.Command{ validProfiles, invalidProfiles, err := config.ListProfiles() if len(validProfiles) == 0 || err != nil { - exit.UsageT("No minikube profile was found. you could create one using: `minikube start`") + exit.UsageT("No minikube profile was found. You can create one using `minikube start`.") } for _, p := range validProfiles { validData = append(validData, []string{p.Name, p.Config.MachineConfig.VMDriver, p.Config.KubernetesConfig.NodeIP, strconv.Itoa(p.Config.KubernetesConfig.NodePort), p.Config.KubernetesConfig.KubernetesVersion}) diff --git a/cmd/minikube/cmd/dashboard.go b/cmd/minikube/cmd/dashboard.go index 1090b560fa..4db1b7d73f 100644 --- a/cmd/minikube/cmd/dashboard.go +++ b/cmd/minikube/cmd/dashboard.go @@ -129,7 +129,7 @@ var dashboardCmd = &cobra.Command{ if dashboardURLMode { out.Ln(url) } else { - out.ErrT(out.Celebrate, "Opening {{.url}} in your default browser...", out.V{"url": url}) + out.T(out.Celebrate, "Opening {{.url}} in your default browser...", out.V{"url": url}) if err = browser.OpenURL(url); err != nil { exit.WithCodeT(exit.Software, "failed to open browser: {{.error}}", out.V{"error": err}) } diff --git a/cmd/minikube/cmd/logs.go b/cmd/minikube/cmd/logs.go index 7924ba7c24..0b9bb55b4a 100644 --- a/cmd/minikube/cmd/logs.go +++ b/cmd/minikube/cmd/logs.go @@ -44,7 +44,7 @@ var ( // logsCmd represents the logs command var logsCmd = &cobra.Command{ Use: "logs", - Short: "Gets the logs of the running instance, used for debugging minikube, not user code", + Short: "Gets the logs of the running instance, used for debugging minikube, not user code.", Long: `Gets the logs of the running instance, used for debugging minikube, not user code.`, Run: func(cmd *cobra.Command, args []string) { cfg, err := config.Load() diff --git a/cmd/minikube/cmd/root.go b/cmd/minikube/cmd/root.go index 07c42b58fd..f7f2e38aa6 100644 --- a/cmd/minikube/cmd/root.go +++ b/cmd/minikube/cmd/root.go @@ -38,6 +38,7 @@ import ( "k8s.io/minikube/pkg/minikube/constants" "k8s.io/minikube/pkg/minikube/exit" "k8s.io/minikube/pkg/minikube/notify" + "k8s.io/minikube/pkg/minikube/translate" ) var dirs = [...]string{ @@ -101,12 +102,57 @@ var RootCmd = &cobra.Command{ // Execute adds all child commands to the root command sets flags appropriately. // This is called by main.main(). It only needs to happen once to the rootCmd. func Execute() { + for _, c := range RootCmd.Commands() { + c.Short = translate.T(c.Short) + c.Long = translate.T(c.Long) + c.Flags().VisitAll(func(flag *pflag.Flag) { + flag.Usage = translate.T(flag.Usage) + }) + + c.SetUsageTemplate(usageTemplate()) + } + RootCmd.Short = translate.T(RootCmd.Short) + RootCmd.Long = translate.T(RootCmd.Long) + RootCmd.Flags().VisitAll(func(flag *pflag.Flag) { + flag.Usage = translate.T(flag.Usage) + }) + if err := RootCmd.Execute(); err != nil { // Cobra already outputs the error, typically because the user provided an unknown command. os.Exit(exit.BadUsage) } } +// usageTemplate just calls translate.T on the default usage template +// explicitly using the raw string instead of calling c.UsageTemplate() +// so the extractor can find this monstrosity of a string +func usageTemplate() string { + return fmt.Sprintf(`%s:{{if .Runnable}} + {{.UseLine}}{{end}}{{if .HasAvailableSubCommands}} + {{.CommandPath}} [command]{{end}}{{if gt (len .Aliases) 0}} + +%s: + {{.NameAndAliases}}{{end}}{{if .HasExample}} + +%s: +{{.Example}}{{end}}{{if .HasAvailableSubCommands}} + +%s:{{range .Commands}}{{if (or .IsAvailableCommand (eq .Name "help"))}} + {{rpad .Name .NamePadding }} {{.Short}}{{end}}{{end}}{{end}}{{if .HasAvailableLocalFlags}} + +%s: +{{.LocalFlags.FlagUsages | trimTrailingWhitespaces}}{{end}}{{if .HasAvailableInheritedFlags}} + +%s: +{{.InheritedFlags.FlagUsages | trimTrailingWhitespaces}}{{end}}{{if .HasHelpSubCommands}} + +%s:{{range .Commands}}{{if .IsAdditionalHelpTopicCommand}} + {{rpad .CommandPath .CommandPathPadding}} {{.Short}}{{end}}{{end}}{{end}}{{if .HasAvailableSubCommands}} + +%s{{end}} +`, translate.T("Usage"), translate.T("Aliases"), translate.T("Examples"), translate.T("Available Commands"), translate.T("Flags"), translate.T("Global Flags"), translate.T("Additional help topics"), translate.T(`Use "{{.CommandPath}} [command] --help" for more information about a command.`)) +} + // Handle config values for flags used in external packages (e.g. glog) // by setting them directly, using values from viper when not passed in as args func setFlagsUsingViper() { @@ -127,12 +173,13 @@ func setFlagsUsingViper() { } func init() { + translate.DetermineLocale() RootCmd.PersistentFlags().StringP(config.MachineProfile, "p", constants.DefaultMachineName, `The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently.`) RootCmd.PersistentFlags().StringP(configCmd.Bootstrapper, "b", constants.DefaultClusterBootstrapper, "The name of the cluster bootstrapper that will set up the kubernetes cluster.") groups := templates.CommandGroups{ { - Message: "Basic Commands:", + Message: translate.T("Basic Commands:"), Commands: []*cobra.Command{ startCmd, statusCmd, @@ -142,14 +189,14 @@ func init() { }, }, { - Message: "Images Commands:", + Message: translate.T("Images Commands:"), Commands: []*cobra.Command{ dockerEnvCmd, cacheCmd, }, }, { - Message: "Configuration and Management Commands:", + Message: translate.T("Configuration and Management Commands:"), Commands: []*cobra.Command{ configCmd.AddonsCmd, configCmd.ConfigCmd, @@ -158,14 +205,14 @@ func init() { }, }, { - Message: "Networking and Connectivity Commands:", + Message: translate.T("Networking and Connectivity Commands:"), Commands: []*cobra.Command{ serviceCmd, tunnelCmd, }, }, { - Message: "Advanced Commands:", + Message: translate.T("Advanced Commands:"), Commands: []*cobra.Command{ mountCmd, sshCmd, @@ -173,7 +220,7 @@ func init() { }, }, { - Message: "Troubleshooting Commands:", + Message: translate.T("Troubleshooting Commands:"), Commands: []*cobra.Command{ sshKeyCmd, ipCmd, @@ -185,7 +232,7 @@ func init() { } groups.Add(RootCmd) - // any not grouped command will show in Other Commands group. + // Ungrouped commands will show up in the "Other Commands" section RootCmd.AddCommand(completionCmd) templates.ActsAsRootCommand(RootCmd, []string{"options"}, groups...) @@ -193,7 +240,6 @@ func init() { if err := viper.BindPFlags(RootCmd.PersistentFlags()); err != nil { exit.WithError("Unable to bind flags", err) } - cobra.OnInitialize(initConfig) } diff --git a/cmd/minikube/cmd/start.go b/cmd/minikube/cmd/start.go index 9c73cf02be..338b838b00 100644 --- a/cmd/minikube/cmd/start.go +++ b/cmd/minikube/cmd/start.go @@ -487,7 +487,7 @@ func validateUser() { func validateConfig() { diskSizeMB := pkgutil.CalculateSizeInMB(viper.GetString(humanReadableDiskSize)) if diskSizeMB < pkgutil.CalculateSizeInMB(constants.MinimumDiskSize) { - exit.WithCodeT(exit.Config, "Requested disk size {{.size_in_mb}} is less than minimum of {{.size_in_mb2}}", out.V{"size_in_mb": diskSizeMB, "size_in_mb2": pkgutil.CalculateSizeInMB(constants.MinimumDiskSize)}) + exit.WithCodeT(exit.Config, "Requested disk size {{.requested_size}} is less than minimum of {{.minimum_size}}", out.V{"requested_size": diskSizeMB, "minimum_size": pkgutil.CalculateSizeInMB(constants.MinimumDiskSize)}) } err := autoSetOptions(viper.GetString(vmDriver)) @@ -497,7 +497,7 @@ func validateConfig() { memorySizeMB := pkgutil.CalculateSizeInMB(viper.GetString(memory)) if memorySizeMB < pkgutil.CalculateSizeInMB(constants.MinimumMemorySize) { - exit.UsageT("Requested memory allocation {{.size_in_mb}} is less than the minimum allowed of {{.size_in_mb2}}", out.V{"size_in_mb": memorySizeMB, "size_in_mb2": pkgutil.CalculateSizeInMB(constants.MinimumMemorySize)}) + exit.UsageT("Requested memory allocation {{.requested_size}} is less than the minimum allowed of {{.minimum_size}}", out.V{"requested_size": memorySizeMB, "minimum_size": pkgutil.CalculateSizeInMB(constants.MinimumMemorySize)}) } if memorySizeMB < pkgutil.CalculateSizeInMB(constants.DefaultMemorySize) { out.T(out.Notice, "Requested memory allocation ({{.memory}}MB) is less than the default memory allocation of {{.default_memorysize}}MB. Beware that minikube might not work correctly or crash unexpectedly.", @@ -769,7 +769,7 @@ func validateKubernetesVersions(old *cfg.Config) (string, bool) { nvs, err := semver.Make(strings.TrimPrefix(rawVersion, version.VersionPrefix)) if err != nil { - exit.WithCodeT(exit.Data, `Unable to parse "{{.kubenretes_version}}": {{.error}}`, out.V{"kubenretes_version": rawVersion, "error": err}) + exit.WithCodeT(exit.Data, `Unable to parse "{{.kubernetes_version}}": {{.error}}`, out.V{"kubernetes_version": rawVersion, "error": err}) } nv := version.VersionPrefix + nvs.String() diff --git a/cmd/minikube/main.go b/cmd/minikube/main.go index fef04d79b5..ba4dc77f53 100644 --- a/cmd/minikube/main.go +++ b/cmd/minikube/main.go @@ -33,7 +33,6 @@ import ( "k8s.io/minikube/pkg/minikube/constants" "k8s.io/minikube/pkg/minikube/machine" "k8s.io/minikube/pkg/minikube/out" - "k8s.io/minikube/pkg/minikube/translate" _ "k8s.io/minikube/pkg/provision" ) @@ -51,7 +50,6 @@ func main() { } out.SetOutFile(os.Stdout) out.SetErrFile(os.Stderr) - translate.DetermineLocale() cmd.Execute() } diff --git a/hack/jenkins/minikube_cross_build_and_upload.sh b/hack/jenkins/minikube_cross_build_and_upload.sh index 25167ae42e..adbb0189da 100755 --- a/hack/jenkins/minikube_cross_build_and_upload.sh +++ b/hack/jenkins/minikube_cross_build_and_upload.sh @@ -49,8 +49,8 @@ git diff ${ghprbActualCommit} --name-only \ | grep -q deploy/iso/minikube && rebuild=1 || rebuild=0 if [[ "${rebuild}" -eq 1 ]]; then - echo "ISO changes detected ... rebuilding ISO" - make release-iso + echo "ISO changes detected ... rebuilding ISO" + make release-iso fi cp -r test/integration/testdata out/ diff --git a/hack/jenkins/minikube_set_pending.sh b/hack/jenkins/minikube_set_pending.sh index 23d3511b9e..a595773ff8 100755 --- a/hack/jenkins/minikube_set_pending.sh +++ b/hack/jenkins/minikube_set_pending.sh @@ -36,7 +36,7 @@ jobs=( 'Hyper-V_Windows' 'VirtualBox_Linux' 'VirtualBox_macOS' - 'VirtualBox_Windows' + 'VirtualBox_Windows' # 'KVM-GPU_Linux' - Disabled 'KVM_Linux' 'none_Linux' diff --git a/pkg/minikube/extract/extract.go b/pkg/minikube/extract/extract.go index b8b1b806f2..2ee8cbb281 100644 --- a/pkg/minikube/extract/extract.go +++ b/pkg/minikube/extract/extract.go @@ -35,16 +35,15 @@ import ( // blacklist is a list of strings to explicitly omit from translation files. var blacklist = []string{ - "%s: %v", - "%s.%s=%s", - "%s/%d", - "%s=%s", - "%v", - "GID: %s", - "MSize: %d", - "UID: %s", - "env %s", - "opt %s", + "{{.error}}", + "{{.url}}", + "{{.msg}}: {{.err}}", + "{{.key}}={{.value}}", + "opt {{.docker_option}}", + "kube-system", + "env {{.docker_env}}", + "\\n", + "==\u003e {{.name}} \u003c==", } // ErrMapFile is a constant to refer to the err_map file, which contains the Advice strings. @@ -194,6 +193,11 @@ func checkNode(stmt ast.Node, e *state) { if expr, ok := stmt.(*ast.CallExpr); ok { checkCallExpression(expr, e) } + + // Check all key value pairs for possible help text + if kvp, ok := stmt.(*ast.KeyValueExpr); ok { + checkKeyValueExpression(kvp, e) + } } // checkCallExpression takes a function call, and checks its arguments for strings @@ -216,6 +220,10 @@ func checkCallExpression(s *ast.CallExpr, e *state) { // Parse out the package of the call sfi, ok := sf.X.(*ast.Ident) if !ok { + if sfc, ok := sf.X.(*ast.CallExpr); ok { + extractFlagHelpText(s, sfc, e) + return + } return } packageName = sfi.Name @@ -242,12 +250,14 @@ func checkCallExpression(s *ast.CallExpr, e *state) { checkArguments(s, e) } +// checkArguments checks the arguments of a function call for strings func checkArguments(s *ast.CallExpr, e *state) { matched := false for _, arg := range s.Args { // This argument is an identifier. if i, ok := arg.(*ast.Ident); ok { - if checkIdentForStringValue(i, e) { + if s := checkIdentForStringValue(i); s != "" { + e.translations[s] = "" matched = true break } @@ -255,13 +265,15 @@ func checkArguments(s *ast.CallExpr, e *state) { // This argument is a string. if argString, ok := arg.(*ast.BasicLit); ok { - if addStringToList(argString.Value, e) { + if s := checkString(argString.Value); s != "" { + e.translations[s] = "" matched = true break } } } + // No string arguments were found, check everything the calls this function for strings if !matched { addParentFuncToList(e) } @@ -269,38 +281,47 @@ func checkArguments(s *ast.CallExpr, e *state) { } // checkIdentForStringValye takes a identifier and sees if it's a variable assigned to a string -func checkIdentForStringValue(i *ast.Ident, e *state) bool { +func checkIdentForStringValue(i *ast.Ident) string { // This identifier is nil if i.Obj == nil { - return false + return "" } - as, ok := i.Obj.Decl.(*ast.AssignStmt) + var s string + + // This identifier was directly assigned a value + if as, ok := i.Obj.Decl.(*ast.AssignStmt); ok { + if rhs, ok := as.Rhs[0].(*ast.BasicLit); ok { + s = rhs.Value + } - // This identifier wasn't assigned anything - if !ok { - return false } - rhs, ok := as.Rhs[0].(*ast.BasicLit) - - // This identifier was not assigned a string/basic value - if !ok { - return false + // This Identifier is part of the const or var declaration + if vs, ok := i.Obj.Decl.(*ast.ValueSpec); ok { + for j, n := range vs.Names { + if n.Name == i.Name { + if len(vs.Values) < j+1 { + // There's no way anything was assigned here, abort + return "" + } + if v, ok := vs.Values[j].(*ast.BasicLit); ok { + s = v.Value + break + } + } + } } - if addStringToList(rhs.Value, e) { - return true - } + return checkString(s) - return false } -// addStringToList takes a string, makes sure it's meant to be translated then adds it to the list if so -func addStringToList(s string, e *state) bool { +// checkString checks if a string is meant to be translated +func checkString(s string) string { // Empty strings don't need translating if len(s) <= 2 { - return false + return "" } // Parse out quote marks @@ -308,29 +329,108 @@ func addStringToList(s string, e *state) bool { // Don't translate integers if _, err := strconv.Atoi(stringToTranslate); err == nil { - return false + return "" } // Don't translate URLs if u, err := url.Parse(stringToTranslate); err == nil && u.Scheme != "" && u.Host != "" { - return false + return "" } // Don't translate commands if strings.HasPrefix(stringToTranslate, "sudo ") { - return false + return "" } // Don't translate blacklisted strings for _, b := range blacklist { if b == stringToTranslate { - return false + return "" } } // Hooray, we can translate the string! - e.translations[stringToTranslate] = "" - return true + return stringToTranslate +} + +// checkKeyValueExpression checks all kvps for help text +func checkKeyValueExpression(kvp *ast.KeyValueExpr, e *state) { + // The key must be an identifier + i, ok := kvp.Key.(*ast.Ident) + if !ok { + return + } + + // Specifically, it needs to be "Short" or "Long" + if i.Name == "Short" || i.Name == "Long" { + // The help text is directly a string, the most common case + if help, ok := kvp.Value.(*ast.BasicLit); ok { + s := checkString(help.Value) + if s != "" { + e.translations[s] = "" + } + } + + // The help text is assigned to a variable, only happens if it's very long + if help, ok := kvp.Value.(*ast.Ident); ok { + s := checkIdentForStringValue(help) + if s != "" { + e.translations[s] = "" + } + } + + // Ok now this is just a mess + if help, ok := kvp.Value.(*ast.BinaryExpr); ok { + s := checkBinaryExpression(help, e) + if s != "" { + e.translations[s] = "" + } + } + } +} + +// checkBinaryExpression checks binary expressions, stuff of the form x + y, for strings and concats them +func checkBinaryExpression(b *ast.BinaryExpr, e *state) string { + // Check the left side + var s string + if l, ok := b.X.(*ast.BasicLit); ok { + if x := checkString(l.Value); x != "" { + s += x + } + } + + if i, ok := b.X.(*ast.Ident); ok { + if x := checkIdentForStringValue(i); x != "" { + s += x + } + } + + if b1, ok := b.X.(*ast.BinaryExpr); ok { + if x := checkBinaryExpression(b1, e); x != "" { + s += x + } + } + + //Check the right side + if l, ok := b.Y.(*ast.BasicLit); ok { + if x := checkString(l.Value); x != "" { + s += x + } + } + + if i, ok := b.Y.(*ast.Ident); ok { + if x := checkIdentForStringValue(i); x != "" { + s += x + } + } + + if b1, ok := b.Y.(*ast.BinaryExpr); ok { + if x := checkBinaryExpression(b1, e); x != "" { + s += x + } + } + + return s } // writeStringsToFiles writes translations to all translation files in output @@ -411,10 +511,37 @@ func extractAdvice(f ast.Node, e *state) error { if i.Name == "Advice" { // At this point we know the value in the kvp is guaranteed to be a string advice, _ := kvp.Value.(*ast.BasicLit) - addStringToList(advice.Value, e) + s := checkString(advice.Value) + if s != "" { + e.translations[s] = "" + } } return true }) return nil } + +// extractFlagHelpText finds usage text for all command flags and adds them to the list to translate +func extractFlagHelpText(c *ast.CallExpr, sfc *ast.CallExpr, e *state) { + // We're looking for calls of the form cmd.Flags().VarP() + flags, ok := sfc.Fun.(*ast.SelectorExpr) + if !ok { + return + } + + if flags.Sel.Name != "Flags" || len(c.Args) == 1 { + return + } + + // The usage text for flags is always the final argument in the Flags() call + usage, ok := c.Args[len(c.Args)-1].(*ast.BasicLit) + if !ok { + // Something has gone wrong, abort + return + } + s := checkString(usage.Value) + if s != "" { + e.translations[s] = "" + } +} diff --git a/translations/fr-FR.json b/translations/fr-FR.json index aac753e008..13f25a56e0 100644 --- a/translations/fr-FR.json +++ b/translations/fr-FR.json @@ -1,4 +1,5 @@ { + "\n\tOutputs minikube shell completion for the given shell (bash or zsh)\n\n\tThis depends on the bash-completion binary. Example installation instructions:\n\tOS X:\n\t\t$ brew install bash-completion\n\t\t$ source $(brew --prefix)/etc/bash_completion\n\t\t$ minikube completion bash \u003e ~/.minikube-completion # for bash users\n\t\t$ minikube completion zsh \u003e ~/.minikube-completion # for zsh users\n\t\t$ source ~/.minikube-completion\n\tUbuntu:\n\t\t$ apt-get install bash-completion\n\t\t$ source /etc/bash-completion\n\t\t$ source \u003c(minikube completion bash) # for bash users\n\t\t$ source \u003c(minikube completion zsh) # for zsh users\n\n\tAdditionally, you may want to output the completion to a file and source in your .bashrc\n\n\tNote for zsh users: [1] zsh completions are only supported in versions of zsh \u003e= 5.2\n": "", "\"{{.minikube_addon}}\" was successfully disabled": "", "\"{{.name}}\" cluster does not exist": "", "\"{{.profile_name}}\" VM does not exist, nothing to stop": "", @@ -8,34 +9,73 @@ "'none' driver does not support 'minikube docker-env' command": "", "'none' driver does not support 'minikube mount' command": "", "'none' driver does not support 'minikube ssh' command": "", - "==\u003e {{.name}} \u003c==": "", "A firewall is blocking Docker within the minikube VM from reaching the internet. You may need to configure it to use a proxy.": "", "A firewall is interfering with minikube's ability to make outgoing HTTPS requests. You may need to change the value of the HTTPS_PROXY environment variable.": "", "A firewall is likely blocking minikube from reaching the internet. You may need to configure minikube to use a proxy.": "", + "A set of apiserver IP Addresses which are used in the generated certificate for kubernetes. This can be used if you want to make the apiserver available from outside the machine": "", + "A set of apiserver names which are used in the generated certificate for kubernetes. This can be used if you want to make the apiserver available from outside the machine": "", + "A set of key=value pairs that describe feature gates for alpha/experimental features.": "", + "Access the kubernetes dashboard running within the minikube cluster": "", + "Add an image to local cache.": "", + "Add machine IP to NO_PROXY environment variable": "", + "Add or delete an image from the local cache.": "", + "Additional help topics": "", + "Additional mount options, such as cache=fscache": "", + "Advanced Commands:": "", + "Aliases": "", + "Alternative image repository to pull docker images from. This can be used when you have limited access to gcr.io. Set it to \\\"auto\\\" to let minikube decide one for you. For Chinese mainland users, you may use local gcr.io mirrors such as registry.cn-hangzhou.aliyuncs.com/google_containers": "", "Alternatively, you may delete the existing VM using `minikube delete -p {{.profile_name}}`": "", + "Amount of RAM allocated to the minikube VM (format: \u003cnumber\u003e[\u003cunit\u003e], where unit = b, k, m or g)": "", + "Amount of time to wait for a service in seconds": "", + "Amount of time to wait for service in seconds": "", + "Available Commands": "", + "Basic Commands:": "", "Cannot find directory {{.path}} for mount": "", "Check that minikube is running and that you have specified the correct namespace (-n flag) if required.": "", "Check that your --kubernetes-version has a leading 'v'. For example: 'v1.1.14'": "", + "Configuration and Management Commands:": "", "Configure an external network switch following the official documentation, then add `--hyperv-virtual-switch=\u003cswitch-name\u003e` to `minikube start`": "", + "Configures the addon w/ADDON_NAME within minikube (example: minikube addons configure registry-creds). For a list of available addons use: minikube addons list ": "", "Configuring environment for Kubernetes {{.k8sVersion}} on {{.runtime}} {{.runtimeVersion}}": "Configurant l'environment pour Kubernetes {{.k8sVersion}} sur {{.runtime}} {{.runtimeVersion}}", "Configuring local host environment ...": "", + "Country code of the image mirror to be used. Leave empty to use the global one. For Chinese mainland users, set it to cn": "", "Creating %s VM (CPUs=%d, Memory=%dMB, Disk=%dMB) ...": "Créant un VM %s (CPUs=%d, Mémoire=%dMB, Disque=%dMB)", "Creating mount {{.name}} ...": "", "Creating {{.driver_name}} VM (CPUs={{.number_of_cpus}}, Memory={{.memory_size}}MB, Disk={{.disk_size}}MB) ...": "", + "Default group id used for the mount": "", + "Default user id used for the mount": "", + "Delete an image from the local cache.": "", + "Deletes a local kubernetes cluster": "", + "Deletes a local kubernetes cluster. This command deletes the VM, and removes all\nassociated files.": "", "Deleting \"{{.profile_name}}\" in {{.driver_name}} ...": "", "Disable Hyper-V when you want to run VirtualBox to boot the VM": "", + "Disable checking for the availability of hardware virtualization before the vm is started (virtualbox)": "", "Disable dynamic memory in your VM manager, or pass in a larger --memory value": "", "Disable real-time anti-virus software, reboot, and reinstall VirtualBox if the problem continues.": "", + "Disables the addon w/ADDON_NAME within minikube (example: minikube addons disable dashboard). For a list of available addons use: minikube addons list ": "", + "Disables the filesystem mounts provided by the hypervisors": "", + "Disk size allocated to the minikube VM (format: \u003cnumber\u003e[\u003cunit\u003e], where unit = b, k, m or g)": "", + "Display dashboard URL instead of opening a browser": "", + "Display the kubernetes addons URL in the CLI instead of opening it in the default browser": "", + "Display the kubernetes service URL in the CLI instead of opening it in the default browser": "", + "Display values currently set in the minikube config file": "", + "Display values currently set in the minikube config file.": "", "Docker inside the VM is unavailable. Try running 'minikube delete' to reset the VM.": "", "Documentation: {{.url}}": "", - "Done! kubectl is now configured to use {{.name}}": "Fini! kubectl est maintenant configuré pour utiliser {{.name}}.", + "Done! kubectl is now configured to use \"{{.name}}\"": "Fini! kubectl est maintenant configuré pour utiliser \"{{.name}}\".", "Download complete!": "", - "Downloading Minikube ISO ...": "", + "Downloading VM boot image ...": "", "Downloading {{.name}} {{.version}}": "", "ERROR creating `registry-creds-dpr` secret": "", "ERROR creating `registry-creds-ecr` secret: {{.error}}": "", "ERROR creating `registry-creds-gcr` secret: {{.error}}": "", + "Enable experimental NVIDIA GPU support in minikube": "", + "Enable host resolver for NAT DNS requests (virtualbox)": "", + "Enable proxy for NAT DNS requests (virtualbox)": "", + "Enable the default CNI plugin (/etc/cni/net.d/k8s.conf). Used in conjunction with \\\"--network-plugin=cni\\\"": "", + "Enables the addon w/ADDON_NAME within minikube (example: minikube addons enable dashboard). For a list of available addons use: minikube addons list ": "", "Enabling dashboard ...": "", + "Environment variables to pass to the Docker daemon. (format: key=value)": "", "Error checking driver version: {{.error}}": "", "Error creating list template": "", "Error creating minikube directory": "", @@ -77,6 +117,7 @@ "Error while setting kubectl current context : {{.error}}": "", "Error writing mount pid": "", "Error: [{{.id}}] {{.error}}": "", + "Examples": "", "Failed runtime": "", "Failed to cache ISO": "", "Failed to cache and load images": "", @@ -108,33 +149,80 @@ "Failed to update cluster": "", "Failed to update config": "", "Failed unmount: {{.error}}": "", + "File permissions used for the mount": "", + "Flags": "", "Follow": "", "For best results, install kubectl: https://kubernetes.io/docs/tasks/tools/install-kubectl/": "", "For more information, see:": "", + "Force environment to be configured for a specified shell: [fish, cmd, powershell, tcsh, bash, zsh], default is auto-detect": "", "Found network options:": "", + "Found {{.number}} invalid profile(s) ! ": "", + "Gets the kubernetes URL(s) for the specified service in your local cluster": "", + "Gets the kubernetes URL(s) for the specified service in your local cluster. In the case of multiple URLs they will be printed one at a time.": "", + "Gets the logs of the running instance, used for debugging minikube, not user code.": "", + "Gets the status of a local kubernetes cluster": "", + "Gets the status of a local kubernetes cluster.\n\tExit status contains the status of minikube's VM, cluster and kubernetes encoded on it's bits in this order from right to left.\n\tEg: 7 meaning: 1 (for minikube NOK) + 2 (for cluster NOK) + 4 (for kubernetes NOK)": "", + "Gets the value of PROPERTY_NAME from the minikube config file": "", + "Global Flags": "", + "Go template format string for the addon list output. The format for Go templates can be found here: https://golang.org/pkg/text/template/\nFor the list of accessible variables for the template, see the struct values here: https://godoc.org/k8s.io/minikube/cmd/minikube/cmd/config#AddonListTemplate": "", + "Go template format string for the cache list output. The format for Go templates can be found here: https://golang.org/pkg/text/template/\nFor the list of accessible variables for the template, see the struct values here: https://godoc.org/k8s.io/minikube/cmd/minikube/cmd#CacheListTemplate": "", + "Go template format string for the config view output. The format for Go templates can be found here: https://golang.org/pkg/text/template/\nFor the list of accessible variables for the template, see the struct values here: https://godoc.org/k8s.io/minikube/cmd/minikube/cmd/config#ConfigViewTemplate": "", + "Go template format string for the status output. The format for Go templates can be found here: https://golang.org/pkg/text/template/\nFor the list accessible variables for the template, see the struct values here: https://godoc.org/k8s.io/minikube/cmd/minikube/cmd#Status": "", "Group ID: {{.groupID}}": "", "Have you set up libvirt correctly?": "", + "Hide the hypervisor signature from the guest in minikube": "", "If the above advice does not help, please let us know: ": "", + "If true, cache docker images for the current bootstrapper and load them into the machine. Always false with --vm-driver=none.": "", + "If true, only download and cache files for later use - don't install or start anything.": "", "If using the none driver, ensure that systemctl is installed": "", "Ignoring --vm-driver={{.driver_name}}, as the existing \"{{.profile_name}}\" VM was created using the {{.driver_name2}} driver.": "", + "Images Commands:": "", "In some environments, this message is incorrect. Try 'minikube start --no-vtx-check'": "", + "Insecure Docker registries to pass to the Docker daemon. The default service CIDR range will automatically be added.": "", "Install VirtualBox, ensure that VBoxManage is executable and in path, or select an alternative value for --vm-driver": "", "Install the latest kvm2 driver and run 'virt-host-validate'": "", "Install the latest minikube hyperkit driver, and run 'minikube delete'": "", "Invalid size passed in argument: {{.error}}": "", "IsEnabled failed": "", + "Kill the mount process spawned by minikube start": "", "Kubernetes downgrade is not supported, will continue to use {{.version}}": "", "Launching Kubernetes ... ": "Lançant Kubernetes ...", "Launching proxy ...": "", + "List all available images from the local cache.": "", + "List of guest VSock ports that should be exposed as sockets on the host (Only supported on with hyperkit now).": "", + "Lists all available minikube addons as well as their current statuses (enabled/disabled)": "", + "Lists all minikube profiles.": "", + "Lists all valid minikube profiles and detects all possible invalid profiles.": "", + "Lists the URLs for the services in your local cluster": "", + "Local folders to share with Guest via NFS mounts (Only supported on with hyperkit now)": "", + "Location of the VPNKit socket used for networking. If empty, disables Hyperkit VPNKitSock, if 'auto' uses Docker for Mac VPNKit connection, otherwise uses the specified VSock.": "", + "Location of the minikube iso": "", + "Log into or run a command on a machine with SSH; similar to 'docker-machine ssh'": "", + "Log into or run a command on a machine with SSH; similar to 'docker-machine ssh'.": "", "Message Size: {{.size}}": "", + "Minikube is a CLI tool that provisions and manages single-node Kubernetes clusters optimized for development workflows.": "", + "Minikube is a tool for managing local Kubernetes clusters.": "", + "Modify minikube config": "", + "Modify minikube's kubernetes addons": "", "Mount type: {{.name}}": "", "Mounting host path {{.sourcePath}} into VM as {{.destinationPath}} ...": "", + "Mounts the specified directory into minikube": "", + "Mounts the specified directory into minikube.": "", "NOTE: This process must stay alive for the mount to be accessible ...": "", + "Networking and Connectivity Commands:": "", + "No minikube profile was found. You can create one using `minikube start`.": "", "None of known repositories in your location is accessible. Use {{.image_repository_name}} as fallback.": "", "None of known repositories is accessible. Consider specifying an alternative image repository with --image-repository flag": "", - "Opening %s in your default browser...": "", + "Number of CPUs allocated to the minikube VM": "", + "Number of lines back to go within the log": "", + "OS release is {{.pretty_name}}": "", + "Open the addons URL with https instead of http": "", + "Open the service URL with https instead of http": "", "Opening kubernetes service {{.namespace_name}}/{{.service_name}} in default browser...": "", + "Opening {{.url}} in your default browser...": "", + "Opens the addon w/ADDON_NAME within minikube (example: minikube addons open dashboard). For a list of available addons use: minikube addons list ": "", "Options: {{.options}}": "", + "Outputs minikube shell completion for the given shell (bash or zsh)": "", "Permissions: {{.octalMode}} ({{.writtenMode}})": "", "Please check your BIOS, and ensure that you are running without HyperV or other nested virtualization that may interfere": "", "Please don't run minikube as root or with 'sudo' privileges. It isn't necessary with {{.driver}} driver.": "", @@ -144,30 +232,49 @@ "Please make sure the service you are looking for is deployed or is in the correct namespace.": "", "Please run with sudo. the vm-driver \"{{.driver_name}}\" requires sudo.": "", "Please specify the directory to be mounted: \n\tminikube mount \u003csource directory\u003e:\u003ctarget directory\u003e (example: \"/host-home:/vm-home\")": "", - "Please upgrade the 'docker-machine-driver-kvm2'. {{.documentation_url}}": "", + "Please upgrade the '{{.driver_executable}}'. {{.documentation_url}}": "", "Powering off \"{{.profile_name}}\" via SSH ...": "", + "Preparing Kubernetes {{.k8sVersion}} on {{.runtime}} {{.runtimeVersion}} ...": "", + "Print current and latest version number": "", + "Print the version of minikube": "", + "Print the version of minikube.": "", "Problems detected in {{.entry}}:": "", "Problems detected in {{.name}}:": "", + "Profile gets or sets the current minikube profile": "", + "Provide VM UUID to restore MAC address (only supported with Hyperkit driver).": "", "Pulling images ...": "Extrayant les images ... ", "Re-run 'minikube start' with --alsologtostderr -v=8 to see the VM driver error message": "", - "Re-using the currently running {{.driver_name}} VM for \"{{.profile_name}}\" ...": "", "Reboot to complete VirtualBox installation, and verify that VirtualBox is not blocked by your system": "", "Rebuild libvirt with virt-network support": "", "Received {{.name}} signal": "", + "Registry mirrors to pass to the Docker daemon": "", "Reinstall VirtualBox and verify that it is not blocked: System Preferences -\u003e Security \u0026 Privacy -\u003e General -\u003e Some system software was blocked from loading": "", "Related issues:": "", - "Relaunching Kubernetes {{.version}} using {{.bootstrapper}} ... ": "", - "Requested disk size {{.size_in_mb}} is less than minimum of {{.size_in_mb2}}": "", + "Relaunching Kubernetes using {{.bootstrapper}} ... ": "", + "Requested disk size {{.requested_size}} is less than minimum of {{.minimum_size}}": "", "Requested memory allocation ({{.memory}}MB) is less than the default memory allocation of {{.default_memorysize}}MB. Beware that minikube might not work correctly or crash unexpectedly.": "", - "Requested memory allocation {{.size_in_mb}} is less than the minimum allowed of {{.size_in_mb2}}": "", - "Restarting existing {{.driver_name}} VM for \"{{.profile_name}}\" ...": "", + "Requested memory allocation {{.requested_size}} is less than the minimum allowed of {{.minimum_size}}": "", + "Retrieve the ssh identity key path of the specified cluster": "", + "Retrieve the ssh identity key path of the specified cluster.": "", + "Retrieves the IP address of the running cluster": "", + "Retrieves the IP address of the running cluster, and writes it to STDOUT.": "", + "Retrieves the IP address of the running cluster, checks it\n\t\t\twith IP in kubeconfig, and corrects kubeconfig if incorrect.": "", + "Returns the value of PROPERTY_NAME from the minikube config file. Can be overwritten at runtime by flags or environmental variables.": "", "Run 'minikube delete' to delete the stale VM": "", "Run 'minikube delete'. If the problem persists, check your proxy or firewall configuration": "", "Run 'sudo modprobe vboxdrv' and reinstall VirtualBox if it fails.": "", + "Run kubectl": "", "Run minikube from the C: drive.": "", + "Run the kubernetes client, download it if necessary.\nExamples:\nminikube kubectl -- --help\nkubectl get pods --namespace kube-system": "", "Running on localhost (CPUs={{.number_of_cpus}}, Memory={{.memory_size}}MB, Disk={{.disk_size}}MB) ...": "", "Set failed": "", + "Sets an individual value in a minikube config file": "", + "Sets the PROPERTY_NAME config value to PROPERTY_VALUE\n\tThese values can be overwritten by flags or environment variables at runtime.": "", + "Sets up docker env variables; similar to '$(docker-machine env)'": "", + "Sets up docker env variables; similar to '$(docker-machine env)'.": "", "Setting profile failed": "", + "Show only log entries which point to known problems": "", + "Show only the most recent journal entries, and continuously print new entries as they are appended to the journal.": "", "Skipped switching kubectl context for {{.profile_name}} , because --keep-context": "", "Sorry that minikube crashed. If this was unexpected, we would love to hear from you:": "", "Sorry, completion support is not yet implemented for {{.name}}": "", @@ -175,30 +282,60 @@ "Sorry, url provided with --registry-mirror flag is invalid {{.url}}": "", "Specify --kubernetes-version in v\u003cmajor\u003e.\u003cminor.\u003cbuild\u003e form. example: 'v1.1.14'": "", "Specify an alternate --host-only-cidr value, such as 172.16.0.1/24": "", + "Specify arbitrary flags to pass to the Docker daemon. (format: key=value)": "", + "Specify the 9p version that the mount should use": "", + "Specify the ip that the mount should be setup on": "", + "Specify the mount filesystem type (supported types: 9p)": "", + "Starting existing {{.driver_name}} VM for \"{{.profile_name}}\" ...": "", + "Starts a local kubernetes cluster": "Démarre un cluster Kubernetes", "Stopping \"{{.profile_name}}\" in {{.driver_name}} ...": "", + "Stops a local kubernetes cluster running in Virtualbox. This command stops the VM\nitself, leaving all files intact. The cluster can be started again with the \"start\" command.": "", + "Stops a running local kubernetes cluster": "", "Successfully mounted {{.sourcePath}} to {{.destinationPath}}": "", "Suggestion: {{.advice}}": "", "Target directory {{.path}} must be an absolute path": "", "The \"{{.cluster_name}}\" cluster has been deleted.": "", - "The 'docker-machine-driver-kvm2' version is old. Please consider upgrading. {{.documentation_url}}": "", "The 'none' driver provides limited isolation and may reduce system security and reliability.": "", + "The CIDR to be used for service cluster IPs.": "", + "The CIDR to be used for the minikube VM (only supported with Virtualbox driver)": "", + "The KVM QEMU connection URI. (works only with kvm2 driver on linux)": "", "The KVM driver is unable to resurrect this old VM. Please run `minikube delete` to delete it and try again.": "", + "The KVM network name. (only supported with KVM driver)": "", "The VM driver exited with an error, and may be corrupt. Run 'minikube start' with --alsologtostderr -v=8 to see the error": "", + "The apiserver listening port": "", + "The apiserver name which is used in the generated certificate for kubernetes. This can be used if you want to make the apiserver available from outside the machine": "", + "The argument to pass the minikube mount command on start": "", + "The cluster dns domain name used in the kubernetes cluster": "", + "The container runtime to be used (docker, crio, containerd)": "", + "The cri socket path to be used": "", "The docker host is currently not running": "", "The docker service is currently not active": "", + "The driver '{{.driver}}' is not supported on {{.os}}": "", + "The hyperv virtual switch name. Defaults to first found. (only supported with HyperV driver)": "", + "The kubernetes version that the minikube VM will use (ex: v1.2.3)": "", "The minikube VM is offline. Please run 'minikube start' to start it again.": "", + "The name of the network plugin": "", + "The number of bytes to use for 9p packet payload": "", + "The service namespace": "", + "The services namespace": "", + "The time interval for each check that wait performs in seconds": "", "The value passed to --format is invalid": "", "The value passed to --format is invalid: {{.error}}": "", "The vmwarefusion driver is deprecated and support for it will be removed in a future release.\n\t\t\tPlease consider switching to the new vmware unified driver, which is intended to replace the vmwarefusion driver.\n\t\t\tSee https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#vmware-unified-driver for more information.\n\t\t\tTo disable this message, run [minikube config set ShowDriverDeprecationNotification false]": "", + "There's a new version for '{{.driver_executable}}'. Please consider upgrading. {{.documentation_url}}": "", "These changes will take effect upon a minikube delete and then a minikube start": "", "This addon does not have an endpoint defined for the 'addons open' command.\nYou can add one by annotating a service with the label {{.labelName}}:{{.addonName}}": "", "This can also be done automatically by setting the env var CHANGE_MINIKUBE_NONE_USER=true": "", + "This will keep the existing kubectl context and will create a minikube context.": "", + "This will start the mount daemon and automatically mount files into minikube": "", "Tip: Use 'minikube start -p \u003cname\u003e' to create a new cluster, or 'minikube delete' to delete this one.": "", "To connect to this cluster, use: kubectl --context={{.name}}": "", "To connect to this cluster, use: kubectl --context={{.profile_name}}": "", "To disable this notice, run: 'minikube config set WantUpdateNotification false'": "", + "To start minikube with HyperV Powershell must be in your PATH`": "", "To switch drivers, you may create a new VM using `minikube start -p \u003cname\u003e --vm-driver={{.driver_name}}`": "", "To use kubectl or minikube commands as your own user, you may": "", + "Troubleshooting Commands:": "", "Unable to bind flags": "", "Unable to enable dashboard": "", "Unable to fetch latest version info": "", @@ -209,72 +346,85 @@ "Unable to load cached images from config file.": "", "Unable to load cached images: {{.error}}": "", "Unable to load config: {{.error}}": "", - "Unable to parse \"{{.kubenretes_version}}\": {{.error}}": "", + "Unable to parse \"{{.kubernetes_version}}\": {{.error}}": "", "Unable to pull images, which may be OK: {{.error}}": "", "Unable to start VM": "", "Unable to stop VM": "", "Uninstalling Kubernetes {{.kubernetes_version}} using {{.bootstrapper_name}} ...": "", "Unmounting {{.path}} ...": "", + "Unset variables instead of setting them": "", "Update server returned an empty list": "", "Upgrade to QEMU v3.1.0+, run 'virt-host-validate', or ensure that you are not running in a nested VM environment.": "", + "Upgrading from Kubernetes {{.old}} to {{.new}}": "", + "Usage": "Usage", "Usage: minikube completion SHELL": "", + "Use \"{{.CommandPath}} [command] --help\" for more information about a command.": "", "User ID: {{.userID}}": "", "Userspace file server is shutdown": "", "Userspace file server: ": "", "Using image repository {{.name}}": "", + "Using the running {{.driver_name}} \"{{.profile_name}}\" VM ...": "", "Verify that your HTTP_PROXY and HTTPS_PROXY environment variables are set correctly.": "", + "Verify the IP address of the running cluster in kubeconfig.": "", "Verifying dashboard health ...": "", "Verifying proxy health ...": "", "Verifying:": "Vérifiant:", "Version: {{.version}}": "", "Wait failed": "", "Wait failed: {{.error}}": "", + "Wait until Kubernetes core services are healthy before exiting": "", "Waiting for SSH access ...": "Attendant l'accès SSH ...", + "Waiting for the host to be provisioned ...": "", + "Waiting for:": "", + "Where to root the NFS Shares (defaults to /nfsshares, only supported with hyperkit now)": "", "You appear to be using a proxy, but your NO_PROXY environment does not include the minikube IP ({{.ip_address}}). Please see https://github.com/kubernetes/minikube/blob/master/docs/http_proxy.md for more details": "", + "You can delete them using the following command(s): ": "", "You must specify a service name": "", "Your host does not support KVM virtualization. Ensure that qemu-kvm is installed, and run 'virt-host-validate' to debug the problem": "", "Your host is failing to route packets to the minikube VM. If you have VPN software, try turning it off or configuring it so that it does not re-route traffic to the VM IP. If not, check your VM environment routing options.": "", - "\\n": "", "addon '{{.name}}' is currently not enabled.\nTo enable this addon run:\nminikube addons enable {{.name}}": "", "addon '{{.name}}' is not a valid addon packaged with minikube.\nTo see the list of available addons run:\nminikube addons list": "", "addon list failed": "", + "addons modifies minikube addons files using subcommands like \"minikube addons enable heapster\"": "", "api load": "", "bash completion failed": "", "browser failed to open url: {{.error}}": "", + "call with cleanup=true to remove old tunnels": "", "command runner": "", + "config modifies minikube config files using subcommands like \"minikube config set vm-driver kvm\"\nConfigurable fields: \\n\\n": "", "config view failed": "", "dashboard service is not running: {{.error}}": "", "disable failed": "", "enable failed": "", - "env {{.docker_env}}": "", "error creating clientset": "", "error creating machine client": "", "error getting driver": "", "error parsing the input ip address for mount": "", "error starting tunnel": "", "failed to open browser: {{.error}}": "", - "kube-system": "", "kubectl and minikube configuration will be stored in {{.home_folder}}": "", - "kubectl has been configured configured to use {{.name}}": "", "kubectl not found in PATH, but is required for the dashboard. Installation guide: https://kubernetes.io/docs/tasks/tools/install-kubectl/": "", "kubectl proxy": "", "logdir set failed": "", "minikube is not running, so the service cannot be accessed": "", "minikube is unable to access the Google Container Registry. You may need to configure it to use a HTTP proxy.": "", "minikube profile was successfully set to {{.profile_name}}": "", - "minikube will upgrade the local cluster from Kubernetes {{.old}} to {{.new}}": "", "minikube {{.version}} is available! Download it: {{.url}}": "", "minikube {{.version}} on {{.os}} ({{.arch}})": "minikube {{.version}} sur {{.os}} ({{.arch}})", "mount argument \"{{.value}}\" must be in form: \u003csource directory\u003e:\u003ctarget directory\u003e": "", "mount failed": "", "need to relocate them. For example, to overwrite your own settings:": "", - "opt {{.docker_option}}": "", + "profile sets the current minikube profile, or gets the current profile if no arguments are provided. This is used to run and manage multiple minikube instance. You can return to the default minikube profile by running `minikube profile default`": "", "service {{.namespace_name}}/{{.service_name}} has no node port": "", "stat failed": "", + "tunnel creates a route to services deployed with type LoadBalancer and sets their Ingress to their ClusterIP": "", + "tunnel makes services of type LoadBalancer accessible on localhost": "", "unable to bind flags": "", "unable to set logtostderr": "", "unset failed": "", - "unsupported driver: {{.driver_name}}": "", + "unset minikube profile": "", + "unsets PROPERTY_NAME from the minikube config file. Can be overwritten by flags or environmental variables": "", + "unsets an individual value in a minikube config file": "", "unsupported driver: {{.name}}": "", "update config": "", "usage: minikube addons configure ADDON_NAME": "", @@ -288,16 +438,13 @@ "usage: minikube profile [MINIKUBE_PROFILE_NAME]": "", "zsh completion failed": "", "{{.addonName}} was successfully enabled": "", - "{{.error}}": "", "{{.extra_option_component_name}}.{{.key}}={{.value}}": "", - "{{.key}}={{.value}}": "", "{{.machine}} IP has been updated to point at {{.ip}}": "", "{{.machine}} IP was already correctly configured for {{.ip}}": "", - "{{.msg}}: {{.err}}": "", "{{.name}} cluster does not exist": "", "{{.name}} has no available configuration options": "", "{{.name}} was successfully configured": "", + "{{.prefix}}minikube {{.version}} on {{.platform}}": "", "{{.type}} is not yet a supported filesystem. We will try anyways!": "", - "{{.url}}": "", "{{.url}} is not accessible: {{.error}}": "" } \ No newline at end of file diff --git a/translations/zh-CN.json b/translations/zh-CN.json index b9a194609b..6b08ab5667 100644 --- a/translations/zh-CN.json +++ b/translations/zh-CN.json @@ -1,4 +1,5 @@ { + "\n\tOutputs minikube shell completion for the given shell (bash or zsh)\n\n\tThis depends on the bash-completion binary. Example installation instructions:\n\tOS X:\n\t\t$ brew install bash-completion\n\t\t$ source $(brew --prefix)/etc/bash_completion\n\t\t$ minikube completion bash \u003e ~/.minikube-completion # for bash users\n\t\t$ minikube completion zsh \u003e ~/.minikube-completion # for zsh users\n\t\t$ source ~/.minikube-completion\n\tUbuntu:\n\t\t$ apt-get install bash-completion\n\t\t$ source /etc/bash-completion\n\t\t$ source \u003c(minikube completion bash) # for bash users\n\t\t$ source \u003c(minikube completion zsh) # for zsh users\n\n\tAdditionally, you may want to output the completion to a file and source in your .bashrc\n\n\tNote for zsh users: [1] zsh completions are only supported in versions of zsh \u003e= 5.2\n": "", "\"{{.minikube_addon}}\" was successfully disabled": "", "\"{{.name}}\" cluster does not exist": "", "\"{{.profile_name}}\" VM does not exist, nothing to stop": "", @@ -8,34 +9,74 @@ "'none' driver does not support 'minikube docker-env' command": "", "'none' driver does not support 'minikube mount' command": "", "'none' driver does not support 'minikube ssh' command": "", - "==\u003e {{.name}} \u003c==": "", "A firewall is blocking Docker within the minikube VM from reaching the internet. You may need to configure it to use a proxy.": "", "A firewall is interfering with minikube's ability to make outgoing HTTPS requests. You may need to change the value of the HTTPS_PROXY environment variable.": "", "A firewall is likely blocking minikube from reaching the internet. You may need to configure minikube to use a proxy.": "", + "A set of apiserver IP Addresses which are used in the generated certificate for kubernetes. This can be used if you want to make the apiserver available from outside the machine": "", + "A set of apiserver names which are used in the generated certificate for kubernetes. This can be used if you want to make the apiserver available from outside the machine": "", + "A set of key=value pairs that describe feature gates for alpha/experimental features.": "", + "Access the kubernetes dashboard running within the minikube cluster": "", + "Add an image to local cache.": "", + "Add machine IP to NO_PROXY environment variable": "", + "Add or delete an image from the local cache.": "", + "Additional help topics": "", + "Additional mount options, such as cache=fscache": "", + "Advanced Commands:": "", + "Aliases": "", + "Alternative image repository to pull docker images from. This can be used when you have limited access to gcr.io. Set it to \\\"auto\\\" to let minikube decide one for you. For Chinese mainland users, you may use local gcr.io mirrors such as registry.cn-hangzhou.aliyuncs.com/google_containers": "", "Alternatively, you may delete the existing VM using `minikube delete -p {{.profile_name}}`": "", + "Amount of RAM allocated to the minikube VM (format: \u003cnumber\u003e[\u003cunit\u003e], where unit = b, k, m or g)": "", + "Amount of time to wait for a service in seconds": "", + "Amount of time to wait for service in seconds": "", + "Available Commands": "", + "Basic Commands:": "", "Cannot find directory {{.path}} for mount": "", "Check that minikube is running and that you have specified the correct namespace (-n flag) if required.": "", "Check that your --kubernetes-version has a leading 'v'. For example: 'v1.1.14'": "", + "Configuration and Management Commands:": "", "Configure an external network switch following the official documentation, then add `--hyperv-virtual-switch=\u003cswitch-name\u003e` to `minikube start`": "", + "Configures the addon w/ADDON_NAME within minikube (example: minikube addons configure registry-creds). For a list of available addons use: minikube addons list ": "", "Configuring environment for Kubernetes {{.k8sVersion}} on {{.runtime}} {{.runtimeVersion}}": "开始为Kubernetes {{.k8sVersion}},{{.runtime}} {{.runtimeVersion}} 配置环境变量", "Configuring local host environment ...": "", + "Country code of the image mirror to be used. Leave empty to use the global one. For Chinese mainland users, set it to cn": "", "Creating %s VM (CPUs=%d, Memory=%dMB, Disk=%dMB) ...": "正在创建%s虚拟机(CPU=%d,内存=%dMB,磁盘=%dMB)...", "Creating mount {{.name}} ...": "", "Creating {{.driver_name}} VM (CPUs={{.number_of_cpus}}, Memory={{.memory_size}}MB, Disk={{.disk_size}}MB) ...": "", + "Default group id used for the mount": "", + "Default user id used for the mount": "", + "Delete an image from the local cache.": "", + "Deletes a local kubernetes cluster": "", + "Deletes a local kubernetes cluster. This command deletes the VM, and removes all\nassociated files.": "", "Deleting \"{{.profile_name}}\" in {{.driver_name}} ...": "", "Disable Hyper-V when you want to run VirtualBox to boot the VM": "", + "Disable checking for the availability of hardware virtualization before the vm is started (virtualbox)": "", "Disable dynamic memory in your VM manager, or pass in a larger --memory value": "", "Disable real-time anti-virus software, reboot, and reinstall VirtualBox if the problem continues.": "", + "Disables the addon w/ADDON_NAME within minikube (example: minikube addons disable dashboard). For a list of available addons use: minikube addons list ": "", + "Disables the filesystem mounts provided by the hypervisors": "", + "Disk size allocated to the minikube VM (format: \u003cnumber\u003e[\u003cunit\u003e], where unit = b, k, m or g)": "", + "Display dashboard URL instead of opening a browser": "", + "Display the kubernetes addons URL in the CLI instead of opening it in the default browser": "", + "Display the kubernetes service URL in the CLI instead of opening it in the default browser": "", + "Display values currently set in the minikube config file": "", + "Display values currently set in the minikube config file.": "", "Docker inside the VM is unavailable. Try running 'minikube delete' to reset the VM.": "", "Documentation: {{.url}}": "", + "Done! kubectl is now configured to use \"{{.name}}\"": "", "Done! kubectl is now configured to use {{.name}}": "完成!kubectl已经配置至{{.name}}", "Download complete!": "", - "Downloading Minikube ISO ...": "", + "Downloading VM boot image ...": "", "Downloading {{.name}} {{.version}}": "", "ERROR creating `registry-creds-dpr` secret": "", "ERROR creating `registry-creds-ecr` secret: {{.error}}": "", "ERROR creating `registry-creds-gcr` secret: {{.error}}": "", + "Enable experimental NVIDIA GPU support in minikube": "", + "Enable host resolver for NAT DNS requests (virtualbox)": "", + "Enable proxy for NAT DNS requests (virtualbox)": "", + "Enable the default CNI plugin (/etc/cni/net.d/k8s.conf). Used in conjunction with \\\"--network-plugin=cni\\\"": "", + "Enables the addon w/ADDON_NAME within minikube (example: minikube addons enable dashboard). For a list of available addons use: minikube addons list ": "", "Enabling dashboard ...": "", + "Environment variables to pass to the Docker daemon. (format: key=value)": "", "Error checking driver version: {{.error}}": "", "Error creating list template": "", "Error creating minikube directory": "", @@ -77,6 +118,7 @@ "Error while setting kubectl current context : {{.error}}": "", "Error writing mount pid": "", "Error: [{{.id}}] {{.error}}": "", + "Examples": "", "Failed runtime": "", "Failed to cache ISO": "", "Failed to cache and load images": "", @@ -108,33 +150,80 @@ "Failed to update cluster": "", "Failed to update config": "", "Failed unmount: {{.error}}": "", + "File permissions used for the mount": "", + "Flags": "", "Follow": "", "For best results, install kubectl: https://kubernetes.io/docs/tasks/tools/install-kubectl/": "", "For more information, see:": "", + "Force environment to be configured for a specified shell: [fish, cmd, powershell, tcsh, bash, zsh], default is auto-detect": "", "Found network options:": "", + "Found {{.number}} invalid profile(s) ! ": "", + "Gets the kubernetes URL(s) for the specified service in your local cluster": "", + "Gets the kubernetes URL(s) for the specified service in your local cluster. In the case of multiple URLs they will be printed one at a time.": "", + "Gets the logs of the running instance, used for debugging minikube, not user code.": "", + "Gets the status of a local kubernetes cluster": "", + "Gets the status of a local kubernetes cluster.\n\tExit status contains the status of minikube's VM, cluster and kubernetes encoded on it's bits in this order from right to left.\n\tEg: 7 meaning: 1 (for minikube NOK) + 2 (for cluster NOK) + 4 (for kubernetes NOK)": "", + "Gets the value of PROPERTY_NAME from the minikube config file": "", + "Global Flags": "", + "Go template format string for the addon list output. The format for Go templates can be found here: https://golang.org/pkg/text/template/\nFor the list of accessible variables for the template, see the struct values here: https://godoc.org/k8s.io/minikube/cmd/minikube/cmd/config#AddonListTemplate": "", + "Go template format string for the cache list output. The format for Go templates can be found here: https://golang.org/pkg/text/template/\nFor the list of accessible variables for the template, see the struct values here: https://godoc.org/k8s.io/minikube/cmd/minikube/cmd#CacheListTemplate": "", + "Go template format string for the config view output. The format for Go templates can be found here: https://golang.org/pkg/text/template/\nFor the list of accessible variables for the template, see the struct values here: https://godoc.org/k8s.io/minikube/cmd/minikube/cmd/config#ConfigViewTemplate": "", + "Go template format string for the status output. The format for Go templates can be found here: https://golang.org/pkg/text/template/\nFor the list accessible variables for the template, see the struct values here: https://godoc.org/k8s.io/minikube/cmd/minikube/cmd#Status": "", "Group ID: {{.groupID}}": "", "Have you set up libvirt correctly?": "", + "Hide the hypervisor signature from the guest in minikube": "", "If the above advice does not help, please let us know: ": "", + "If true, cache docker images for the current bootstrapper and load them into the machine. Always false with --vm-driver=none.": "", + "If true, only download and cache files for later use - don't install or start anything.": "", "If using the none driver, ensure that systemctl is installed": "", "Ignoring --vm-driver={{.driver_name}}, as the existing \"{{.profile_name}}\" VM was created using the {{.driver_name2}} driver.": "", + "Images Commands:": "", "In some environments, this message is incorrect. Try 'minikube start --no-vtx-check'": "", + "Insecure Docker registries to pass to the Docker daemon. The default service CIDR range will automatically be added.": "", "Install VirtualBox, ensure that VBoxManage is executable and in path, or select an alternative value for --vm-driver": "", "Install the latest kvm2 driver and run 'virt-host-validate'": "", "Install the latest minikube hyperkit driver, and run 'minikube delete'": "", "Invalid size passed in argument: {{.error}}": "", "IsEnabled failed": "", + "Kill the mount process spawned by minikube start": "", "Kubernetes downgrade is not supported, will continue to use {{.version}}": "", "Launching Kubernetes ... ": "正在启动 Kubernetes ... ", "Launching proxy ...": "", + "List all available images from the local cache.": "", + "List of guest VSock ports that should be exposed as sockets on the host (Only supported on with hyperkit now).": "", + "Lists all available minikube addons as well as their current statuses (enabled/disabled)": "", + "Lists all minikube profiles.": "", + "Lists all valid minikube profiles and detects all possible invalid profiles.": "", + "Lists the URLs for the services in your local cluster": "", + "Local folders to share with Guest via NFS mounts (Only supported on with hyperkit now)": "", + "Location of the VPNKit socket used for networking. If empty, disables Hyperkit VPNKitSock, if 'auto' uses Docker for Mac VPNKit connection, otherwise uses the specified VSock.": "", + "Location of the minikube iso": "", + "Log into or run a command on a machine with SSH; similar to 'docker-machine ssh'": "", + "Log into or run a command on a machine with SSH; similar to 'docker-machine ssh'.": "", "Message Size: {{.size}}": "", + "Minikube is a CLI tool that provisions and manages single-node Kubernetes clusters optimized for development workflows.": "", + "Minikube is a tool for managing local Kubernetes clusters.": "", + "Modify minikube config": "", + "Modify minikube's kubernetes addons": "", "Mount type: {{.name}}": "", "Mounting host path {{.sourcePath}} into VM as {{.destinationPath}} ...": "", + "Mounts the specified directory into minikube": "", + "Mounts the specified directory into minikube.": "", "NOTE: This process must stay alive for the mount to be accessible ...": "", + "Networking and Connectivity Commands:": "", + "No minikube profile was found. You can create one using `minikube start`.": "", "None of known repositories in your location is accessible. Use {{.image_repository_name}} as fallback.": "", "None of known repositories is accessible. Consider specifying an alternative image repository with --image-repository flag": "", - "Opening %s in your default browser...": "", + "Number of CPUs allocated to the minikube VM": "", + "Number of lines back to go within the log": "", + "OS release is {{.pretty_name}}": "", + "Open the addons URL with https instead of http": "", + "Open the service URL with https instead of http": "", "Opening kubernetes service {{.namespace_name}}/{{.service_name}} in default browser...": "", + "Opening {{.url}} in your default browser...": "", + "Opens the addon w/ADDON_NAME within minikube (example: minikube addons open dashboard). For a list of available addons use: minikube addons list ": "", "Options: {{.options}}": "", + "Outputs minikube shell completion for the given shell (bash or zsh)": "", "Permissions: {{.octalMode}} ({{.writtenMode}})": "", "Please check your BIOS, and ensure that you are running without HyperV or other nested virtualization that may interfere": "", "Please don't run minikube as root or with 'sudo' privileges. It isn't necessary with {{.driver}} driver.": "", @@ -144,30 +233,49 @@ "Please make sure the service you are looking for is deployed or is in the correct namespace.": "", "Please run with sudo. the vm-driver \"{{.driver_name}}\" requires sudo.": "", "Please specify the directory to be mounted: \n\tminikube mount \u003csource directory\u003e:\u003ctarget directory\u003e (example: \"/host-home:/vm-home\")": "", - "Please upgrade the 'docker-machine-driver-kvm2'. {{.documentation_url}}": "", + "Please upgrade the '{{.driver_executable}}'. {{.documentation_url}}": "", "Powering off \"{{.profile_name}}\" via SSH ...": "", + "Preparing Kubernetes {{.k8sVersion}} on {{.runtime}} {{.runtimeVersion}} ...": "", + "Print current and latest version number": "", + "Print the version of minikube": "", + "Print the version of minikube.": "", "Problems detected in {{.entry}}:": "", "Problems detected in {{.name}}:": "", + "Profile gets or sets the current minikube profile": "", + "Provide VM UUID to restore MAC address (only supported with Hyperkit driver).": "", "Pulling images ...": "拉取镜像 ...", "Re-run 'minikube start' with --alsologtostderr -v=8 to see the VM driver error message": "", - "Re-using the currently running {{.driver_name}} VM for \"{{.profile_name}}\" ...": "", "Reboot to complete VirtualBox installation, and verify that VirtualBox is not blocked by your system": "", "Rebuild libvirt with virt-network support": "", "Received {{.name}} signal": "", + "Registry mirrors to pass to the Docker daemon": "", "Reinstall VirtualBox and verify that it is not blocked: System Preferences -\u003e Security \u0026 Privacy -\u003e General -\u003e Some system software was blocked from loading": "", "Related issues:": "", - "Relaunching Kubernetes {{.version}} using {{.bootstrapper}} ... ": "", - "Requested disk size {{.size_in_mb}} is less than minimum of {{.size_in_mb2}}": "", + "Relaunching Kubernetes using {{.bootstrapper}} ... ": "", + "Requested disk size {{.requested_size}} is less than minimum of {{.minimum_size}}": "", "Requested memory allocation ({{.memory}}MB) is less than the default memory allocation of {{.default_memorysize}}MB. Beware that minikube might not work correctly or crash unexpectedly.": "", - "Requested memory allocation {{.size_in_mb}} is less than the minimum allowed of {{.size_in_mb2}}": "", - "Restarting existing {{.driver_name}} VM for \"{{.profile_name}}\" ...": "", + "Requested memory allocation {{.requested_size}} is less than the minimum allowed of {{.minimum_size}}": "", + "Retrieve the ssh identity key path of the specified cluster": "", + "Retrieve the ssh identity key path of the specified cluster.": "", + "Retrieves the IP address of the running cluster": "", + "Retrieves the IP address of the running cluster, and writes it to STDOUT.": "", + "Retrieves the IP address of the running cluster, checks it\n\t\t\twith IP in kubeconfig, and corrects kubeconfig if incorrect.": "", + "Returns the value of PROPERTY_NAME from the minikube config file. Can be overwritten at runtime by flags or environmental variables.": "", "Run 'minikube delete' to delete the stale VM": "", "Run 'minikube delete'. If the problem persists, check your proxy or firewall configuration": "", "Run 'sudo modprobe vboxdrv' and reinstall VirtualBox if it fails.": "", + "Run kubectl": "", "Run minikube from the C: drive.": "", + "Run the kubernetes client, download it if necessary.\nExamples:\nminikube kubectl -- --help\nkubectl get pods --namespace kube-system": "", "Running on localhost (CPUs={{.number_of_cpus}}, Memory={{.memory_size}}MB, Disk={{.disk_size}}MB) ...": "", "Set failed": "", + "Sets an individual value in a minikube config file": "", + "Sets the PROPERTY_NAME config value to PROPERTY_VALUE\n\tThese values can be overwritten by flags or environment variables at runtime.": "", + "Sets up docker env variables; similar to '$(docker-machine env)'": "", + "Sets up docker env variables; similar to '$(docker-machine env)'.": "", "Setting profile failed": "", + "Show only log entries which point to known problems": "", + "Show only the most recent journal entries, and continuously print new entries as they are appended to the journal.": "", "Skipped switching kubectl context for {{.profile_name}} , because --keep-context": "", "Sorry that minikube crashed. If this was unexpected, we would love to hear from you:": "", "Sorry, completion support is not yet implemented for {{.name}}": "", @@ -175,30 +283,60 @@ "Sorry, url provided with --registry-mirror flag is invalid {{.url}}": "", "Specify --kubernetes-version in v\u003cmajor\u003e.\u003cminor.\u003cbuild\u003e form. example: 'v1.1.14'": "", "Specify an alternate --host-only-cidr value, such as 172.16.0.1/24": "", + "Specify arbitrary flags to pass to the Docker daemon. (format: key=value)": "", + "Specify the 9p version that the mount should use": "", + "Specify the ip that the mount should be setup on": "", + "Specify the mount filesystem type (supported types: 9p)": "", + "Starting existing {{.driver_name}} VM for \"{{.profile_name}}\" ...": "", + "Starts a local kubernetes cluster": "", "Stopping \"{{.profile_name}}\" in {{.driver_name}} ...": "", + "Stops a local kubernetes cluster running in Virtualbox. This command stops the VM\nitself, leaving all files intact. The cluster can be started again with the \"start\" command.": "", + "Stops a running local kubernetes cluster": "", "Successfully mounted {{.sourcePath}} to {{.destinationPath}}": "", "Suggestion: {{.advice}}": "", "Target directory {{.path}} must be an absolute path": "", "The \"{{.cluster_name}}\" cluster has been deleted.": "", - "The 'docker-machine-driver-kvm2' version is old. Please consider upgrading. {{.documentation_url}}": "", "The 'none' driver provides limited isolation and may reduce system security and reliability.": "", + "The CIDR to be used for service cluster IPs.": "", + "The CIDR to be used for the minikube VM (only supported with Virtualbox driver)": "", + "The KVM QEMU connection URI. (works only with kvm2 driver on linux)": "", "The KVM driver is unable to resurrect this old VM. Please run `minikube delete` to delete it and try again.": "", + "The KVM network name. (only supported with KVM driver)": "", "The VM driver exited with an error, and may be corrupt. Run 'minikube start' with --alsologtostderr -v=8 to see the error": "", + "The apiserver listening port": "", + "The apiserver name which is used in the generated certificate for kubernetes. This can be used if you want to make the apiserver available from outside the machine": "", + "The argument to pass the minikube mount command on start": "", + "The cluster dns domain name used in the kubernetes cluster": "", + "The container runtime to be used (docker, crio, containerd)": "", + "The cri socket path to be used": "", "The docker host is currently not running": "", "The docker service is currently not active": "", + "The driver '{{.driver}}' is not supported on {{.os}}": "", + "The hyperv virtual switch name. Defaults to first found. (only supported with HyperV driver)": "", + "The kubernetes version that the minikube VM will use (ex: v1.2.3)": "", "The minikube VM is offline. Please run 'minikube start' to start it again.": "", + "The name of the network plugin": "", + "The number of bytes to use for 9p packet payload": "", + "The service namespace": "", + "The services namespace": "", + "The time interval for each check that wait performs in seconds": "", "The value passed to --format is invalid": "", "The value passed to --format is invalid: {{.error}}": "", "The vmwarefusion driver is deprecated and support for it will be removed in a future release.\n\t\t\tPlease consider switching to the new vmware unified driver, which is intended to replace the vmwarefusion driver.\n\t\t\tSee https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#vmware-unified-driver for more information.\n\t\t\tTo disable this message, run [minikube config set ShowDriverDeprecationNotification false]": "", + "There's a new version for '{{.driver_executable}}'. Please consider upgrading. {{.documentation_url}}": "", "These changes will take effect upon a minikube delete and then a minikube start": "", "This addon does not have an endpoint defined for the 'addons open' command.\nYou can add one by annotating a service with the label {{.labelName}}:{{.addonName}}": "", "This can also be done automatically by setting the env var CHANGE_MINIKUBE_NONE_USER=true": "", + "This will keep the existing kubectl context and will create a minikube context.": "", + "This will start the mount daemon and automatically mount files into minikube": "", "Tip: Use 'minikube start -p \u003cname\u003e' to create a new cluster, or 'minikube delete' to delete this one.": "", "To connect to this cluster, use: kubectl --context={{.name}}": "", "To connect to this cluster, use: kubectl --context={{.profile_name}}": "", "To disable this notice, run: 'minikube config set WantUpdateNotification false'": "", + "To start minikube with HyperV Powershell must be in your PATH`": "", "To switch drivers, you may create a new VM using `minikube start -p \u003cname\u003e --vm-driver={{.driver_name}}`": "", "To use kubectl or minikube commands as your own user, you may": "", + "Troubleshooting Commands:": "", "Unable to bind flags": "", "Unable to enable dashboard": "", "Unable to fetch latest version info": "", @@ -209,72 +347,84 @@ "Unable to load cached images from config file.": "", "Unable to load cached images: {{.error}}": "", "Unable to load config: {{.error}}": "", - "Unable to parse \"{{.kubenretes_version}}\": {{.error}}": "", + "Unable to parse \"{{.kubernetes_version}}\": {{.error}}": "", "Unable to pull images, which may be OK: {{.error}}": "", "Unable to start VM": "", "Unable to stop VM": "", "Uninstalling Kubernetes {{.kubernetes_version}} using {{.bootstrapper_name}} ...": "", "Unmounting {{.path}} ...": "", + "Unset variables instead of setting them": "", "Update server returned an empty list": "", "Upgrade to QEMU v3.1.0+, run 'virt-host-validate', or ensure that you are not running in a nested VM environment.": "", + "Upgrading from Kubernetes {{.old}} to {{.new}}": "", + "Usage": "", "Usage: minikube completion SHELL": "", + "Use \"{{.CommandPath}} [command] --help\" for more information about a command.": "", "User ID: {{.userID}}": "", "Userspace file server is shutdown": "", "Userspace file server: ": "", "Using image repository {{.name}}": "", + "Using the running {{.driver_name}} \"{{.profile_name}}\" VM ...": "", "Verify that your HTTP_PROXY and HTTPS_PROXY environment variables are set correctly.": "", + "Verify the IP address of the running cluster in kubeconfig.": "", "Verifying dashboard health ...": "", "Verifying proxy health ...": "", "Verifying:": "正在验证:", "Version: {{.version}}": "", "Wait failed": "", "Wait failed: {{.error}}": "", - "Waiting for SSH access ...": "", + "Wait until Kubernetes core services are healthy before exiting": "", + "Waiting for the host to be provisioned ...": "", + "Waiting for:": "", + "Where to root the NFS Shares (defaults to /nfsshares, only supported with hyperkit now)": "", "You appear to be using a proxy, but your NO_PROXY environment does not include the minikube IP ({{.ip_address}}). Please see https://github.com/kubernetes/minikube/blob/master/docs/http_proxy.md for more details": "", + "You can delete them using the following command(s): ": "", "You must specify a service name": "", "Your host does not support KVM virtualization. Ensure that qemu-kvm is installed, and run 'virt-host-validate' to debug the problem": "", "Your host is failing to route packets to the minikube VM. If you have VPN software, try turning it off or configuring it so that it does not re-route traffic to the VM IP. If not, check your VM environment routing options.": "", - "\\n": "", "addon '{{.name}}' is currently not enabled.\nTo enable this addon run:\nminikube addons enable {{.name}}": "", "addon '{{.name}}' is not a valid addon packaged with minikube.\nTo see the list of available addons run:\nminikube addons list": "", "addon list failed": "", + "addons modifies minikube addons files using subcommands like \"minikube addons enable heapster\"": "", "api load": "", "bash completion failed": "", "browser failed to open url: {{.error}}": "", + "call with cleanup=true to remove old tunnels": "", "command runner": "", + "config modifies minikube config files using subcommands like \"minikube config set vm-driver kvm\"\nConfigurable fields: \\n\\n": "", "config view failed": "", "dashboard service is not running: {{.error}}": "", "disable failed": "", "enable failed": "", - "env {{.docker_env}}": "", "error creating clientset": "", "error creating machine client": "", "error getting driver": "", "error parsing the input ip address for mount": "", "error starting tunnel": "", "failed to open browser: {{.error}}": "", - "kube-system": "", "kubectl and minikube configuration will be stored in {{.home_folder}}": "", - "kubectl has been configured configured to use {{.name}}": "", "kubectl not found in PATH, but is required for the dashboard. Installation guide: https://kubernetes.io/docs/tasks/tools/install-kubectl/": "", "kubectl proxy": "", "logdir set failed": "", "minikube is not running, so the service cannot be accessed": "", "minikube is unable to access the Google Container Registry. You may need to configure it to use a HTTP proxy.": "", "minikube profile was successfully set to {{.profile_name}}": "", - "minikube will upgrade the local cluster from Kubernetes {{.old}} to {{.new}}": "", "minikube {{.version}} is available! Download it: {{.url}}": "", "minikube {{.version}} on {{.os}} ({{.arch}})": "您正在使用minikube {{.version}}, 运行平台:{{.os}} ({{.arch}})", "mount argument \"{{.value}}\" must be in form: \u003csource directory\u003e:\u003ctarget directory\u003e": "", "mount failed": "", "need to relocate them. For example, to overwrite your own settings:": "", - "opt {{.docker_option}}": "", + "profile sets the current minikube profile, or gets the current profile if no arguments are provided. This is used to run and manage multiple minikube instance. You can return to the default minikube profile by running `minikube profile default`": "", "service {{.namespace_name}}/{{.service_name}} has no node port": "", "stat failed": "", + "tunnel creates a route to services deployed with type LoadBalancer and sets their Ingress to their ClusterIP": "", + "tunnel makes services of type LoadBalancer accessible on localhost": "", "unable to bind flags": "", "unable to set logtostderr": "", "unset failed": "", - "unsupported driver: {{.driver_name}}": "", + "unset minikube profile": "", + "unsets PROPERTY_NAME from the minikube config file. Can be overwritten by flags or environmental variables": "", + "unsets an individual value in a minikube config file": "", "unsupported driver: {{.name}}": "", "update config": "", "usage: minikube addons configure ADDON_NAME": "", @@ -288,16 +438,13 @@ "usage: minikube profile [MINIKUBE_PROFILE_NAME]": "", "zsh completion failed": "", "{{.addonName}} was successfully enabled": "", - "{{.error}}": "", "{{.extra_option_component_name}}.{{.key}}={{.value}}": "", - "{{.key}}={{.value}}": "", "{{.machine}} IP has been updated to point at {{.ip}}": "", "{{.machine}} IP was already correctly configured for {{.ip}}": "", - "{{.msg}}: {{.err}}": "", "{{.name}} cluster does not exist": "", "{{.name}} has no available configuration options": "", "{{.name}} was successfully configured": "", + "{{.prefix}}minikube {{.version}} on {{.platform}}": "", "{{.type}} is not yet a supported filesystem. We will try anyways!": "", - "{{.url}}": "", "{{.url}} is not accessible: {{.error}}": "" } \ No newline at end of file From 95dd194bf5a987f7581746cdf6b05fb6226297d5 Mon Sep 17 00:00:00 2001 From: Sharif Elgamal Date: Mon, 12 Aug 2019 14:13:45 -0700 Subject: [PATCH 065/115] Make sure minikube is up before checkout .minikube directory (#5050) --- test/integration/none_test.go | 38 +++++++++++++++++------------------ 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/test/integration/none_test.go b/test/integration/none_test.go index 542756241f..826026bed0 100644 --- a/test/integration/none_test.go +++ b/test/integration/none_test.go @@ -41,7 +41,23 @@ func TestNone(t *testing.T) { if err != nil { t.Fatalf("Failed to setup TestNone: set env: %v", err) } - t.Run("output", testNoneStartOutput) + + p := profileName(t) + mk := NewMinikubeRunner(t, p, "--wait=false") + mk.RunCommand("delete", false) + stdout, stderr, err := mk.Start() + if err != nil { + t.Fatalf("failed to start minikube (for profile %s) failed : %v\nstdout: %s\nstderr: %s", p, err, stdout, stderr) + } + msg := "Configuring local host environment" + if !strings.Contains(stdout, msg) { + t.Errorf("Expected: stdout to contain %q, got: %s", msg, stdout) + } + msg = "may reduce system security and reliability." + if !strings.Contains(stderr, msg) { + t.Errorf("Expected: stderr to contain %q, got: %s", msg, stderr) + } + t.Run("minikube permissions", testNoneMinikubeFolderPermissions) t.Run("kubeconfig permissions", testNoneKubeConfigPermissions) @@ -62,7 +78,7 @@ func testNoneMinikubeFolderPermissions(t *testing.T) { } info, err := os.Stat(filepath.Join(u.HomeDir, ".minikube")) if err != nil { - t.Errorf("Failed to get .minikube dir info, %v", err) + t.Fatalf("Failed to get .minikube dir info, %v", err) } fileUID := info.Sys().(*syscall.Stat_t).Uid @@ -96,21 +112,3 @@ func testNoneKubeConfigPermissions(t *testing.T) { } } - -func testNoneStartOutput(t *testing.T) { - p := profileName(t) - mk := NewMinikubeRunner(t, p, "--wait=false") - mk.RunCommand("delete", false) - stdout, stderr, err := mk.Start() - if err != nil { - t.Fatalf("failed to start minikube (for profile %s) failed : %v\nstdout: %s\nstderr: %s", p, err, stdout, stderr) - } - msg := "Configuring local host environment" - if !strings.Contains(stdout, msg) { - t.Errorf("Expected: stdout to contain %q, got: %s", msg, stdout) - } - msg = "may reduce system security and reliability." - if !strings.Contains(stderr, msg) { - t.Errorf("Expected: stderr to contain %q, got: %s", msg, stderr) - } -} From 755995207e401070732660cb441a80dc2ea0a51c Mon Sep 17 00:00:00 2001 From: Thomas Stromberg Date: Mon, 12 Aug 2019 12:59:11 -0700 Subject: [PATCH 066/115] Point old documents to their new Hugo location --- CONTRIBUTING.md | 22 +- docs/accessing_etcd.md | 12 +- docs/addons.md | 51 +-- docs/alternative_runtimes.md | 42 +-- docs/building_images_within_the_vm.md | 32 +- docs/cache.md | 21 +- docs/cli_commands.md | 341 +----------------- docs/configuring_kubernetes.md | 44 +-- docs/contributors/README.md | 22 +- docs/contributors/adding_an_addon.md | 57 +-- docs/contributors/adding_driver.md | 101 +----- docs/contributors/build_guide.md | 115 +----- docs/contributors/ci_builds.md | 12 +- docs/contributors/minikube_iso.md | 79 +--- docs/contributors/principles.md | 26 +- docs/contributors/releasing_minikube.md | 110 +----- docs/contributors/roadmap.md | 51 +-- docs/dashboard.md | 38 +- docs/debugging.md | 18 +- docs/drivers.md | 264 +------------- docs/env_vars.md | 60 +-- docs/gpu.md | 122 +------ docs/host_folder_mount.md | 77 +--- docs/http_proxy.md | 103 +----- docs/insecure_registry.md | 29 +- docs/networking.md | 80 +--- docs/offline.md | 41 +-- docs/openid_connect_auth.md | 34 +- docs/persistent_volumes.md | 40 +- docs/reusing_the_docker_daemon.md | 78 +--- docs/syncing-files.md | 16 +- docs/tunnel.md | 145 +------- docs/vmdriver-none.md | 120 +----- .../en/docs/Reference/Networking/proxy.md | 6 +- .../en/docs/Reference/Networking/vpn.md | 6 +- .../Reference/{cache.md => disk_cache.md} | 32 +- .../docs/Reference/environment_variables.md | 44 +++ .../docs/{Getting started => Start}/_index.md | 0 .../includes/post_install.inc | 0 .../docs/{Getting started => Start}/linux.md | 2 +- .../docs/{Getting started => Start}/macos.md | 2 +- .../{Getting started => Start}/windows.md | 2 +- .../Tasks/{building_within.md => building.md} | 4 +- site/content/en/docs/Tasks/caching.md | 42 +++ 44 files changed, 138 insertions(+), 2405 deletions(-) rename site/content/en/docs/Reference/{cache.md => disk_cache.md} (77%) create mode 100644 site/content/en/docs/Reference/environment_variables.md rename site/content/en/docs/{Getting started => Start}/_index.md (100%) rename site/content/en/docs/{Getting started => Start}/includes/post_install.inc (100%) rename site/content/en/docs/{Getting started => Start}/linux.md (96%) rename site/content/en/docs/{Getting started => Start}/macos.md (94%) rename site/content/en/docs/{Getting started => Start}/windows.md (95%) rename site/content/en/docs/Tasks/{building_within.md => building.md} (94%) create mode 100644 site/content/en/docs/Tasks/caching.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f02d796e97..098533a91c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,21 +1 @@ -# Contributing guidelines - -## Filing issues - -File issues using the standard Github issue tracker for the repo. - -## How to become a contributor and submit your own code - -### Contributor License Agreements - -We'd love to accept your patches! Before we can take them, we have to jump a couple of legal hurdles. - -[Please fill out either the individual or corporate Contributor License Agreement (CLA)](http://git.k8s.io/community/CLA.md) - -### Contributing A Patch - -1. Submit an issue describing your proposed change to the repo in question. -1. The repo owner will respond to your issue promptly. -1. If your proposed change is accepted, and you haven't already done so, sign a Contributor License Agreement (see details above). -1. Fork the desired repo, develop and test your code changes. -1. Submit a pull request. +This document has moved to https://minikube.sigs.k8s.io/docs/contributing/guide/ diff --git a/docs/accessing_etcd.md b/docs/accessing_etcd.md index 80bd17f584..b1593333d5 100644 --- a/docs/accessing_etcd.md +++ b/docs/accessing_etcd.md @@ -1,11 +1 @@ -# Accessing Host Resources From Inside A Pod - -## When you have a VirtualBox driver - -In order to access host resources from inside a pod, run the following command to determine the host IP you can use: - -```shell -ip addr -``` - -The IP address under `vboxnet1` is the IP that you need to access the host from within a pod. +This document has moved to https://minikube.sigs.k8s.io/docs/tasks/accessing-host-resources/ \ No newline at end of file diff --git a/docs/addons.md b/docs/addons.md index e8430beaea..ca879ccab8 100644 --- a/docs/addons.md +++ b/docs/addons.md @@ -1,50 +1 @@ -# Add-ons - -Minikube has a set of built in addons that can be used enabled, disabled, and opened inside of the local k8s environment. Below is an example of this functionality for the `heapster` addon: - -```shell -$ minikube addons list -- registry: disabled -- registry-creds: disabled -- freshpod: disabled -- addon-manager: enabled -- dashboard: enabled -- heapster: disabled -- efk: disabled -- ingress: disabled -- default-storageclass: enabled -- storage-provisioner: enabled -- storage-provisioner-gluster: disabled -- nvidia-driver-installer: disabled -- nvidia-gpu-device-plugin: disabled - -# minikube must be running for these commands to take effect -$ minikube addons enable heapster -heapster was successfully enabled - -$ minikube addons open heapster # This will open grafana (interacting w/ heapster) in the browser -Waiting, endpoint for service is not ready yet... -Waiting, endpoint for service is not ready yet... -Created new window in existing browser session. -``` - -The currently supported addons include: - -* [Kubernetes Dashboard](https://github.com/kubernetes/kubernetes/tree/master/cluster/addons/dashboard) -* [Heapster](https://github.com/kubernetes/heapster): [Troubleshooting Guide](https://github.com/kubernetes/heapster/blob/master/docs/influxdb.md) Note:You will need to login to Grafana as admin/admin in order to access the console -* [EFK](https://github.com/kubernetes/kubernetes/tree/master/cluster/addons/fluentd-elasticsearch) -* [Registry](https://github.com/kubernetes/minikube/tree/master/deploy/addons/registry) -* [Registry Credentials](https://github.com/upmc-enterprises/registry-creds) -* [Ingress](https://github.com/kubernetes/ingress-nginx) -* [Freshpod](https://github.com/GoogleCloudPlatform/freshpod) -* [nvidia-driver-installer](https://github.com/GoogleCloudPlatform/container-engine-accelerators/tree/master/nvidia-driver-installer/minikube) -* [nvidia-gpu-device-plugin](https://github.com/GoogleCloudPlatform/container-engine-accelerators/tree/master/cmd/nvidia_gpu) -* [logviewer](https://github.com/ivans3/minikube-log-viewer) -* [gvisor](../deploy/addons/gvisor/README.md) -* [storage-provisioner-gluster](../deploy/addons/storage-provisioner-gluster/README.md) - -If you would like to have minikube properly start/restart custom addons, place the addon(s) you wish to be launched with minikube in the `.minikube/addons` directory. Addons in this folder will be moved to the minikube VM and launched each time minikube is started/restarted. - -If you have a request for an addon in minikube, please open an issue with the name and preferably a link to the addon with a description of its purpose and why it should be added. You can also attempt to add the addon to minikube by following the guide at [Adding an Addon](contributors/adding_an_addon.md) - -**Note:** If you want to have a look at the default configuration for the addons, see [deploy/addons](https://github.com/kubernetes/minikube/tree/master/deploy/addons). +This document has moved to https://minikube.sigs.k8s.io/docs/tasks/addons/ diff --git a/docs/alternative_runtimes.md b/docs/alternative_runtimes.md index 6050d5edd0..d0d648734e 100644 --- a/docs/alternative_runtimes.md +++ b/docs/alternative_runtimes.md @@ -1,41 +1 @@ -# Alternative runtimes - -## Using CRI-O - -To use [CRI-O](https://github.com/kubernetes-sigs/cri-o) as the container runtime, run: - -```shell -$ minikube start --container-runtime=cri-o -``` - -Or you can use the extended version: - -```shell -$ minikube start --container-runtime=cri-o \ - --network-plugin=cni \ - --enable-default-cni \ - --cri-socket=/var/run/crio/crio.sock \ - --extra-config=kubelet.container-runtime=remote \ - --extra-config=kubelet.container-runtime-endpoint=unix:///var/run/crio/crio.sock \ - --extra-config=kubelet.image-service-endpoint=unix:///var/run/crio/crio.sock -``` - -## Using containerd - -To use [containerd](https://github.com/containerd/containerd) as the container runtime, run: - -```shell -$ minikube start --container-runtime=containerd -``` - -Or you can use the extended version: - -```shell -$ minikube start --container-runtime=containerd \ - --network-plugin=cni \ - --enable-default-cni \ - --cri-socket=/run/containerd/containerd.sock \ - --extra-config=kubelet.container-runtime=remote \ - --extra-config=kubelet.container-runtime-endpoint=unix:///run/containerd/containerd.sock \ - --extra-config=kubelet.image-service-endpoint=unix:///run/containerd/containerd.sock -``` +This document has moved to https://minikube.sigs.k8s.io/docs/reference/runtimes/ diff --git a/docs/building_images_within_the_vm.md b/docs/building_images_within_the_vm.md index e3602d6ac6..5b22a32031 100644 --- a/docs/building_images_within_the_vm.md +++ b/docs/building_images_within_the_vm.md @@ -1,31 +1 @@ -# Building images within the VM - -When using a single VM of Kubernetes it's really handy to build inside the VM; as this means you don't have to build on your host machine and push the image into a docker registry - you can just build inside the same machine as minikube which speeds up local experiments. - -## Docker (containerd) - -For Docker, you can either set up your host docker client to communicate by [reusing the docker daemon](reusing_the_docker_daemon.md). - -Or you can use `minikube ssh` to connect to the virtual machine, and run the `docker build` there: - -```shell -docker build -``` - -For more information on the `docker build` command, read the [Docker documentation](https://docs.docker.com/engine/reference/commandline/build/) (docker.com). - -## Podman (cri-o) - -For Podman, there is no daemon running. The processes are started by the user, monitored by `conmon`. - -So you need to use `minikube ssh`, and you will also make sure to run the command as the root user: - -```shell -sudo -E podman build -``` - -For more information on the `podman build` command, read the [Podman documentation](https://github.com/containers/libpod/blob/master/docs/podman-build.1.md) (podman.io). - -## Build context - -For the build context you can use any directory on the virtual machine, or any address on the network. +This document has moved to https://minikube.sigs.k8s.io/docs/tasks/building_within/ diff --git a/docs/cache.md b/docs/cache.md index f0efcc2950..475bb7332c 100644 --- a/docs/cache.md +++ b/docs/cache.md @@ -1,20 +1 @@ -# Caching Images - -Minikube supports caching non-minikube images using the `minikube cache` command. Images can be added to the cache by running `minikube cache add `, and deleted by running `minikube cache delete `. - -Images in the cache will be loaded on `minikube start`. If you want to list all available cached images, you can use `minikube cache list` command to list. Below is an example of this functionality: - -```shell -# cache a image into $HOME/.minikube/cache/images -$ minikube cache add ubuntu:16.04 -$ minikube cache add redis:3 - -# list cached images -$ minikube cache list -redis:3 -ubuntu:16.04 - -# delete cached images -$ minikube cache delete ubuntu:16.04 -$ minikube cache delete $(minikube cache list) -``` +This document has moved to https://minikube.sigs.k8s.io/docs/tasks/caching diff --git a/docs/cli_commands.md b/docs/cli_commands.md index 34078095dd..b547b26a5d 100644 --- a/docs/cli_commands.md +++ b/docs/cli_commands.md @@ -1,340 +1 @@ -# minikube CLI Commands -This document serves as a reference to all the commands, flags and their accepted arguments - -## Global Flags -These flags can be used globally with any command on the CLI. Following are the global flags - -``` - --alsologtostderr log to standard error as well as files - -b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm") - -h, --help help for minikube - --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) - --log_dir string If non-empty, write log files in this directory - --logtostderr log to standard error instead of files - -p, --profile string The name of the minikube VM being used. - This can be modified to allow for multiple minikube instances to be run independently (default "minikube") - --stderrthreshold severity logs at or above this threshold go to stderr (default 2) - -v, --v Level log level for V logs - --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging -``` - -## Commands -In this section, all commands which are accepted by the `minikube` CLI are described. To get help about any command, you can also type in `minikube help ` - ---- - ### addons -**Description -** Modifies minikube addons files using subcommands like `minikube addons enable heapster` -**Usage -** -``` -minikube addons SUBCOMMAND [flags] -minikube addons [command] -``` -**Available Subcommands -** -``` -configure Configures the addon w/ADDON_NAME within minikube (example: minikube addons configure registry-creds). For a list of available addons use: minikube addons list -disable Disables the addon w/ADDON_NAME within minikube (example: minikube addons disable dashboard). For a list of available addons use: minikube addons list -enable Enables the addon w/ADDON_NAME within minikube (example: minikube addons enable dashboard). For a list of available addons use: minikube addons list -list Lists all available minikube addons as well as their current statuses (enabled/disabled) -open Opens the addon w/ADDON_NAME within minikube (example: minikube addons open dashboard). For a list of available addons use: minikube addons list -``` - ---- -### cache -**Description -** Add or delete an image from the local cache. -**Usage -** `minikube cache [command]` -**Available Subcommands-** -``` -add Add an image to local cache. -delete Delete an image from the local cache. -list List all available images from the local cache. -``` - ---- -### completion -**Description -** - -> Outputs minikube shell completion for the given shell (bash or zsh) -> -> This depends on the bash-completion binary. Example installation instructions: -> OS X: -> $ brew install bash-completion -> $ source $(brew --prefix)/etc/bash_completion -> $ minikube completion bash > ~/.minikube-completion # for bash users -> $ minikube completion zsh > ~/.minikube-completion # for zsh users -> $ source ~/.minikube-completion -> Ubuntu: -> $ apt-get install bash-completion -> $ source /etc/bash-completion -> $ source <(minikube completion bash) # for bash users -> $ source <(minikube completion zsh) # for zsh users -> -> Additionally, you may want to output the completion to a file and source in your .bashrc -> -> Note for zsh users: [1] zsh completions are only supported in versions of zsh >= 5.2 -**Usage -** `minikube completion SHELL` - ---- -### config -**Description -** config modifies minikube config files using subcommands like `minikube config set vm-driver kvm` -Configurable fields: - * vm-driver - * feature-gates - * v - * cpus - * disk-size - * host-only-cidr - * memory - * log_dir - * kubernetes-version - * iso-url - * WantUpdateNotification - * ReminderWaitPeriodInHours - * WantReportError - * WantReportErrorPrompt - * WantKubectlDownloadMsg - * WantNoneDriverWarning - * profile - * bootstrapper - * ShowDriverDeprecationNotification - * ShowBootstrapperDeprecationNotification - * dashboard - * addon-manager - * default-storageclass - * heapster - * efk - * ingress - * registry - * registry-creds - * freshpod - * default-storageclass - * storage-provisioner - * storage-provisioner-gluster - * metrics-server - * nvidia-driver-installer - * nvidia-gpu-device-plugin - * logviewer - * gvisor - * hyperv-virtual-switch - * disable-driver-mounts - * cache - * embed-certs - -**Usage -** -``` -minikube config SUBCOMMAND [flags] -minikube config [command] -``` -**Available Subcommands-** -``` -get Gets the value of PROPERTY_NAME from the minikube config file -set Sets an individual value in a minikube config file -unset unsets an individual value in a minikube config file -view Display values currently set in the minikube config file -``` - ---- -### dashboard -**Description -** Access the kubernetes dashboard running within the minikube cluster -**Usage -** `minikube dashboard [flags]` -**Available Flags -** -``` --h, --help help for dashboard - --url Display dashboard URL instead of opening a browser -``` - ---- -### delete -**Description -** Deletes a local kubernetes cluster. This command deletes the VM, and removes all -associated files. -**Usage -** `minikube delete` - ---- -### docker-env -**Description -** Sets up docker env variables; similar to '$(docker-machine env)'. -**Usage -** `minikube docker-env [flags]` -**Available Flags -** -``` - -h, --help help for docker-env - --no-proxy Add machine IP to NO_PROXY environment variable - --shell string Force environment to be configured for a specified shell: [fish, cmd, powershell, tcsh, bash, zsh], default is auto-detect - -u, --unset Unset variables instead of setting them -``` - ---- -### help -**Description -** Help provides help for any command in the application. Simply type minikube help [path to command] for full details. -**Usage -** `minikube help [command] [flags]` - ---- -### ip -**Description -** Retrieves the IP address of the running cluster, and writes it to STDOUT. -**Usage -** `minikube ip` - ---- -### kubectl -**Description -** Run the kubernetes client, download it if necessary. -**Usage -** `minikube kubectl` - ---- -### logs -**Description -** Gets the logs of the running instance, used for debugging minikube, not user code. -**Usage -** `minikube logs [flags]` -**Available Flags -** -``` - -f, --follow Show only the most recent journal entries, and continuously print new entries as they are appended to the journal. - -h, --help help for logs - -n, --length int Number of lines back to go within the log (default 50) - --problems Show only log entries which point to known problems -``` - ---- -### mount -**Description -** Mounts the specified directory into minikube. -**Usage -** `minikube mount [flags] :` -**Available Flags -** -``` ---9p-version string Specify the 9p version that the mount should use (default "9p2000.L") - --gid string Default group id used for the mount (default "docker") - -h, --help help for mount - --ip string Specify the ip that the mount should be setup on - --kill Kill the mount process spawned by minikube start - --mode uint File permissions used for the mount (default 493) - --msize int The number of bytes to use for 9p packet payload (default 262144) - --options strings Additional mount options, such as cache=fscache - --type string Specify the mount filesystem type (supported types: 9p) (default "9p") - --uid string Default user id used for the mount (default "docker") -``` - ---- -### profile -**Description -** Sets the current minikube profile, or gets the current profile if no arguments are provided. This is used to run and manage multiple minikube instance. You can return to the default minikube profile by running `minikube profile default` -**Usage -** -``` -minikube profile [MINIKUBE_PROFILE_NAME]. You can return to the default minikube profile by running `minikube profile default` [flags] -``` - ---- -### service -**Description -** Gets the kubernetes URL(s) for the specified service in your local cluster. In the case of multiple URLs they will be printed one at a time. -**Usage -** -``` -minikube service [flags] SERVICE -minikube service [command] -``` -**Available Commands -** -``` - list Lists the URLs for the services in your local cluster -``` -**Available Flags -** -``` - --format string Format to output service URL in. This format will be applied to each url individually and they will be printed one at a time. (default "http://{{.IP}}:{{.Port}}") - -h, --help help for service - --https Open the service URL with https instead of http - --interval int The time interval for each check that wait performs in seconds (default 20) - -n, --namespace string The service namespace (default "default") - --url Display the kubernetes service URL in the CLI instead of opening it in the default browser - --wait int Amount of time to wait for a service in seconds (default 20) -``` - ---- -### ssh -**Description -** Log into or run a command on a machine with SSH; similar to 'docker-machine ssh'. -**Usage -** `minikube ssh` - ---- -### ssh-key -**Description -** Retrieve the ssh identity key path of the specified cluster. -**Usage -** `minikube ssh-key` - ---- -### start -**Description -** Starts a local kubernetes cluster. -**Usage -** `minikube start [flags]` -**Available Flags -** -``` - --apiserver-ips ipSlice A set of apiserver IP Addresses which are used in the generated certificate for kubernetes. This can be used if you want to make the apiserver available from outside the machine (default []) - --apiserver-name string The apiserver name which is used in the generated certificate for kubernetes. This can be used if you want to make the apiserver available from outside the machine (default "minikubeCA") - --apiserver-names stringArray A set of apiserver names which are used in the generated certificate for kubernetes. This can be used if you want to make the apiserver available from outside the machine - --apiserver-port int The apiserver listening port (default 8443) - --cache-images If true, cache docker images for the current bootstrapper and load them into the machine. Always false with --vm-driver=none. (default true) - --container-runtime string The container runtime to be used (docker, crio, containerd) (default "docker") - --cpus int Number of CPUs allocated to the minikube VM (default 2) - --cri-socket string The cri socket path to be used - --disable-driver-mounts Disables the filesystem mounts provided by the hypervisors (vboxfs) - --disk-size string Disk size allocated to the minikube VM (format: [], where unit = b, k, m or g) (default "20000mb") - --dns-domain string The cluster dns domain name used in the kubernetes cluster (default "cluster.local") - --docker-env stringArray Environment variables to pass to the Docker daemon. (format: key=value) - --docker-opt stringArray Specify arbitrary flags to pass to the Docker daemon. (format: key=value) - --download-only If true, only download and cache files for later use - don't install or start anything. - --enable-default-cni Enable the default CNI plugin (/etc/cni/net.d/k8s.conf). Used in conjunction with "--network-plugin=cni" - --extra-config ExtraOption A set of key=value pairs that describe configuration that may be passed to different components. - The key should be '.' separated, and the first part before the dot is the component to apply the configuration to. - Valid components are: kubelet, kubeadm, apiserver, controller-manager, etcd, proxy, scheduler - Valid kubeadm parameters: ignore-preflight-errors, dry-run, kubeconfig, kubeconfig-dir, node-name, cri-socket, experimental-upload-certs, certificate-key, rootfs, pod-network-cidr - --feature-gates string A set of key=value pairs that describe feature gates for alpha/experimental features. - --gpu Enable experimental NVIDIA GPU support in minikube (works only with kvm2 driver on Linux) - -h, --help help for start - --hidden Hide the hypervisor signature from the guest in minikube (works only with kvm2 driver on Linux) - --host-only-cidr string The CIDR to be used for the minikube VM (only supported with Virtualbox driver) (default "192.168.99.1/24") - --hyperkit-vpnkit-sock string Location of the VPNKit socket used for networking. If empty, disables Hyperkit VPNKitSock, if 'auto' uses Docker for Mac VPNKit connection, otherwise uses the specified VSock. - --hyperkit-vsock-ports strings List of guest VSock ports that should be exposed as sockets on the host (Only supported on with hyperkit now). - --hyperv-virtual-switch string The hyperv virtual switch name. Defaults to first found. (only supported with HyperV driver) - --image-mirror-country string Country code of the image mirror to be used. Leave empty to use the global one. For Chinese mainland users, set it to cn - --image-repository string Alternative image repository to pull docker images from. This can be used when you have limited access to gcr.io. Set it to "auto" to let minikube decide one for you. For Chinese mainland users, you may use local gcr.io mirrors such as registry.cn-hangzhou.aliyuncs.com/google_containers - --insecure-registry strings Insecure Docker registries to pass to the Docker daemon. The default service CIDR range will automatically be added. - --iso-url string Location of the minikube iso (default "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso") - --keep-context This will keep the existing kubectl context and will create a minikube context. - --kubernetes-version string The kubernetes version that the minikube VM will use (ex: v1.2.3) (default "v1.15.0") - --kvm-network string The KVM network name. (only supported with KVM driver) (default "default") - --memory string Amount of RAM allocated to the minikube VM (format: [], where unit = b, k, m or g) (default "2000mb") - --mount This will start the mount daemon and automatically mount files into minikube - --mount-string string The argument to pass the minikube mount command on start (default "C:\\Users\\Pranav.Jituri:/minikube-host") - --network-plugin string The name of the network plugin - --nfs-share strings Local folders to share with Guest via NFS mounts (Only supported on with hyperkit now) - --nfs-shares-root string Where to root the NFS Shares (defaults to /nfsshares, only supported with hyperkit now) (default "/nfsshares") - --no-vtx-check Disable checking for the availability of hardware virtualization before the vm is started (virtualbox) - --registry-mirror strings Registry mirrors to pass to the Docker daemon - --service-cluster-ip-range string The CIDR to be used for service cluster IPs. (default "10.96.0.0/12") - --uuid string Provide VM UUID to restore MAC address (only supported with Hyperkit driver). - --vm-driver string VM driver is one of: [virtualbox parallels vmwarefusion kvm hyperv hyperkit kvm2 vmware none] (default "virtualbox") -``` - ---- -### status -**Description -** Gets the status of a local kubernetes cluster. Exit status contains the status of minikube's VM, cluster and kubernetes encoded on it's bits in this order from right to left. - Eg: 7 meaning: 1 (for minikube NOK) + 2 (for cluster NOK) + 4 (for kubernetes NOK) -**Usage -** `minikube status [flags]` -**Available Flags -** -``` - --format string Go template format string for the status output. The format for Go templates can be found here: https://golang.org/pkg/text/template/ - For the list accessible variables for the template, see the struct values here: https://godoc.org/k8s.io/minikube/cmd/minikube/cmd#Status (default "host: {{.Host}}\nkubelet: {{.Kubelet}}\napiserver: {{.APIServer}}\nkubectl: {{.Kubeconfig}}\n") -``` - ---- -### stop -**Description -** Stops a local kubernetes cluster running in Virtualbox. This command stops the VM -itself, leaving all files intact. The cluster can be started again with the `start` command. -**Usage -** `minikube stop` - ---- -### tunnel -**Description -** Creates a route to services deployed with type LoadBalancer and sets their Ingress to their ClusterIP -**Usage -** `minikube tunnel [flags]` -**Available Flags -** -``` - -c, --cleanup call with cleanup=true to remove old tunnels -``` - ---- -### update-check -**Description -** Print current and latest version number. -**Usage -** `minikube update-check` - ---- -### update-context -**Description -** Retrieves the IP address of the running cluster, checks it with IP in kubeconfig, and corrects kubeconfig if incorrect. -**Usage -** `minikube update-context` - ---- -### version -**Description -** Print the version of minikube. -**Usage -** `minikube version` +This document has moved to https://minikube.sigs.k8s.io/docs/reference/commands/ diff --git a/docs/configuring_kubernetes.md b/docs/configuring_kubernetes.md index fcf59f527c..cb7db70ae8 100644 --- a/docs/configuring_kubernetes.md +++ b/docs/configuring_kubernetes.md @@ -1,43 +1 @@ -# Configuring Kubernetes - -Minikube has a "configurator" feature that allows users to configure the Kubernetes components with arbitrary values. -To use this feature, you can use the `--extra-config` flag on the `minikube start` command. - -This flag is repeated, so you can pass it several times with several different values to set multiple options. - -## Selecting a Kubernetes version - -minikube defaults to the latest stable version of Kubernetes. You may select a different Kubernetes release by using the `--kubernetes-version` flag, for example: - - `minikube start --kubernetes-version=v1.10.13` - -minikube follows the [Kubernetes Version and Version Skew Support Policy](https://kubernetes.io/docs/setup/version-skew-policy/), so we guarantee support for the latest build for the last 3 minor Kubernetes releases. When practical, minikube extends this policy three additional minor releases so that users can emulate legacy environments. - -As of August 2019, this means that minikube supports and actively tests against the latest builds of: - -* v1.15.x (default) -* v1.14.x -* v1.13.x -* v1.12.x -* v1.11.x (best effort) -* v1.10.x (best effort) - -For more up to date information, see `OldestKubernetesVersion` and `NewestKubernetesVersion` in [constants.go](https://github.com/kubernetes/minikube/blob/master/pkg/minikube/constants/constants.go) - -## kubeadm - -The kubeadm bootstrapper can be configured by the `--extra-config` flag on the `minikube start` command. It takes a string of the form `component.key=value` where `component` is one of the strings - -* kubeadm -* kubelet -* apiserver -* controller-manager -* scheduler - -and `key=value` is a flag=value pair for the component being configured. For example, - -```shell -minikube start --extra-config=apiserver.v=10 --extra-config=kubelet.max-pods=100 - -minikube start --extra-config=kubeadm.ignore-preflight-errors=SystemVerification # allows any version of docker -``` +This document has moved to https://minikube.sigs.k8s.io/docs/reference/configuration/kubernetes/ diff --git a/docs/contributors/README.md b/docs/contributors/README.md index a5c83b1fdb..a8952b3c5f 100644 --- a/docs/contributors/README.md +++ b/docs/contributors/README.md @@ -1,21 +1 @@ -# Contributing - -* **New contributors** ([contributors.md](https://github.com/kubernetes/minikube/blob/master/CONTRIBUTING.md)): Process for new contributors, CLA instructions - -* **Roadmap** ([roadmap.md](roadmap.md)): The roadmap for future minikube development - -## New Features and Dependencies - -* **Adding a new addon** ([adding_an_addon.md](adding_an_addon.md)): How to add a new addon to minikube for `minikube addons` - -* **Adding a new driver** ([adding_driver.md](adding_driver.md)): How to add a new driver to minikube for `minikube create --vm-driver=` - -## Building and Releasing - -* **Build Guide** ([build_guide.md](build_guide.md)): How to build minikube from source - -* **ISO Build Guide** ([minikube_iso.md](minikube_iso.md)): How to build and hack on the ISO image that minikube uses - -* **CI Builds** ([ci_builds.md](./ci_builds.md)): Accessing CI build artifacts from Jenkins - -* **Releasing minikube** ([releasing_minikube.md](releasing_minikube.md)): Steps to release a new version of minikube +This document has moved to https://minikube.sigs.k8s.io/docs/contributing/ diff --git a/docs/contributors/adding_an_addon.md b/docs/contributors/adding_an_addon.md index 3b2b612eb7..9fae54108c 100644 --- a/docs/contributors/adding_an_addon.md +++ b/docs/contributors/adding_an_addon.md @@ -1,56 +1 @@ -# Adding a New Addon - -To add a new addon to minikube the following steps are required: - -* For the new addon's .yaml file(s): - * Put the required .yaml files for the addon in the `minikube/deploy/addons` directory. - * Add the `kubernetes.io/minikube-addons: ` label to each piece of the addon (ReplicationController, Service, etc.) - * Also, `addonmanager.kubernetes.io/mode` annotation is needed so that your resources are picked up by the `addon-manager` minikube addon. - * In order to have `minikube addons open ` work properly, the `kubernetes.io/minikube-addons-endpoint: ` label must be added to the appropriate endpoint service (what the user would want to open/interact with). This service must be of type NodePort. - -* To add the addon into minikube commands/VM: - * Add the addon with appropriate fields filled into the `Addon` dictionary, see this [commit](https://github.com/kubernetes/minikube/commit/41998bdad0a5543d6b15b86b0862233e3204fab6#diff-e2da306d559e3f019987acc38431a3e8R133) and example. - - ```go - // cmd/minikube/cmd/config/config.go - var settings = []Setting{ - ..., - // add other addon setting - { - name: "efk", - set: SetBool, - validations: []setFn{IsValidAddon}, - callbacks: []setFn{EnableOrDisableAddon}, - }, - } - ``` - - * Add the addon to settings list, see this [commit](https://github.com/kubernetes/minikube/commit/41998bdad0a5543d6b15b86b0862233e3204fab6#diff-07ad0c54f98b231e68537d908a214659R89) and example. - - ```go - // pkg/minikube/assets/addons.go - var Addons = map[string]*Addon{ - ..., - // add other addon asset - "efk": NewAddon([]*BinAsset{ - MustBinAsset( - "deploy/addons/efk/efk-configmap.yaml", - constants.AddonsPath, - "efk-configmap.yaml", - "0640"), - MustBinAsset( - "deploy/addons/efk/efk-rc.yaml", - constants.AddonsPath, - "efk-rc.yaml", - "0640"), - MustBinAsset( - "deploy/addons/efk/efk-svc.yaml", - constants.AddonsPath, - "efk-svc.yaml", - "0640"), - }, false, "efk"), - } - ``` - -* Rebuild minikube using make out/minikube. This will put the addon's .yaml binary files into the minikube binary using go-bindata. -* Test addon using `minikube addons enable ` command to start service. +This document has moved to https://minikube.sigs.k8s.io/docs/contributing/addons/ \ No newline at end of file diff --git a/docs/contributors/adding_driver.md b/docs/contributors/adding_driver.md index 3d9b0d5f66..fb3ad4579d 100644 --- a/docs/contributors/adding_driver.md +++ b/docs/contributors/adding_driver.md @@ -1,100 +1 @@ -# Adding new driver (Deprecated) - -New drivers should be added into - -Minikube relies on docker machine drivers to manage machines. This document talks about how to -add an existing docker machine driver into minikube registry, so that minikube can use the driver -by `minikube create --vm-driver=`. This document is not going to talk about how to -create a new docker machine driver. - -## Understand your driver - -First of all, before started, you need to understand your driver in terms of: - -- Which operating system is your driver running on? -- Is your driver builtin the minikube binary or triggered through RPC? -- How to translate minikube config to driver config? -- If builtin, how to instantiate the driver instance? - -Builtin basically means whether or not you need separate driver binary in your `$PATH` for minikube to -work. For instance, `hyperkit` is not builtin, because you need `docker-machine-driver-hyperkit` in your -`$PATH`. `vmwarefusion` is builtin, because you don't need anything. - -## Understand registry - -Registry is what minikube uses to register all the supported drivers. The driver author registers -their drivers in registry, and minikube runtime will look at the registry to find a driver and use the -driver metadata to determine what workflow to apply while those drivers are being used. - -The godoc of registry is available here: - -[DriverDef](https://godoc.org/k8s.io/minikube/pkg/minikube/registry#DriverDef) is the main -struct to define a driver metadata. Essentially, you need to define 4 things at most, which is -pretty simple once you understand your driver well: - -- Name: unique name of the driver, it will be used as the unique ID in registry and as -`--vm-driver` option in minikube command - -- Builtin: `true` if the driver is builtin minikube binary. `false` otherwise. - -- ConfigCreator: how to translate a minikube config to driver config. The driver config will be persistent -on your `$USER/.minikube` directory. Most likely the driver config is the driver itself. - -- DriverCreator: Only needed when driver is builtin, to instantiate the driver instance. - -## An example - -All drivers are located in `k8s.io/minikube/pkg/minikube/drivers`. Take `vmwarefusion` as an example: - -```golang -// +build darwin - -package vmwarefusion - -import ( - "github.com/docker/machine/drivers/vmwarefusion" - "github.com/docker/machine/libmachine/drivers" - cfg "k8s.io/minikube/pkg/minikube/config" - "k8s.io/minikube/pkg/minikube/constants" - "k8s.io/minikube/pkg/minikube/registry" -) - -func init() { - registry.Register(registry.DriverDef{ - Name: "vmwarefusion", - Builtin: true, - ConfigCreator: createVMwareFusionHost, - DriverCreator: func() drivers.Driver { - return vmwarefusion.NewDriver("", "") - }, - }) -} - -func createVMwareFusionHost(config cfg.MachineConfig) interface{} { - d := vmwarefusion.NewDriver(cfg.GetMachineName(), constants.GetMinipath()).(*vmwarefusion.Driver) - d.Boot2DockerURL = config.Downloader.GetISOFileURI(config.MinikubeISO) - d.Memory = config.Memory - d.CPU = config.CPUs - d.DiskSize = config.DiskSize - d.SSHPort = 22 - d.ISO = d.ResolveStorePath("boot2docker.iso") - return d -} -``` - -- In init function, register a `DriverDef` in registry. Specify the metadata in the `DriverDef`. As mentioned -earlier, it's builtin, so you also need to specify `DriverCreator` to tell minikube how to create a `drivers.Driver`. -- Another important thing is `vmwarefusion` only runs on MacOS. You need to add a build tag on top so it only -runs on MacOS, so that the releases on Windows and Linux won't have this driver in registry. -- Last but not least, import the driver in `pkg/minikube/cluster/default_drivers.go` to include it in build. - -## Summary - -In summary, the process includes the following steps: - -1. Add the driver under `k8s.io/minikube/pkg/minikube/drivers` - - Add build tag for supported operating system - - Define driver metadata in `DriverDef` -2. Add import in `pkg/minikube/cluster/default_drivers.go` - -Any Questions: please ping your friend [@anfernee](https://github.com/anfernee) +This document has moved to https://minikube.sigs.k8s.io/docs/contributing/drivers/ diff --git a/docs/contributors/build_guide.md b/docs/contributors/build_guide.md index dbcd572e4e..dddbe5d7b3 100644 --- a/docs/contributors/build_guide.md +++ b/docs/contributors/build_guide.md @@ -1,114 +1 @@ -# Build Guide - -## Build Requirements - -* A recent Go distribution (>=1.12) -* If you're not on Linux, you'll need a Docker installation -* minikube requires at least 4GB of RAM to compile, which can be problematic when using docker-machine - -### Prerequisites for different GNU/Linux distributions - -#### Fedora - -On Fedora you need to install _glibc-static_ -```shell -$ sudo dnf install -y glibc-static -``` - -### Building from Source - -Clone and build minikube: -```shell -$ git clone https://github.com/kubernetes/minikube.git -$ cd minikube -$ make -``` - -Note: Make sure that you uninstall any previous versions of minikube before building -from the source. - -### Building from Source in Docker (using Debian stretch image with golang) - -Clone minikube: -```shell -$ git clone https://github.com/kubernetes/minikube.git -``` - -Build (cross compile for linux / OS X and Windows) using make: -```shell -$ cd minikube -$ MINIKUBE_BUILD_IN_DOCKER=y make cross -``` - -Check "out" directory: -```shell -$ ls out/ -minikube-darwin-amd64 minikube-linux-amd64 minikube-windows-amd64.exe -``` - -You can also build platform specific executables like below: - 1. `make windows` will build the binary for Windows platform - 2. `make linux` will build the binary for Linux platform - 3. `make darwin` will build the binary for Darwin/Mac platform - -### Run Instructions - -Start the cluster using your built minikube with: - -```shell -$ ./out/minikube start -``` - -## Running Tests - -### Unit Tests - -Unit tests are run on Travis before code is merged. To run as part of a development cycle: - -```shell -make test -``` - -### Integration Tests - -Integration tests are currently run manually. -To run them, build the binary and run the tests: - -```shell -make integration -``` - -You may find it useful to set various options to test only a particular test against a non-default driver. For instance: - -```shell - env TEST_ARGS="-minikube-start-args=--vm-driver=hyperkit -test.run TestStartStop" make integration - ``` - -### Conformance Tests - -These are Kubernetes tests that run against an arbitrary cluster and exercise a wide range of Kubernetes features. -You can run these against minikube by following these steps: - -* Clone the Kubernetes repo somewhere on your system. -* Run `make quick-release` in the k8s repo. -* Start up a minikube cluster with: `minikube start`. -* Set following two environment variables: - -```shell -export KUBECONFIG=$HOME/.kube/config -export KUBERNETES_CONFORMANCE_TEST=y -``` - -* Run the tests (from the k8s repo): - -```shell -go run hack/e2e.go -v --test --test_args="--ginkgo.focus=\[Conformance\]" --check-version-skew=false -``` - -To run a specific conformance test, you can use the `ginkgo.focus` flag to filter the set using a regular expression. -The `hack/e2e.go` wrapper and the `e2e.sh` wrappers have a little trouble with quoting spaces though, so use the `\s` regular expression character instead. -For example, to run the test `should update annotations on modification [Conformance]`, use following command: - -```shell -go run hack/e2e.go -v --test --test_args="--ginkgo.focus=should\supdate\sannotations\son\smodification" --check-version-skew=false -``` +This document has moved to https://minikube.sigs.k8s.io/docs/contributing/building/ \ No newline at end of file diff --git a/docs/contributors/ci_builds.md b/docs/contributors/ci_builds.md index 07304aea75..33f7b21f42 100644 --- a/docs/contributors/ci_builds.md +++ b/docs/contributors/ci_builds.md @@ -1,11 +1 @@ -# CI Builds - -We publish CI builds of minikube, built at every Pull Request. Builds are available at (substitute in the relevant PR number): - -- -- -- - -We also publish CI builds of minikube-iso, built at every Pull Request that touches deploy/iso/minikube-iso. Builds are available at: - -- +This document has moved to https://minikube.sigs.k8s.io/docs/contributing/building/ diff --git a/docs/contributors/minikube_iso.md b/docs/contributors/minikube_iso.md index d8fc153e76..b9bc175ffa 100644 --- a/docs/contributors/minikube_iso.md +++ b/docs/contributors/minikube_iso.md @@ -1,78 +1 @@ -# minikube ISO image - -This includes the configuration for an alternative bootable ISO image meant to be used in conjunction with minikube. - -It includes: - -- systemd as the init system -- docker -- CRI-O - -## Hacking - -### Requirements - -* Linux - -```shell -sudo apt-get install build-essential gnupg2 p7zip-full git wget cpio python \ - unzip bc gcc-multilib automake libtool locales -``` - -Either import your private key or generate a sign-only key using `gpg2 --gen-key`. -Also be sure to have an UTF-8 locale set up in order to build the ISO. - -### Build instructions - -```shell -$ git clone https://github.com/kubernetes/minikube.git -$ cd minikube -$ make buildroot-image -$ make out/minikube.iso -``` - -The build will occur inside a docker container. If you want to do this on -baremetal, replace `make out/minikube.iso` with `IN_DOCKER=1 make out/minikube.iso`. -The bootable ISO image will be available in `out/minikube.iso`. - -### Testing local minikube-iso changes - -```shell -$ ./out/minikube start --iso-url=file://$(pwd)/out/minikube.iso -``` - -### Buildroot configuration - -To change the buildroot configuration, execute: - -```shell -$ cd out/buildroot -$ make menuconfig -$ make -``` - -To save any buildroot configuration changes made with `make menuconfig`, execute: - -```shell -$ cd out/buildroot -$ make savedefconfig -``` - -The changes will be reflected in the `minikube-iso/configs/minikube_defconfig` file. - -```shell -$ git status -## master - M deploy/iso/minikube-iso/configs/minikube_defconfig -``` - -### Saving buildroot/kernel configuration changes - -To make any kernel configuration changes and save them, execute: - -```shell -$ make linux-menuconfig -``` - -This will open the kernel configuration menu, and then save your changes to our -iso directory after they've been selected. +This document has moved to https://minikube.sigs.k8s.io/docs/contributing/iso/ diff --git a/docs/contributors/principles.md b/docs/contributors/principles.md index a2fa60022a..2caffd4f37 100644 --- a/docs/contributors/principles.md +++ b/docs/contributors/principles.md @@ -1,25 +1 @@ -# Principles of Minikube - -The primary goal of minikube is to make it simple to run Kubernetes locally, for day-to-day development workflows and learning purposes. Here are the guiding principles for minikube, in rough priority order: - -1. User-friendly and accessible -2. Inclusive and community-driven -3. Cross-platform -4. Support all Kubernetes features -5. High-fidelity -6. Compatible with all supported Kubernetes releases -7. Support for all Kubernetes-friendly container runtimes -8. Stable and easy to debug - -Here are some specific minikube features that align with our goal: - -* Single command setup and teardown UX -* Support for local storage, networking, auto-scaling, load balancing, etc. -* Unified UX across operating systems -* Minimal dependencies on third party software -* Minimal resource overhead - -## Non-Goals - -* Simplifying Kubernetes production deployment experience -* Supporting all possible deployment configurations of Kubernetes, such as storage, networking, etc. +This document has moved to https://minikube.sigs.k8s.io/docs/concepts/principles/ diff --git a/docs/contributors/releasing_minikube.md b/docs/contributors/releasing_minikube.md index d781280797..4da4199c09 100644 --- a/docs/contributors/releasing_minikube.md +++ b/docs/contributors/releasing_minikube.md @@ -1,109 +1 @@ -# Steps to Release Minikube - -## Preparation - -* Announce release intent on #minikube -* Pause merge requests so that they are not accidentally left out of the ISO or release notes - -## Build a new ISO - -Major releases always get a new ISO. Minor bugfixes may or may not require it: check for changes in the `deploy/iso` folder. -To check, run `git log -- deploy/iso` from the root directory and see if there has been a commit since the most recent release. - -Note: you can build the ISO using the `hack/jenkins/build_iso.sh` script locally. - -* navigate to the minikube ISO jenkins job -* Ensure that you are logged in (top right) -* Click "▶️ Build with Parameters" (left) -* For `ISO_VERSION`, type in the intended release version (same as the minikube binary's version) -* For `ISO_BUCKET`, type in `minikube/iso` -* Click *Build* - -The build will take roughly 50 minutes. - -## Update Makefile - -Edit the minikube `Makefile`, updating the version number values at the top: - -* `VERSION_MAJOR`, `VERSION_MINOR`, `VERSION_BUILD` as necessary -* `ISO_VERSION` - defaults to MAJOR.MINOR.0 - update if point release requires a new ISO to be built. - -Make sure the integration tests run against this PR, once the new ISO is built. - -## Ad-Hoc testing of other platforms - -If there are supported platforms which do not have functioning Jenkins workers (Windows), you may use the following to build a sanity check: - -```shell -env BUILD_IN_DOCKER=y make cross checksum -``` - -## Send out Makefile PR - -Once submitted, HEAD will use the new ISO. Please pay attention to test failures, as this is our integration test across platforms. If there are known acceptable failures, please add a PR comment linking to the appropriate issue. - -## Update Release Notes - -Run the following script to update the release notes: - -```shell -hack/release_notes.sh -``` - -Merge the output into CHANGELOG.md. See [PR#3175](https://github.com/kubernetes/minikube/pull/3175) as an example. Then get the PR submitted. - -## Tag the Release - -```shell -sh hack/tag_release.sh 1.. -``` - -## Build the Release - -This step uses the git tag to publish new binaries to GCS and create a github release: - -* navigate to the minikube "Release" jenkins job -* Ensure that you are logged in (top right) -* Click "▶️ Build with Parameters" (left) -* `VERSION_MAJOR`, `VERSION_MINOR`, and `VERSION_BUILD` should reflect the values in your Makefile -* For `ISO_SHA256`, run: `gsutil cat gs://minikube/iso/minikube-v.iso.sha256` -* Click *Build* - -## Check the release logs - -After job completion, click "Console Output" to verify that the release completed without errors. This is typically where one will see brew automation fail, for instance. - -## Check releases.json - -This file is used for auto-update notifications, but is not active until releases.json is copied to GCS. - -minikube-bot will send out a PR to update the release checksums at the top of `deploy/minikube/releases.json`. You should merge this PR. - -## Package managers which include minikube - -These are downstream packages that are being maintained by others and how to upgrade them to make sure they have the latest versions - -| Package Manager | URL | TODO | -| --- | --- | --- | -| Arch Linux AUR | | "Flag as package out-of-date" -| Brew Cask | | The release job creates a new PR in [Homebrew/homebrew-cask](https://github.com/Homebrew/homebrew-cask) with an updated version and SHA256, double check that it's created. - -WARNING: The Brew cask automation is error-prone. please ensure that a PR was created. - -## Verification - -Verify release checksums by running`make check-release` - -## Update minikube frontpage - -We document the last 3 releases on our frontpage. Please add it to the list: - -## Update official Kubernetes docs - -If there are major changes, please send a PR to update - -## Announce! - -- #minikube on Slack -- minikube-dev, minikube-users mailing list -- Twitter (optional!) +This document has moved to https://minikube.sigs.k8s.io/docs/contributing/releasing/ diff --git a/docs/contributors/roadmap.md b/docs/contributors/roadmap.md index 81485cc9dd..45e47a31e2 100644 --- a/docs/contributors/roadmap.md +++ b/docs/contributors/roadmap.md @@ -1,50 +1 @@ -# minikube roadmap (2019) - -This roadmap is a living document outlining the major technical improvements which we would like to see in minikube during 2019, divided by how they apply to our [guiding principles](principles.md) - -Please send a PR to suggest any improvements to it. - -## (#1) User-friendly and accessible - -- [ ] Creation of a user-centric minikube website for installation & documentation [#4388](https://github.com/kubernetes/minikube/issues/4388) -- [ ] Localized output to 5+ written languages [#4186](https://github.com/kubernetes/minikube/issues/4186) [#4185](https://github.com/kubernetes/minikube/issues/4185) -- [x] Make minikube usable in environments with challenging connectivity requirements -- [ ] Support lightweight deployment methods for environments where VM's are impractical [#4389](https://github.com/kubernetes/minikube/issues/4389) [#4390](https://github.com/kubernetes/minikube/issues/4390) -- [x] Add offline support - -## (#2) Inclusive and community-driven - -- [x] Increase community involvement in planning and decision making -- [ ] Make the continuous integration and release infrastructure publicly available [#3256](https://github.com/kubernetes/minikube/issues/4390) -- [x] Double the number of active maintainers - -## (#3) Cross-platform - -- [ ] Users should never need to separately install supporting binaries [#3975](https://github.com/kubernetes/minikube/issues/3975) [#4391](https://github.com/kubernetes/minikube/issues/4391) -- [ ] Simplified installation process across all supported platforms - -## (#4) Support all Kubernetes features - -- [ ] Add multi-node support [#94](https://github.com/kubernetes/minikube/issues/94) - -## (#5) High-fidelity - -- [ ] Reduce guest VM overhead by 50% [#3207](https://github.com/kubernetes/minikube/issues/3207) -- [x] Disable swap in the guest VM - -## (#6) Compatible with all supported Kubernetes releases - -- [x] Continuous Integration testing across all supported Kubernetes releases -- [ ] Automatic PR generation for updating the default Kubernetes release minikube uses [#4392](https://github.com/kubernetes/minikube/issues/4392) - -## (#7) Support for all Kubernetes-friendly container runtimes - -- [x] Run all integration tests across all supported container runtimes -- [ ] Support for Kata Containers [#4347](https://github.com/kubernetes/minikube/issues/4347) - -## (#8) Stable and easy to debug - -- [x] Pre-flight error checks for common connectivity and configuration errors -- [ ] Improve the `minikube status` command so that it can diagnose common issues -- [ ] Mark all features not covered by continuous integration as `experimental` -- [x] Stabilize and improve profiles support (AKA multi-cluster) +This document has moved to https://minikube.sigs.k8s.io/docs/contributing/roadmap/ diff --git a/docs/dashboard.md b/docs/dashboard.md index 418647beda..cb7ff8f2d8 100644 --- a/docs/dashboard.md +++ b/docs/dashboard.md @@ -1,37 +1 @@ -# Dashboard - -Minikube supports the [Kubernetes Dashboard](https://github.com/kubernetes/dashboard) out of the box. - -## Accessing the UI - -To access the dashboard: - -```shell -minikube dashboard -``` - -This will enable the dashboard add-on, and open the proxy in the default web browser. - -To stop the proxy (leaves the dashboard running), abort the started process (`Ctrl+C`). - -## Individual steps - -If the automatic command doesn't work for you for some reason, here are the steps: - -```console -$ minikube addons enable dashboard -✅ dashboard was successfully enabled -``` - -If you have your kubernetes client configured for minikube, you can start the proxy: - -```console -$ kubectl --context minikube proxy -Starting to serve on 127.0.0.1:8001 -``` - -Access the dashboard at: - - - -For additional information, see [this page](https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/). +This document has moved to https://minikube.sigs.k8s.io/docs/tasks/dashboard/ diff --git a/docs/debugging.md b/docs/debugging.md index cb02133ffa..b087d9c57f 100644 --- a/docs/debugging.md +++ b/docs/debugging.md @@ -1,17 +1 @@ -# Debugging Issues With Minikube - -To debug issues with minikube (not *Kubernetes* but **minikube** itself), you can use the `-v` flag to see debug level info. The specified values for `-v` will do the following (the values are all encompassing in that higher values will give you all lower value outputs as well): - -* `--v=0` will output **INFO** level logs -* `--v=1` will output **WARNING** level logs -* `--v=2` will output **ERROR** level logs -* `--v=3` will output *libmachine* logging -* `--v=7` will output *libmachine --debug* level logging - -Example: -`minikube start --v=1` Will start minikube and output all warnings to stdout. - -If you need to access additional tools for debugging, minikube also includes the [CoreOS toolbox](https://github.com/coreos/toolbox) - -You can ssh into the toolbox and access these additional commands using: -`minikube ssh toolbox` +This document has moved to https://minikube.sigs.k8s.io/docs/tasks/debug/ diff --git a/docs/drivers.md b/docs/drivers.md index f3f4814fa2..7b69ddd912 100644 --- a/docs/drivers.md +++ b/docs/drivers.md @@ -1,263 +1 @@ -# VM Driver plugin installation - -Minikube uses Docker Machine to manage the Kubernetes VM so it benefits from the -driver plugin architecture that Docker Machine uses to provide a consistent way to -manage various VM providers. Minikube embeds VirtualBox and VMware Fusion drivers -so there are no additional steps to use them. However, other drivers require an -extra binary to be present in the host PATH. - -The following drivers currently require driver plugin binaries to be present in -the host PATH: - -* [KVM2](#kvm2-driver) -* [Hyperkit](#hyperkit-driver) -* [Hyper-V](#hyper-v-driver) -* [VMware](#vmware-unified-driver) -* [Parallels](#parallels-driver) - -## KVM2 driver - -### KVM2 install - -To install the KVM2 driver, first install and configure the prerequisites, namely libvirt 1.3.1 or higher, and qemu-kvm: - -* Debian or Ubuntu 18.x: `sudo apt install libvirt-clients libvirt-daemon-system qemu-kvm` -* Ubuntu 16.x or older: `sudo apt install libvirt-bin libvirt-daemon-system qemu-kvm` -* Fedora/CentOS/RHEL: `sudo yum install libvirt libvirt-daemon-kvm qemu-kvm` -* openSUSE/SLES: `sudo zypper install libvirt qemu-kvm` - -Check your installed virsh version: - -`virsh --version` - -If your version of virsh is newer than 1.3.1 (January 2016), you may download our pre-built driver: - -```shell -curl -LO https://storage.googleapis.com/minikube/releases/latest/docker-machine-driver-kvm2 \ - && sudo install docker-machine-driver-kvm2 /usr/local/bin/ -``` - -If your version of virsh is older than 1.3.1 (Januarry 2016), you may build your own driver binary if you have go 1.12+ installed. - -```console -$ sudo apt install libvirt-dev -$ git clone https://github.com/kubernetes/minikube.git -$ cd minikube -$ make out/docker-machine-driver-kvm2 -$ sudo install out/docker-machine-driver-kvm2 /usr/local/bin -$ -``` - -To finish the kvm installation, start and verify the `libvirtd` service - -```shell -sudo systemctl enable libvirtd.service -sudo systemctl start libvirtd.service -sudo systemctl status libvirtd.service -``` - -Add your user to `libvirt` group (older distributions may use `libvirtd` instead) - -```shell -sudo usermod -a -G libvirt $(whoami) -``` - -Join the `libvirt` group with your current shell session: - -```shell -newgrp libvirt -``` - -To use the kvm2 driver: - -```shell -minikube start --vm-driver kvm2 -``` - -or, to use kvm2 as a default driver for `minikube start`: - -```shell -minikube config set vm-driver kvm2 -``` - -### KVM2 upgrade - -```shell -curl -LO https://storage.googleapis.com/minikube/releases/latest/docker-machine-driver-kvm2 \ - && sudo install docker-machine-driver-kvm2 /usr/local/bin/ -``` - -### KVM2 troubleshoot - -If minikube can't start, check if the kvm default network exists. - -```shell -virsh net-list - Name State Autostart Persistent ----------------------------------------------------------- - default active yes yes -``` - -In case the default network doesn't exist you can define it. - -```shell -curl https://raw.githubusercontent.com/libvirt/libvirt/master/src/network/default.xml > kvm-default.xml -virsh net-define kvm-default.xml -virsh net-start default -``` - -Make sure you are running the lastest version of your driver. - - ```shell -docker-machine-driver-kvm2 version -``` - -## Hyperkit driver - -Install the [hyperkit](http://github.com/moby/hyperkit) VM manager using [brew](https://brew.sh): - -```shell -brew install hyperkit -``` - -Then install the most recent version of minikube's fork of the hyperkit driver: - -```shell -curl -LO https://storage.googleapis.com/minikube/releases/latest/docker-machine-driver-hyperkit \ -&& sudo install -o root -g wheel -m 4755 docker-machine-driver-hyperkit /usr/local/bin/ -``` - -If you are using [dnsmasq](http://www.thekelleys.org.uk/dnsmasq/doc.html) in your setup and cluster creation fails (stuck at kube-dns initialization) you might need to add `listen-address=192.168.64.1` to `dnsmasq.conf`. - -*Note: If `dnsmasq.conf` contains `listen-address=127.0.0.1` kubernetes discovers dns at 127.0.0.1:53 and tries to use it using bridge ip address, but dnsmasq replies only to requests from 127.0.0.1* - -To use the driver: - -```shell -minikube start --vm-driver hyperkit -``` - -or, to use hyperkit as a default driver for minikube: - -```shell -minikube config set vm-driver hyperkit -``` - -### Hyperkit upgrade - -```shell -curl -LO https://storage.googleapis.com/minikube/releases/latest/docker-machine-driver-hyperkit \ -&& sudo install -o root -g wheel -m 4755 docker-machine-driver-hyperkit /usr/local/bin/ -``` - -### Hyperkit troubleshoot - -Make sure you are running the lastest version of your driver. - -```shell -docker-machine-driver-hyperkit version -``` - -## Hyper-V driver - -Hyper-V users will need to create a new external network switch as described [here](https://docs.docker.com/machine/drivers/hyper-v/). This step may prevent a problem in which `minikube start` hangs indefinitely, unable to ssh into the minikube virtual machine. In this add, add the `--hyperv-virtual-switch=switch-name` argument to the `minikube start` command. - -Older Hyper-V VM's may have **dynamic memory management** enabled, which can cause problems of unexpected and random restarts which manifests itself in simply losing the connection to the cluster, after which `minikube status` would simply state `stopped`. **Solution**: run `minikube delete` to delete the old VM. - -To use the driver: - -```shell -minikube start --vm-driver hyperv --hyperv-virtual-switch=switch-name -``` - -or, to use hyperv as a default driver: - -```shell -minikube config set vm-driver hyperv && minikube config set hyperv-virtual-switch switch-name -``` - -and run minikube as usual: - -```shell -minikube start -``` - -## VMware unified driver - -The VMware unified driver will eventually replace the existing vmwarefusion driver. -The new unified driver supports both VMware Fusion (on macOS) and VMware Workstation (on Linux and Windows) - -To install the vmware unified driver, head over at and download the release for your operating system. - -The driver must be: - -1. Stored in `$PATH` -2. Named `docker-machine-driver-vmware` -3. Executable (`chmod +x` on UNIX based platforms) - -If you're running on macOS with Fusion, this is an easy way install the driver: - -```shell -export LATEST_VERSION=$(curl -L -s -H 'Accept: application/json' https://github.com/machine-drivers/docker-machine-driver-vmware/releases/latest | sed -e 's/.*"tag_name":"\([^"]*\)".*/\1/') \ -&& curl -L -o docker-machine-driver-vmware https://github.com/machine-drivers/docker-machine-driver-vmware/releases/download/$LATEST_VERSION/docker-machine-driver-vmware_darwin_amd64 \ -&& chmod +x docker-machine-driver-vmware \ -&& mv docker-machine-driver-vmware /usr/local/bin/ -``` - -To use the driver: - -```shell -minikube start --vm-driver vmware -``` - -or, to use vmware unified driver as a default driver: - -```shell -minikube config set vm-driver vmware -``` - -and run minikube as usual: - -```shell -minikube start -``` - -## Parallels driver - -This driver is useful for users who own Parallels Desktop for Mac that do not have VT-x hardware support required by the hyperkit driver. - -Pre-requisites: Parallels Desktop for Mac - -Install the [Parallels docker-machine driver](https://github.com/Parallels/docker-machine-parallels) using [brew](https://brew.sh): - -```shell -brew install docker-machine-parallels -``` - -To use the driver: - -```shell -minikube start --vm-driver parallels -``` - -or, to use parallels as a default driver for minikube: - -```shell -minikube config set vm-driver parallels -``` - -## Troubleshooting - -minikube is currently unable to display the error message received back from the VM driver. Users can however reveal the error by passing `--alsologtostderr -v=8` to `minikube start`. For instance: - -```shell -minikube start --vm-driver=kvm2 --alsologtostderr -v=8 -``` - -Output: - -```text -Found binary path at /usr/local/bin/docker-machine-driver-kvm2 -Launching plugin server for driver kvm2 -Error starting plugin binary: fork/exec /usr/local/bin/docker-machine-driver-kvm2: exec format error -``` +This document has moved to https://minikube.sigs.k8s.io/docs/reference/drivers/ diff --git a/docs/env_vars.md b/docs/env_vars.md index 00dded01be..b90a70617b 100644 --- a/docs/env_vars.md +++ b/docs/env_vars.md @@ -1,59 +1 @@ - -# minikube Environment Variables - -## Config option variables - -minikube supports passing environment variables instead of flags for every value listed in `minikube config list`. This is done by passing an environment variable with the prefix `MINIKUBE_`. - -For example the `minikube start --iso-url="$ISO_URL"` flag can also be set by setting the `MINIKUBE_ISO_URL="$ISO_URL"` environment variable. - -## Other variables - -Some features can only be accessed by environment variables, here is a list of these features: - -* **MINIKUBE_HOME** - (string) sets the path for the .minikube directory that minikube uses for state/configuration - -* **MINIKUBE_IN_STYLE** - (bool) manually sets whether or not emoji and colors should appear in minikube. Set to false or 0 to disable this feature, true or 1 to force it to be turned on. - -* **MINIKUBE_WANTUPDATENOTIFICATION** - (bool) sets whether the user wants an update notification for new minikube versions - -* **MINIKUBE_REMINDERWAITPERIODINHOURS** - (int) sets the number of hours to check for an update notification - -* **CHANGE_MINIKUBE_NONE_USER** - (bool) automatically change ownership of ~/.minikube to the value of $SUDO_USER - -* **MINIKUBE_ENABLE_PROFILING** - (int, `1` enables it) enables trace profiling to be generated for minikube - -## Making these values permanent - -To make the exported variables permanent: - -* Linux and macOS: Add these declarations to `~/.bashrc` or wherever your shells environment variables are stored. -* Windows: Add these declarations via [system settings](https://support.microsoft.com/en-au/help/310519/how-to-manage-environment-variables-in-windows-xp) or using [setx](https://stackoverflow.com/questions/5898131/set-a-persistent-environment-variable-from-cmd-exe) - -### Example: Disabling emoji - -```shell -export MINIKUBE_IN_STYLE=false -minikube start -``` - -### Example: Profiling - -```shell -MINIKUBE_ENABLE_PROFILING=1 minikube start -``` - -Output: - -``` text -2017/01/09 13:18:00 profile: cpu profiling enabled, /tmp/profile933201292/cpu.pprof -Starting local Kubernetes cluster... -Kubectl is now configured to use the cluster. -2017/01/09 13:19:06 profile: cpu profiling disabled, /tmp/profile933201292/cpu.pprof -``` - -Examine the cpu profiling results: - -```shell -go tool pprof /tmp/profile933201292/cpu.pprof -``` +This document has moved to https://minikube.sigs.k8s.io/docs/reference/environment_variables diff --git a/docs/gpu.md b/docs/gpu.md index 1d2faa2dd1..56725b80fb 100644 --- a/docs/gpu.md +++ b/docs/gpu.md @@ -1,121 +1 @@ -# (Experimental) NVIDIA GPU support in minikube - -minikube has experimental support for using NVIDIA GPUs on Linux. - -## Using NVIDIA GPUs on minikube on Linux with `--vm-driver=kvm2` - -When using NVIDIA GPUs with the kvm2 vm-driver. We passthrough spare GPUs on the -host to the minikube VM. Doing so has a few prerequisites: - -- You must install the [kvm2 driver](drivers.md#kvm2-driver). If you already had - this installed make sure that you fetch the latest - `docker-machine-driver-kvm2` binary that has GPU support. - -- Your CPU must support IOMMU. Different vendors have different names for this - technology. Intel calls it Intel VT-d. AMD calls it AMD-Vi. Your motherboard - must also support IOMMU. - -- You must enable IOMMU in the kernel: add `intel_iommu=on` or `amd_iommu=on` - (depending to your CPU vendor) to the kernel command line. Also add `iommu=pt` - to the kernel command line. - -- You must have spare GPUs that are not used on the host and can be passthrough - to the VM. These GPUs must not be controlled by the nvidia/nouveau driver. You - can ensure this by either not loading the nvidia/nouveau driver on the host at - all or assigning the spare GPU devices to stub kernel modules like `vfio-pci` - or `pci-stub` at boot time. You can do that by adding the - [vendorId:deviceId](https://pci-ids.ucw.cz/read/PC/10de) of your spare GPU to - the kernel command line. For ex. for Quadro M4000 add `pci-stub.ids=10de:13f1` - to the kernel command line. Note that you will have to do this for all GPUs - you want to passthrough to the VM and all other devices that are in the IOMMU - group of these GPUs. - -- Once you reboot the system after doing the above, you should be ready to use - GPUs with kvm2. Run the following command to start minikube: - ```shell - minikube start --vm-driver kvm2 --gpu - ``` - - This command will check if all the above conditions are satisfied and - passthrough spare GPUs found on the host to the VM. - - If this succeeded, run the following commands: - ```shell - minikube addons enable nvidia-gpu-device-plugin - minikube addons enable nvidia-driver-installer - ``` - - This will install the NVIDIA driver (that works for GeForce/Quadro cards) - on the VM. - -- If everything succeeded, you should be able to see `nvidia.com/gpu` in the - capacity: - ```shell - kubectl get nodes -ojson | jq .items[].status.capacity - ``` - -### Where can I learn more about GPU passthrough? - -See the excellent documentation at - - -### Why are so many manual steps required to use GPUs with kvm2 on minikube? - -These steps require elevated privileges which minikube doesn't run with and they -are disruptive to the host, so we decided to not do them automatically. - -## Using NVIDIA GPU on minikube on Linux with `--vm-driver=none` - -NOTE: This approach used to expose GPUs here is different than the approach used -to expose GPUs with `--vm-driver=kvm2`. Please don't mix these instructions. - -- Install minikube. - -- Install the nvidia driver, nvidia-docker and configure docker with nvidia as - the default runtime. See instructions at - - -- Start minikube: - ```shell - minikube start --vm-driver=none --apiserver-ips 127.0.0.1 --apiserver-name localhost - ``` - -- Install NVIDIA's device plugin: - ```shell - kubectl create -f https://raw.githubusercontent.com/NVIDIA/k8s-device-plugin/v1.10/nvidia-device-plugin.yml - ``` - -## Why does minikube not support NVIDIA GPUs on macOS? - -VM drivers supported by minikube for macOS doesn't support GPU passthrough: - -- [mist64/xhyve#108](https://github.com/mist64/xhyve/issues/108) -- [moby/hyperkit#159](https://github.com/moby/hyperkit/issues/159) -- [VirtualBox docs](http://www.virtualbox.org/manual/ch09.html#pcipassthrough) - -Also: - -- For quite a while, all Mac hardware (both laptops and desktops) have come with - Intel or AMD GPUs (and not with NVIDIA GPUs). Recently, Apple added [support - for eGPUs](https://support.apple.com/en-us/HT208544), but even then all the - supported GPUs listed are AMD’s. - -- nvidia-docker [doesn't support - macOS](https://github.com/NVIDIA/nvidia-docker/issues/101) either. - -## Why does minikube not support NVIDIA GPUs on Windows? - -minikube supports Windows host through Hyper-V or VirtualBox. - -- VirtualBox doesn't support PCI passthrough for [Windows - host](http://www.virtualbox.org/manual/ch09.html#pcipassthrough). - -- Hyper-V supports DDA (discrete device assignment) but [only for Windows Server - 2016](https://docs.microsoft.com/en-us/windows-server/virtualization/hyper-v/plan/plan-for-deploying-devices-using-discrete-device-assignment) - -Since the only possibility of supporting GPUs on minikube on Windows is on a -server OS where users don't usually run minikube, we haven't invested time in -trying to support NVIDIA GPUs on minikube on Windows. - -Also, nvidia-docker [doesn't support -Windows](https://github.com/NVIDIA/nvidia-docker/issues/197) either. +This document has moved to https://minikube.sigs.k8s.io/docs/tutorials/nvidia_gpu/ diff --git a/docs/host_folder_mount.md b/docs/host_folder_mount.md index 92f454cbc1..689f23f986 100644 --- a/docs/host_folder_mount.md +++ b/docs/host_folder_mount.md @@ -1,76 +1 @@ -# Mounting Host Folders - -`minikube mount /path/to/dir/to/mount:/vm-mount-path` is the recommended way to mount directories into minikube so that they can be used in your local Kubernetes cluster. The command works on all supported platforms. Below is an example workflow for using `minikube mount`: - -```shell -# terminal 1 -$ mkdir ~/mount-dir -$ minikube mount ~/mount-dir:/mount-9p -Mounting /home/user/mount-dir/ into /mount-9p on the minikubeVM -This daemon process needs to stay alive for the mount to still be accessible... -ufs starting -# This process has to stay open, so in another terminal... -``` - -```shell -# terminal 2 -$ echo "hello from host" > ~/mount-dir/hello-from-host -$ kubectl run -i --rm --tty ubuntu --overrides=' -{ - "apiVersion": "v1", - "kind": "Pod", - "metadata": { - "name": "ubuntu" - }, - "spec": { - "containers": [ - { - "name": "ubuntu", - "image": "ubuntu:14.04", - "args": [ - "bash" - ], - "stdin": true, - "stdinOnce": true, - "tty": true, - "workingDir": "/mount-9p", - "volumeMounts": [{ - "mountPath": "/mount-9p", - "name": "host-mount" - }] - } - ], - "volumes": [ - { - "name": "host-mount", - "hostPath": { - "path": "/mount-9p" - } - } - ] - } -} -' --image=ubuntu:14.04 --restart=Never -- bash - -Waiting for pod default/ubuntu to be running, status is Pending, pod ready: false -Waiting for pod default/ubuntu to be running, status is Running, pod ready: false -# ====================================================================================== -# We are now in the pod -#======================================================================================= -root@ubuntu:/mount-9p# cat hello-from-host -hello from host -root@ubuntu:/mount-9p# echo "hello from pod" > /mount-9p/hello-from-pod -root@ubuntu:/mount-9p# ls -hello-from-host hello-from-pod -root@ubuntu:/mount-9p# exit -exit -Waiting for pod default/ubuntu to terminate, status is Running -pod "ubuntu" deleted -# ====================================================================================== -# We are back on the host -#======================================================================================= -$ cat ~/mount-dir/hello-from-pod -hello from pod -``` - -Some drivers themselves provide host-folder sharing options, but we plan to deprecate these in the future as they are all implemented differently and they are not configurable through minikube. +This document has moved to https://minikube.sigs.k8s.io/docs/tasks/mount/ diff --git a/docs/http_proxy.md b/docs/http_proxy.md index fd185542c9..789508a20f 100644 --- a/docs/http_proxy.md +++ b/docs/http_proxy.md @@ -1,102 +1 @@ -# minikube: Using HTTP/HTTPS proxies - -minikube requires access to the internet via HTTP, HTTPS, and DNS protocols. If a HTTP proxy is required to access the internet, you may need to pass the proxy connection information to both minikube and Docker using environment variables: - -* `HTTP_PROXY` - The URL to your HTTP proxy -* `HTTPS_PROXY` - The URL to your HTTPS proxy -* `NO_PROXY` - A comma-separated list of hosts which should not go through the proxy. - -The NO_PROXY variable here is important: Without setting it, minikube may not be able to access resources within the VM. minikube uses two IP ranges, which should not go through the proxy: - -* **192.168.99.0/24**: Used by the minikube VM. Configurable for some hypervisors via `--host-only-cidr` -* **192.168.39.0/24**: Used by the minikube kvm2 driver. -* **10.96.0.0/12**: Used by service cluster IP's. Configurable via `--service-cluster-ip-range` - -One important note: If NO_PROXY is required by non-Kubernetes applications, such as Firefox or Chrome, you may want to specifically add the minikube IP to the comma-separated list, as they may not understand IP ranges ([#3827](https://github.com/kubernetes/minikube/issues/3827)). - -## Example Usage - -### macOS and Linux - -```shell -export HTTP_PROXY=http:// -export HTTPS_PROXY=https:// -export NO_PROXY=localhost,127.0.0.1,10.96.0.0/12,192.168.99.0/24,192.168.39.0/24 - -minikube start -``` - -To make the exported variables permanent, consider adding the declarations to ~/.bashrc or wherever your user-set environment variables are stored. - -### Windows - -```shell -set HTTP_PROXY=http:// -set HTTPS_PROXY=https:// -set NO_PROXY=localhost,127.0.0.1,10.96.0.0/12,192.168.99.1/24,192.168.39.0/24 - -minikube start -``` - -To set these environment variables permanently, consider adding these to your [system settings](https://support.microsoft.com/en-au/help/310519/how-to-manage-environment-variables-in-windows-xp) or using [setx](https://stackoverflow.com/questions/5898131/set-a-persistent-environment-variable-from-cmd-exe) - -## Configuring Docker to use a proxy - -As of v1.0, minikube automatically configures the Docker instance inside of the VM to use the proxy environment variables, unless you have specified a `--docker-env` override. If you need to manually configure Docker for a set of proxies, use: - -```shell -minikube start \ - --docker-env=HTTP_PROXY=$HTTP_PROXY \ - --docker-env HTTPS_PROXY=$HTTPS_PROXY \ - --docker-env NO_PROXY=$NO_PROXY -``` - -## Troubleshooting - -### unable to cache ISO... connection refused - -```text -Unable to start VM: unable to cache ISO: https://storage.googleapis.com/minikube/iso/minikube.iso: -failed to download: failed to download to temp file: download failed: 5 error(s) occurred: - -* Temporary download error: Get https://storage.googleapis.com/minikube/iso/minikube.iso: -proxyconnect tcp: dial tcp :: connect: connection refused -``` - -This error indicates that the host:port combination defined by HTTPS_PROXY or HTTP_PROXY is incorrect, or that the proxy is unavailable. - -## Unable to pull images..Client.Timeout exceeded while awaiting headers - -```text -Unable to pull images, which may be OK: - -failed to pull image "k8s.gcr.io/kube-apiserver:v1.13.3": output: Error response from daemon: -Get https://k8s.gcr.io/v2/: net/http: request canceled while waiting for connection -(Client.Timeout exceeded while awaiting headers) -``` - -This error indicates that the container runtime running within the VM does not have access to the internet. Verify that you are passing the appropriate value to `--docker-env HTTPS_PROXY`. - -## x509: certificate signed by unknown authority - -```text -[ERROR ImagePull]: failed to pull image k8s.gcr.io/kube-apiserver:v1.13.3: -output: Error response from daemon: -Get https://k8s.gcr.io/v2/: x509: certificate signed by unknown authority -``` - -This is because minikube VM is stuck behind a proxy that rewrites HTTPS responses to contain its own TLS certificate. The [solution](https://github.com/kubernetes/minikube/issues/3613#issuecomment-461034222) is to install the proxy certificate into a location that is copied to the VM at startup, so that it can be validated. - -Ask your IT department for the appropriate PEM file, and add it to: - -`~/.minikube/files/etc/ssl/certs` - -Then run `minikube delete` and `minikube start`. - -## downloading binaries: proxyconnect tcp: tls: oversized record received with length 20527 - -Your need to set a correct `HTTPS_PROXY` value. - -## Additional Information - -* [Configure Docker to use a proxy server](https://docs.docker.com/network/proxy/) +This document has moved to https://minikube.sigs.k8s.io/docs/reference/networking/proxy/ diff --git a/docs/insecure_registry.md b/docs/insecure_registry.md index fa02d603d3..c02296e26c 100644 --- a/docs/insecure_registry.md +++ b/docs/insecure_registry.md @@ -1,28 +1 @@ -# Enabling Docker Insecure Registry - -Minikube allows users to configure the docker engine's `--insecure-registry` flag. You can use the `--insecure-registry` flag on the -`minikube start` command to enable insecure communication between the docker engine and registries listening to requests from the CIDR range. - -One nifty hack is to allow the kubelet running in minikube to talk to registries deployed inside a pod in the cluster without backing them -with TLS certificates. Because the default service cluster IP is known to be available at 10.0.0.1, users can pull images from registries -deployed inside the cluster by creating the cluster with `minikube start --insecure-registry "10.0.0.0/24"`. - -## Private Container Registries - -**GCR/ECR/Docker**: Minikube has an addon, `registry-creds` which maps credentials into Minikube to support pulling from Google Container Registry (GCR), Amazon's EC2 Container Registry (ECR), and Private Docker registries. You will need to run `minikube addons configure registry-creds` and `minikube addons enable registry-creds` to get up and running. An example of this is below: - -```shell -$ minikube addons configure registry-creds -Do you want to enable AWS Elastic Container Registry? [y/n]: n - -Do you want to enable Google Container Registry? [y/n]: y --- Enter path to credentials (e.g. /home/user/.config/gcloud/application_default_credentials.json):/home/user/.config/gcloud/application_default_credentials.json - -Do you want to enable Docker Registry? [y/n]: n -registry-creds was successfully configured -$ minikube addons enable registry-creds -``` - -For additional information on private container registries, see [this page](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/). - -We recommend you use _ImagePullSecrets_, but if you would like to configure access on the minikube VM you can place the `.dockercfg` in the `/home/docker` directory or the `config.json` in the `/var/lib/kubelet` directory. Make sure to restart your kubelet (for kubeadm) process with `sudo systemctl restart kubelet`. +This document has moved to https://minikube.sigs.k8s.io/docs/tasks/registry/ diff --git a/docs/networking.md b/docs/networking.md index 246b4f0753..cc3ba1e46e 100644 --- a/docs/networking.md +++ b/docs/networking.md @@ -1,78 +1,2 @@ -# Networking - -## Firewalls, VPN's, and proxies - -minikube may require access from the host to the following IP ranges: 192.168.99.0/24, 192.168.39.0/24, and 10.96.0.0/12. These networks can be changed in minikube using `--host-only-cidr` and `--service-cluster-ip-range`. - -* To use minikube with a proxy, see [Using HTTP/HTTPS proxies](http_proxy.md). - -* If you are using minikube with a VPN, you may need to configure the VPN to allow local routing for traffic to the afforementioned IP ranges. - -* If you are using minikube with a local firewall, you will need to allow access from the host to the afforementioned IP ranges on TCP ports 22 and 8443. You will also need to add access from these IP's to TCP ports 443 and 53 externally to pull images. - -## Access to NodePort services - -The minikube VM is exposed to the host system via a host-only IP address, that can be obtained with the `minikube ip` command. Any services of type `NodePort` can be accessed over that IP address, on the NodePort. - -To determine the NodePort for your service, you can use a `kubectl` command like this (note that `nodePort` begins with lowercase `n` in JSON output): - -`kubectl get service $SERVICE --output='jsonpath="{.spec.ports[0].nodePort}"'` - -We also have a shortcut for fetching the minikube IP and a service's `NodePort`: - -`minikube service --url $SERVICE` - -### Increasing the NodePort range - -By default, minikube only exposes ports 30000-32767. If this is not enough, you can configure the apiserver to allow all ports using: - -`minikube start --extra-config=apiserver.service-node-port-range=1-65535` - -This flag also accepts a comma separated list of ports and port ranges. - -## Access to LoadBalancer services using `minikube tunnel` - -Services of type `LoadBalancer` can be exposed via the `minikube tunnel` command. - -````shell -minikube tunnel -```` - -Will output: - -```text -out/minikube tunnel -Password: ***** -Status: - machine: minikube - pid: 59088 - route: 10.96.0.0/12 -> 192.168.99.101 - minikube: Running - services: [] - errors: - minikube: no errors - router: no errors - loadbalancer emulator: no errors - - -```` - -Tunnel might ask you for password for creating and deleting network routes. - -## Cleaning up orphaned routes - -If the `minikube tunnel` shuts down in an unclean way, it might leave a network route around. -This case the ~/.minikube/tunnels.json file will contain an entry for that tunnel. -To cleanup orphaned routes, run: - -````shell -minikube tunnel --cleanup -```` - -## Tunnel: Avoid entering password multiple times - -`minikube tunnel` runs as a separate daemon, creates a network route on the host to the service CIDR of the cluster using the cluster's IP address as a gateway. Adding a route requires root privileges for the user, and thus there are differences in how to run `minikube tunnel` depending on the OS. - -If you want to avoid entering the root password, consider setting NOPASSWD for "ip" and "route" commands: - - +This document has moved to https://minikube.sigs.k8s.io/docs/reference/networking/ + \ No newline at end of file diff --git a/docs/offline.md b/docs/offline.md index 3da03bfaaa..3bfc3bf2ff 100644 --- a/docs/offline.md +++ b/docs/offline.md @@ -1,40 +1 @@ -# Offline support in minikube - -As of v1.0, `minikube start` is offline compatible out of the box. Here are some implementation details to help systems integrators: - -## Requirements - -* On the initial run for a given Kubernetes release, `minikube start` must have access to the internet, or a configured `--image-repository` to pull from. - -## Cache location - -* `~/.minikube/cache` - Top-level folder -* `~/.minikube/cache/iso` - VM ISO image. Typically updated once per major minikube release. -* `~/.minikube/cache/images` - Docker images used by Kubernetes. -* `~/.minikube/cache/` - Kubernetes binaries, such as `kubeadm` and `kubelet` - -## Sharing the minikube cache - -For offline use on other hosts, one can copy the contents of `~/.minikube/cache`. As of the v1.0 release, this directory -contains 685MB of data: - -```text -cache/iso/minikube-v1.0.0.iso -cache/images/gcr.io/k8s-minikube/storage-provisioner_v1.8.1 -cache/images/k8s.gcr.io/k8s-dns-sidecar-amd64_1.14.13 -cache/images/k8s.gcr.io/k8s-dns-dnsmasq-nanny-amd64_1.14.13 -cache/images/k8s.gcr.io/kubernetes-dashboard-amd64_v1.10.1 -cache/images/k8s.gcr.io/kube-scheduler_v1.14.0 -cache/images/k8s.gcr.io/coredns_1.3.1 -cache/images/k8s.gcr.io/kube-controller-manager_v1.14.0 -cache/images/k8s.gcr.io/kube-apiserver_v1.14.0 -cache/images/k8s.gcr.io/pause_3.1 -cache/images/k8s.gcr.io/etcd_3.3.10 -cache/images/k8s.gcr.io/kube-addon-manager_v9.0 -cache/images/k8s.gcr.io/k8s-dns-kube-dns-amd64_1.14.13 -cache/images/k8s.gcr.io/kube-proxy_v1.14.0 -cache/v1.14.0/kubeadm -cache/v1.14.0/kubelet -``` - -If any of these files exist, minikube will use copy them into the VM directly rather than pulling them from the internet. +This document has moved to https://minikube.sigs.k8s.io/docs/reference/cache/ diff --git a/docs/openid_connect_auth.md b/docs/openid_connect_auth.md index aeb016c6a5..cbb2515911 100644 --- a/docs/openid_connect_auth.md +++ b/docs/openid_connect_auth.md @@ -1,33 +1 @@ -# OpenID Connect Authentication - -Minikube `kube-apiserver` can be configured to support OpenID Connect Authentication. - -Read more about OpenID Connect Authentication for Kubernetes here: - -## Configuring the API Server - -Configuration values can be passed to the API server using the `--extra-config` flag on the `minikube start` command. See [configuring_kubernetes.md](https://github.com/kubernetes/minikube/blob/master/docs/configuring_kubernetes.md) for more details. - -The following example configures your Minikube cluster to support RBAC and OIDC: - -```shell -minikube start \ - --extra-config=apiserver.authorization-mode=RBAC \ - --extra-config=apiserver.oidc-issuer-url=https://example.com \ - --extra-config=apiserver.oidc-username-claim=email \ - --extra-config=apiserver.oidc-client-id=kubernetes-local -``` - -## Configuring kubectl - -You can use the kubectl `oidc` authenticator to create a kubeconfig as shown in the Kubernetes docs: - -`minikube start` already creates a kubeconfig that includes a `cluster`, in order to use it with your `oidc` authenticator kubeconfig, you can run: - -```shell -kubectl config set-context kubernetes-local-oidc --cluster=minikube --user username@example.com -Context "kubernetes-local-oidc" created. -kubectl config use-context kubernetes-local-oidc -``` - -For the new context to work you will need to create, at the very minimum, a `Role` and a `RoleBinding` in your cluster to grant permissions to the `subjects` included in your `oidc-username-claim`. +This document has moved to https://minikube.sigs.k8s.io/docs/tutorials/openid_connect_auth/ diff --git a/docs/persistent_volumes.md b/docs/persistent_volumes.md index 838bac61de..df28b852af 100644 --- a/docs/persistent_volumes.md +++ b/docs/persistent_volumes.md @@ -1,39 +1 @@ -# Persistent Volumes - -Minikube supports [PersistentVolumes](https://kubernetes.io/docs/concepts/storage/persistent-volumes/) of type `hostPath` out of the box. These PersistentVolumes are mapped to a directory inside the running Minikube instance (usually a VM, unless you use `--vm-driver=none`). For more information on how this works, read the Dynamic Provisioning section below. - -## A note on mounts, persistence, and Minikube hosts - -Minikube is configured to persist files stored under the following directories, which are made in the Minikube VM (or on your localhost if running on bare metal). You may lose data from other directories on reboots. - -* `/data` -* `/var/lib/minikube` -* `/var/lib/docker` -* `/tmp/hostpath_pv` -* `/tmp/hostpath-provisioner` - -Here is an example PersistentVolume config to persist data in the '/data' directory: - -```yaml -apiVersion: v1 -kind: PersistentVolume -metadata: - name: pv0001 -spec: - accessModes: - - ReadWriteOnce - capacity: - storage: 5Gi - hostPath: - path: /data/pv0001/ -``` - -You can also achieve persistence by creating a PV in a mounted host folder. - -## Dynamic provisioning and CSI - -In addition, minikube implements a very simple, canonical implementation of dynamic storage controller that runs alongside its deployment. This manages provisioning of *hostPath* volumes (rather then via the previous, in-tree hostPath provider). - -The default [Storage Provisioner Controller](https://github.com/kubernetes/minikube/blob/master/pkg/storage/storage_provisioner.go) is managed internally, in the minikube codebase, demonstrating how easy it is to plug a custom storage controller into kubernetes as a storage component of the system, and provides pods with dynamically, to test your pod's behaviour when persistent storage is mapped to it. - -NOTE: this is not a CSI based storage provider. It simply declares an appropriate PersistentVolume in response to an incoming storage request. +This document has moved to https://minikube.sigs.k8s.io/docs/reference/persistent_volumes/ diff --git a/docs/reusing_the_docker_daemon.md b/docs/reusing_the_docker_daemon.md index 28e6511f44..2b76f9534b 100644 --- a/docs/reusing_the_docker_daemon.md +++ b/docs/reusing_the_docker_daemon.md @@ -1,77 +1 @@ -# Reusing the Docker daemon - -## Method 1: Without minikube registry addon - -When using a single VM of Kubernetes it's really handy to reuse the Docker daemon inside the VM; as this means you don't have to build on your host machine and push the image into a docker registry - you can just build inside the same docker daemon as minikube which speeds up local experiments. - -To be able to work with the docker daemon on your mac/linux host use the docker-env command in your shell: - -```shell -eval $(minikube docker-env) -``` - -You should now be able to use docker on the command line on your host mac/linux machine talking to the docker daemon inside the minikube VM: - -```shell -docker ps -``` - -### Troubleshooting - -On CentOS 7, Docker may report the following error: - -```shell -Could not read CA certificate "/etc/docker/ca.pem": open /etc/docker/ca.pem: no such file or directory -``` - -The fix is to update /etc/sysconfig/docker to ensure that minikube's environment changes are respected: - -```diff -< DOCKER_CERT_PATH=/etc/docker ---- -> if [ -z "${DOCKER_CERT_PATH}" ]; then -> DOCKER_CERT_PATH=/etc/docker -> fi -``` - -Remember to turn off the _imagePullPolicy:Always_, as otherwise Kubernetes won't use images you built locally. - -## Method 2: With minikube registry addon - -Enable minikube registry addon and then push images directly into registry. Steps are as follows: - -For illustration purpose, we will assume that minikube VM has one of the ip from `192.168.39.0/24` subnet. If you have not overridden these subnets as per [networking guide](https://github.com/kubernetes/minikube/blob/master/docs/networking.md), you can find out default subnet being used by minikube for a specific OS and driver combination [here](https://github.com/kubernetes/minikube/blob/dfd9b6b83d0ca2eeab55588a16032688bc26c348/pkg/minikube/cluster/cluster.go#L408) which is subject to change. Replace `192.168.39.0/24` with appropriate values for your environment wherever applicable. - -Ensure that docker is configured to use `192.168.39.0/24` as insecure registry. Refer [here](https://docs.docker.com/registry/insecure/) for instructions. - -Ensure that `192.168.39.0/24` is enabled as insecure registry in minikube. Refer [here](https://github.com/kubernetes/minikube/blob/master/docs/insecure_registry.md) for instructions.. - -Enable minikube registry addon: - -```shell -minikube addons enable registry -``` - -Build docker image and tag it appropriately: - -```shell -docker build --tag $(minikube ip):5000/test-img . -``` - -Push docker image to minikube registry: - -```shell -docker push $(minikube ip):5000/test-img -``` - -Now run it in minikube: - -```shell -kubectl run test-img --image=$(minikube ip):5000/test-img -``` - -Or if `192.168.39.0/24` is not enabled as insecure registry in minikube, then: - -```shell -kubectl run test-img --image=localhost:5000/test-img -``` +This document has moved to https://minikube.sigs.k8s.io/docs/tasks/docker_daemon/ diff --git a/docs/syncing-files.md b/docs/syncing-files.md index 2cff4e72a7..ea217b2d38 100644 --- a/docs/syncing-files.md +++ b/docs/syncing-files.md @@ -1,15 +1 @@ -# minikube: Syncing files into the VM - -## Syncing files during start up - -As soon as a VM is created, minikube will populate the root filesystem with any files stored in $MINIKUBE_HOME (~/.minikube/files). - -For example, running the following commands will result in `/etc/OMG` being added with the contents of `hello` into the minikube VM: - -```shell -mkdir -p ~/.minikube/files/etc -echo hello > ~/.minikube/files/etc/OMG -minikube start -``` - -This method of file synchronization can be useful for adding configuration files for apiserver, or adding HTTPS certificates. +This document has moved to https://minikube.sigs.k8s.io/docs/tasks/sync/ diff --git a/docs/tunnel.md b/docs/tunnel.md index 8e41bf9dbe..b92c4c1b16 100644 --- a/docs/tunnel.md +++ b/docs/tunnel.md @@ -1,144 +1 @@ -# Minikube Tunnel Design Doc - -## Background - -Minikube today only exposes a single IP address for all cluster and VM communication. -This effectively requires users to connect to any running Pods, Services or LoadBalancers over ClusterIPs, which can require modifications to workflows when compared to developing against a production cluster. - -A main goal of Minikube is to minimize the differences required in code and configuration between development and production, so this is not ideal. -If all cluster IP addresses and Load Balancers were made available on the minikube host machine, these modifications would not be necessary and users would get the "magic" experience of developing from inside a cluster. - -Tools like telepresence.io, sshuttle, and the OpenVPN chart provide similar capabilities already. - -Also, Steve Sloka has provided a very detailed guide on how to setup a similar configuration [manually](https://stevesloka.com/access-minikube-service-from-linux-host/). - -Elson Rodriguez has provided a similar guide, including a Minikube [external LB controller](https://github.com/elsonrodriguez/minikube-lb-patch). - -## Example usage - -```shell -$ minikube tunnel -Starting minikube tunnel process. Press Ctrl+C to exit. -All cluster IPs and load balancers are now available from your host machine. -``` - -## Overview - -We will introduce a new command, `minikube tunnel`, that must be run with root permissions. -This command will: - -* Establish networking routes from the host into the VM for all IP ranges used by Kubernetes. -* Enable a cluster controller that allocates IPs to services external `LoadBalancer` IPs. -* Clean up routes and IPs when stopped, or when `minikube` stops. - -Additionally, we will introduce a Minikube LoadBalancer controller that manages a CIDR of IPs and assigns them to services of type `LoadBalancer`. -These IPs will also be made available on the host machine. - -## Network Routes - -Minikube drivers usually establish "host-only" IP addresses (192.168.1.1, for example) that route into the running VM -from the host. - -The new `minikube tunnel` command will create a static routing table entry that maps the CIDRs used by Pods, Services and LoadBalancers to the host-only IP, obtainable via the `minikube ip` command. - -The commands below detail adding routes for the entire `/8` block, we should probably add individual entries for each CIDR we manage instead. - -### Linux - -Route entries for the entire 10.* block can be added via: - -```shell -sudo ip route add 10.0.0.0/8 via $(minikube ip) -``` - -and deleted via: - -```shell -sudo ip route delete 10.0.0.0/8 -``` - -The routing table can be queried with `netstat -nr -f inet` - -### OSX - -Route entries can be added via: - -```shell -sudo route -n add 10.0.0.0/8 $(minikube ip) -``` - -and deleted via: - -```shell -sudo route -n delete 10.0.0.0/8 - -``` - -The routing table can be queried with `netstat -nr -f inet` - -### Windows - -Route entries can be added via: - -```shell -route ADD 10.0.0.0 MASK 255.0.0.0 -``` - -and deleted via: - -```shell -route DELETE 10.0.0.0 -``` - -The routing table can be queried with `route print -4` - -### Handling unclean shutdowns - -Unclean shutdowns of the tunnel process can result in partially executed cleanup process, leaving network routes in the routing table. -We will keep track of the routes created by each tunnel in a centralized location in the main minikube config directory. -This list serves as a registry for tunnels containing information about - -- machine profile -- process ID -- and the route that was created - -The cleanup command cleans the routes from both the routing table and the registry for tunnels that are not running: - -```shell -minikube tunnel --cleanup -``` - -Updating the tunnel registry and the routing table is an atomic transaction: - -- create route in the routing table + create registry entry if both are successful, otherwise rollback -- delete route in the routing table + remove registry entry if both are successful, otherwise rollback - -*Note*: because we don't support currently real multi cluster setup (due to overlapping CIDRs), the handling of running/not-running processes is not strictly required however it is forward looking. - -### Handling routing table conflicts - -A routing table conflict happens when a destination CIDR of the route required by the tunnel overlaps with an existing route. -Minikube tunnel will warn the user if this happens and should not create the rule. -There should not be any automated removal of conflicting routes. - -*Note*: If the user removes the minikube config directory, this might leave conflicting rules in the network routing table that will have to be cleaned up manually. - -## Load Balancer Controller - -In addition to making IPs routable, minikube tunnel will assign an external IP (the ClusterIP) to all services of type `LoadBalancer`. - -The logic of this controller will be, roughly: - -```python -for service in services: - if service.type == "LoadBalancer" and len(service.ingress) == 0: - add_ip_to_service(ClusterIP, service) -sleep -``` - -Note that the Minikube ClusterIP can change over time (during system reboots) and this loop should also handle reconciliation of those changes. - -## Handling multiple clusters - -Multiple clusters are currently not supported due to our inability to specify ServiceCIDR. -This causes conflicting routes having the same destination CIDR. +This document has moved to https://minikube.sigs.k8s.io/docs/tasks/loadbalancer/ diff --git a/docs/vmdriver-none.md b/docs/vmdriver-none.md index 77450e61df..143ec71b2b 100644 --- a/docs/vmdriver-none.md +++ b/docs/vmdriver-none.md @@ -1,119 +1 @@ -# vm-driver=none - -## Overview - -This document is written for system integrators who are familiar with minikube, and wish to run it within a customized VM environment. - -The `none` driver allows advanced minikube users to skip VM creation, allowing minikube to be run on a user-supplied VM. - -## What operating systems are supported? - -The `none` driver supports releases of Debian, Ubuntu, and Fedora that are less than 2 years old. In practice, any systemd-based modern distribution is likely to work, and we will accept pull requests which improve compatibility with other systems. - -## Example: basic usage - -`sudo minikube start --vm-driver=none` - -NOTE: The none driver requires minikube to be run as root, until [#3760](https://github.com/kubernetes/minikube/issues/3760) can be addressed. - -## Example: Using minikube for continuous integration testing - -Most continuous integration environments are already running inside a VM, and may not supported nested virtualization. The `none` driver was designed for this use case. Here is an example, that runs minikube from a non-root user, and ensures that the latest stable kubectl is installed: - -```shell -curl -Lo minikube \ - https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 \ - && sudo install minikube /usr/local/bin/ - -kv=$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt) -curl -Lo kubectl \ - https://storage.googleapis.com/kubernetes-release/release/$kv/bin/linux/amd64/kubectl \ - && sudo install kubectl /usr/local/bin/ - -export MINIKUBE_WANTUPDATENOTIFICATION=false -export MINIKUBE_WANTREPORTERRORPROMPT=false -export MINIKUBE_HOME=$HOME -export CHANGE_MINIKUBE_NONE_USER=true -export KUBECONFIG=$HOME/.kube/config - -mkdir -p $HOME/.kube $HOME/.minikube -touch $KUBECONFIG - -sudo -E minikube start --vm-driver=none -``` - -At this point, kubectl should be able to interact with the minikube cluster. - -## Can the none driver be used outside of a VM? - -Yes, *but please avoid doing so if at all possible.* - -minikube was designed to run Kubernetes within a dedicated VM, and assumes that it has complete control over the machine it is executing on. With the `none` driver, minikube and Kubernetes run in an environment with very limited isolation, which could result in: - -* Decreased security -* Decreased reliability -* Data loss - -We'll cover these in detail below: - -### Decreased security - -* minikube starts services that may be available on the Internet. Please ensure that you have a firewall to protect your host from unexpected access. For instance: - * apiserver listens on TCP *:8443 - * kubelet listens on TCP *:10250 and *:10255 - * kube-scheduler listens on TCP *:10259 - * kube-controller listens on TCP *:10257 -* Containers may have full access to your filesystem. -* Containers may be able to execute arbitrary code on your host, by using container escape vulnerabilities such as [CVE-2019-5736](https://access.redhat.com/security/vulnerabilities/runcescape). Please keep your release of minikube up to date. - -### Decreased reliability - -* minikube with the none driver may be tricky to configure correctly at first, because there are many more chances for interference with other locally run services, such as dnsmasq. - -* When run in `none` mode, minikube has no built-in resource limit mechanism, which means you could deploy pods which would consume all of the hosts resources. - -* minikube and the Kubernetes services it starts may interfere with other running software on the system. For instance, minikube will start and stop container runtimes via systemd, such as docker, containerd, cri-o. - -### Data loss - -With the `none` driver, minikube will overwrite the following system paths: - -* /usr/bin/kubeadm - Updated to match the exact version of Kubernetes selected -* /usr/bin/kubelet - Updated to match the exact version of Kubernetes selected -* /etc/kubernetes - configuration files - -These paths will be erased when running `minikube delete`: - -* /data/minikube -* /etc/kubernetes/manifests -* /var/lib/minikube - -As Kubernetes has full access to both your filesystem as well as your docker images, it is possible that other unexpected data loss issues may arise. - -## Environment variables - -Some environment variables may be useful for using the `none` driver: - -* **CHANGE_MINIKUBE_NONE_USER**: Sets file ownership to the user running sudo ($SUDO_USER) -* **MINIKUBE_HOME**: Saves all files to this directory instead of $HOME -* **MINIKUBE_WANTUPDATENOTIFICATION**: Toggles the notification that your version of minikube is obsolete -* **MINIKUBE_WANTREPORTERRORPROMPT**: Toggles the error reporting prompt -* **MINIKUBE_IN_STYLE**: Toggles color output and emoji usage - -## Known Issues - -* `systemctl` is required. [#2704](https://github.com/kubernetes/minikube/issues/2704) -* `-p` (profiles) are unsupported: It is not possible to run more than one `--vm-driver=none` instance -* Many `minikube` commands are not supported, such as: `dashboard`, `mount`, `ssh` -* minikube with the `none` driver has a confusing permissions model, as some commands need to be run as root ("start"), and others by a regular user ("dashboard") -* CoreDNS detects resolver loop, goes into CrashloopBackoff - [#3511](https://github.com/kubernetes/minikube/issues/3511) -* Some versions of Linux have a version of docker that is newer then what Kubernetes expects. To overwrite this, run minikube with the following parameters: `sudo -E minikube start --vm-driver=none --kubernetes-version v1.11.8 --extra-config kubeadm.ignore-preflight-errors=SystemVerification` -* On Ubuntu 18.04 (and probably others), because of how `systemd-resolve` is configured by default, one needs to bypass the default `resolv.conf` file and use a different one instead. - - In this case, you should use this file: `/run/systemd/resolve/resolv.conf` - - `sudo -E minikube --vm-driver=none start --extra-config=kubelet.resolv-conf=/run/systemd/resolve/resolv.conf` - - Apperently, though, if `resolve.conf` is too big (about 10 lines!!!), one gets the following error: `Waiting for pods: apiserver proxy! Error restarting cluster: wait: waiting for k8s-app=kube-proxy: timed out waiting for the condition` - - This error happens in Kubernetes 0.11.x, 0.12.x and 0.13.x, but *not* in 0.14.x - - If that's your case, try this: - - `grep -E "^nameserver" /run/systemd/resolve/resolv.conf |head -n 3 > /tmp/resolv.conf && sudo -E minikube --vm-driver=none start --extra-config=kubelet.resolv-conf=/tmp/resolv.conf` - -* [Full list of open 'none' driver issues](https://github.com/kubernetes/minikube/labels/co%2Fnone-driver) +This document has moved to https://minikube.sigs.k8s.io/docs/reference/drivers/none/ diff --git a/site/content/en/docs/Reference/Networking/proxy.md b/site/content/en/docs/Reference/Networking/proxy.md index 875a14c7e4..fa3690b103 100644 --- a/site/content/en/docs/Reference/Networking/proxy.md +++ b/site/content/en/docs/Reference/Networking/proxy.md @@ -1,10 +1,10 @@ --- -title: "Proxy Support" -linkTitle: "Proxy Support" +title: "HTTP Proxiies" +linkTitle: "HTTP Proxies" weight: 6 date: 2017-01-05 description: > - How to use an HTTP proxy with minikube + How to use an HTTP/HTTPS proxy with minikube --- minikube requires access to the internet via HTTP, HTTPS, and DNS protocols. If a HTTP proxy is required to access the internet, you may need to pass the proxy connection information to both minikube and Docker using environment variables: diff --git a/site/content/en/docs/Reference/Networking/vpn.md b/site/content/en/docs/Reference/Networking/vpn.md index 0992e30f44..94392a3980 100644 --- a/site/content/en/docs/Reference/Networking/vpn.md +++ b/site/content/en/docs/Reference/Networking/vpn.md @@ -1,10 +1,10 @@ --- -title: "VPN Support" -linkTitle: "VPN Support" +title: "Host VPN" +linkTitle: "Host VPN" weight: 6 date: 2019-08-01 description: > - How to use a VPN with minikube + Using minikube on a host with a VPN installed --- minikube requires access from the host to the following IP ranges: diff --git a/site/content/en/docs/Reference/cache.md b/site/content/en/docs/Reference/disk_cache.md similarity index 77% rename from site/content/en/docs/Reference/cache.md rename to site/content/en/docs/Reference/disk_cache.md index 0cb6f7fa52..84d43112ef 100644 --- a/site/content/en/docs/Reference/cache.md +++ b/site/content/en/docs/Reference/disk_cache.md @@ -1,6 +1,6 @@ --- -title: "Caching" -linkTitle: "Caching" +title: "Disk cache" +linkTitle: "Disk cache" weight: 6 date: 2019-08-01 description: > @@ -14,32 +14,14 @@ minikube has built-in support for caching downloaded resources into `$MINIKUBE_H * `~/.minikube/cache/images` - Docker images used by Kubernetes. * `~/.minikube/cache/` - Kubernetes binaries, such as `kubeadm` and `kubelet` -## Caching arbitrary Docker images - -minikube supports caching arbitrary images using the `minikube cache` command. Cached images are stored in `$MINIKUBE_HOME/cache/images`, and loaded into the VM's container runtime on `minikube start`. - -### Adding an image - -```shell -minikube cache add ubuntu:16.04 -``` - -### Listing images - -```shell -minikube cache list -``` - -### Deleting an image - -```shell -minikube cache delete -``` - -## Built-in Kubernetes image caching +## Kubernetes image cache `minikube start` caches all required Kubernetes images by default. This default may be changed by setting `--cache-images=false`. These images are not displayed by the `minikube cache` command. +## Arbitrary docker image cache + +See [Tasks: Caching images]({{< ref "/docs/tasks/caching.md" >}}) + ## Sharing the minikube cache For offline use on other hosts, one can copy the contents of `~/.minikube/cache`. As of the v1.0 release, this directory contains 685MB of data: diff --git a/site/content/en/docs/Reference/environment_variables.md b/site/content/en/docs/Reference/environment_variables.md new file mode 100644 index 0000000000..2b6596d21f --- /dev/null +++ b/site/content/en/docs/Reference/environment_variables.md @@ -0,0 +1,44 @@ +--- +title: "Environment Variables" +linkTitle: "Environment Variables" +weight: 6 +date: 2019-08-01 +--- + +## Config option variables + +minikube supports passing environment variables instead of flags for every value listed in `minikube config list`. This is done by passing an environment variable with the prefix `MINIKUBE_`. + +For example the `minikube start --iso-url="$ISO_URL"` flag can also be set by setting the `MINIKUBE_ISO_URL="$ISO_URL"` environment variable. + +## Other variables + +Some features can only be accessed by environment variables, here is a list of these features: + +* **MINIKUBE_HOME** - (string) sets the path for the .minikube directory that minikube uses for state/configuration + +* **MINIKUBE_IN_STYLE** - (bool) manually sets whether or not emoji and colors should appear in minikube. Set to false or 0 to disable this feature, true or 1 to force it to be turned on. + +* **MINIKUBE_WANTUPDATENOTIFICATION** - (bool) sets whether the user wants an update notification for new minikube versions + +* **MINIKUBE_REMINDERWAITPERIODINHOURS** - (int) sets the number of hours to check for an update notification + +* **CHANGE_MINIKUBE_NONE_USER** - (bool) automatically change ownership of ~/.minikube to the value of $SUDO_USER + +* **MINIKUBE_ENABLE_PROFILING** - (int, `1` enables it) enables trace profiling to be generated for minikube + + +## Example: Disabling emoji + +```shell +export MINIKUBE_IN_STYLE=false +minikube start +``` + +## Making values persistent + +To make the exported variables persistent across reboots: + +* Linux and macOS: Add these declarations to `~/.bashrc` or wherever your shells environment variables are stored. +* Windows: Add these declarations via [system settings](https://support.microsoft.com/en-au/help/310519/how-to-manage-environment-variables-in-windows-xp) or using [setx](https://stackoverflow.com/questions/5898131/set-a-persistent-environment-variable-from-cmd-exe) + diff --git a/site/content/en/docs/Getting started/_index.md b/site/content/en/docs/Start/_index.md similarity index 100% rename from site/content/en/docs/Getting started/_index.md rename to site/content/en/docs/Start/_index.md diff --git a/site/content/en/docs/Getting started/includes/post_install.inc b/site/content/en/docs/Start/includes/post_install.inc similarity index 100% rename from site/content/en/docs/Getting started/includes/post_install.inc rename to site/content/en/docs/Start/includes/post_install.inc diff --git a/site/content/en/docs/Getting started/linux.md b/site/content/en/docs/Start/linux.md similarity index 96% rename from site/content/en/docs/Getting started/linux.md rename to site/content/en/docs/Start/linux.md index 7e01ab9568..f932e8a1bb 100644 --- a/site/content/en/docs/Getting started/linux.md +++ b/site/content/en/docs/Start/linux.md @@ -67,4 +67,4 @@ If you are already running minikube from inside a VM, it is possible to skip the {{% /tab %}} {{% /tabs %}} -{{% readfile file="/docs/Getting started/includes/post_install.inc" %}} +{{% readfile file="/docs/Start/includes/post_install.inc" %}} diff --git a/site/content/en/docs/Getting started/macos.md b/site/content/en/docs/Start/macos.md similarity index 94% rename from site/content/en/docs/Getting started/macos.md rename to site/content/en/docs/Start/macos.md index c85a25b254..669bef6298 100644 --- a/site/content/en/docs/Getting started/macos.md +++ b/site/content/en/docs/Start/macos.md @@ -50,4 +50,4 @@ curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-darwin {{% /tabs %}} -{{% readfile file="/docs/Getting started/includes/post_install.inc" %}} +{{% readfile file="/docs/Start/includes/post_install.inc" %}} diff --git a/site/content/en/docs/Getting started/windows.md b/site/content/en/docs/Start/windows.md similarity index 95% rename from site/content/en/docs/Getting started/windows.md rename to site/content/en/docs/Start/windows.md index 82bebb0983..21bb84a77a 100644 --- a/site/content/en/docs/Getting started/windows.md +++ b/site/content/en/docs/Start/windows.md @@ -61,4 +61,4 @@ Hyper-V Requirements: A hypervisor has been detected. {{% /tab %}} {{% /tabs %}} -{{% readfile file="/docs/Getting started/includes/post_install.inc" %}} +{{% readfile file="/docs/Start/includes/post_install.inc" %}} diff --git a/site/content/en/docs/Tasks/building_within.md b/site/content/en/docs/Tasks/building.md similarity index 94% rename from site/content/en/docs/Tasks/building_within.md rename to site/content/en/docs/Tasks/building.md index 60ffa2a483..4194c3ec62 100644 --- a/site/content/en/docs/Tasks/building_within.md +++ b/site/content/en/docs/Tasks/building.md @@ -1,9 +1,9 @@ --- -title: "Building within" +title: "Building images within minikube" date: 2019-08-05 weight: 1 description: > - Building images from within minikube + Building images within minikube --- When using a single VM of Kubernetes it's really handy to build inside the VM; as this means you don't have to build on your host machine and push the image into a docker registry - you can just build inside the same machine as minikube which speeds up local experiments. diff --git a/site/content/en/docs/Tasks/caching.md b/site/content/en/docs/Tasks/caching.md new file mode 100644 index 0000000000..51b9d6d67b --- /dev/null +++ b/site/content/en/docs/Tasks/caching.md @@ -0,0 +1,42 @@ +--- +title: "Caching images" +date: 2019-08-05 +weight: 1 +description: > + How to cache arbitrary Docker images +--- + +## Overview + +For offline use and performance reasons, minikube caches required Docker images onto the local file system. Developers may find it useful to add their own images to this cache for local development. + +## Adding an image + +To add the ubuntu 16.04 image to minikube's image cache: + +```shell +minikube cache add ubuntu:16.04 +``` + +The add command will store the requested image to `$MINIKUBE_HOME/cache/images`, and load it into the VM's container runtime environment next time `minikube start` is called. + +## Listing images + +To display images you have added to the cache: + +```shell +minikube cache list +``` + +This listing will not include the images which are built-in to minikube. + +## Deleting an image + +```shell +minikube cache delete +``` + +### Additional Information + +* [Reference: Disk Cache]({{< ref "/docs/reference/disk_cache.md" >}}) +* [Reference: cache command]({{< ref "/docs/reference/commands/cache.md" >}}) \ No newline at end of file From a817bffab1752e8956f68a88cf2548f2dc2932e9 Mon Sep 17 00:00:00 2001 From: Sharif Elgamal Date: Mon, 12 Aug 2019 14:42:11 -0700 Subject: [PATCH 067/115] Remove all minikube dependencies from drivers (#4933) * Remove all minikube dependencies in driver code * removing all default config * okay we need some defaults * code comments * hyperkit builds now * sleep for an appropriate amount of time * remove constant in favor of string * try goproxy for travis * try goproxy for travis * try goproxy for travis * let's not try goproxy for now * let's try goproxy once again * maybe use the correct url for the proxy * fix go mod --- Makefile | 14 +++++++------- pkg/drivers/hyperkit/driver.go | 33 +++++++++++++++++++++++++-------- pkg/drivers/kvm/kvm.go | 12 +----------- 3 files changed, 33 insertions(+), 26 deletions(-) diff --git a/Makefile b/Makefile index 4373a61812..691469ae73 100755 --- a/Makefile +++ b/Makefile @@ -375,7 +375,7 @@ out/minikube-installer.exe: out/minikube-windows-amd64.exe mv out/windows_tmp/minikube-installer.exe out/minikube-installer.exe rm -rf out/windows_tmp -out/docker-machine-driver-hyperkit: pkg/minikube/translate/translations.go +out/docker-machine-driver-hyperkit: ifeq ($(MINIKUBE_BUILD_IN_DOCKER),y) $(call DOCKER,$(HYPERKIT_BUILD_IMAGE),CC=o64-clang CXX=o64-clang++ /usr/bin/make $@) else @@ -441,18 +441,18 @@ release-minikube: out/minikube checksum gsutil cp out/minikube-$(GOOS)-$(GOARCH) $(MINIKUBE_UPLOAD_LOCATION)/$(MINIKUBE_VERSION)/minikube-$(GOOS)-$(GOARCH) gsutil cp out/minikube-$(GOOS)-$(GOARCH).sha256 $(MINIKUBE_UPLOAD_LOCATION)/$(MINIKUBE_VERSION)/minikube-$(GOOS)-$(GOARCH).sha256 -out/docker-machine-driver-kvm2: pkg/minikube/translate/translations.go +out/docker-machine-driver-kvm2: ifeq ($(MINIKUBE_BUILD_IN_DOCKER),y) docker inspect -f '{{.Id}} {{.RepoTags}}' $(KVM_BUILD_IMAGE) || $(MAKE) kvm-image $(call DOCKER,$(KVM_BUILD_IMAGE),/usr/bin/make $@ COMMIT=$(COMMIT)) # make extra sure that we are linking with the older version of libvirt (1.3.1) test "`strings $@ | grep '^LIBVIRT_[0-9]' | sort | tail -n 1`" = "LIBVIRT_1.2.9" else - go build \ - -installsuffix "static" \ - -ldflags="$(KVM2_LDFLAGS)" \ - -tags "libvirt.1.3.1 without_lxc" \ - -o $(BUILD_DIR)/docker-machine-driver-kvm2 \ + go build \ + -installsuffix "static" \ + -ldflags="$(KVM2_LDFLAGS)" \ + -tags "libvirt.1.3.1 without_lxc" \ + -o $(BUILD_DIR)/docker-machine-driver-kvm2 \ k8s.io/minikube/cmd/drivers/kvm endif chmod +X $@ diff --git a/pkg/drivers/hyperkit/driver.go b/pkg/drivers/hyperkit/driver.go index fac07583b1..e783da55da 100644 --- a/pkg/drivers/hyperkit/driver.go +++ b/pkg/drivers/hyperkit/driver.go @@ -40,9 +40,6 @@ import ( hyperkit "github.com/moby/hyperkit/go" "github.com/pkg/errors" pkgdrivers "k8s.io/minikube/pkg/drivers" - - "k8s.io/minikube/pkg/minikube/constants" - commonutil "k8s.io/minikube/pkg/util" ) const ( @@ -77,7 +74,6 @@ func NewDriver(hostName, storePath string) *Driver { SSHUser: "docker", }, CommonDriver: &pkgdrivers.CommonDriver{}, - DiskSize: commonutil.CalculateSizeInMB(constants.DefaultDiskSize), } } @@ -121,7 +117,7 @@ func (d *Driver) Create() error { // DriverName returns the name of the driver func (d *Driver) DriverName() string { - return constants.DriverHyperkit + return "hyperkit" } // GetSSHHostname returns hostname for use with ssh @@ -227,7 +223,7 @@ func (d *Driver) Start() error { h.Memory = d.Memory h.UUID = d.UUID // This should stream logs from hyperkit, but doesn't seem to work. - logger := golog.New(os.Stderr, constants.DriverHyperkit, golog.LstdFlags) + logger := golog.New(os.Stderr, "hyperkit", golog.LstdFlags) h.SetLogger(logger) if vsockPorts, err := d.extractVSockPorts(); err != nil { @@ -269,12 +265,25 @@ func (d *Driver) Start() error { d.IPAddress, err = GetIPAddressByMACAddress(mac) if err != nil { - return &commonutil.RetriableError{Err: err} + return &tempError{err} } return nil } - if err := commonutil.RetryAfter(30, getIP, 2*time.Second); err != nil { + // Implement a retry loop without calling any minikube code + for i := 0; i < 30; i++ { + log.Debugf("Attempt %d", i) + err = getIP() + if err == nil { + break + } + if _, ok := err.(*tempError); !ok { + return err + } + time.Sleep(2 * time.Second) + } + + if err != nil { return fmt.Errorf("IP address never found in dhcp leases file %v", err) } log.Debugf("IP: %s", d.IPAddress) @@ -294,6 +303,14 @@ func (d *Driver) Start() error { return nil } +type tempError struct { + Err error +} + +func (t tempError) Error() string { + return "Temporary error: " + t.Err.Error() +} + //recoverFromUncleanShutdown searches for an existing hyperkit.pid file in //the machine directory. If it can't find it, a clean shutdown is assumed. //If it finds the pid file, it checks for a running hyperkit process with that pid diff --git a/pkg/drivers/kvm/kvm.go b/pkg/drivers/kvm/kvm.go index 76dac5b9fb..236fbd2167 100644 --- a/pkg/drivers/kvm/kvm.go +++ b/pkg/drivers/kvm/kvm.go @@ -25,10 +25,6 @@ import ( "syscall" "time" - "k8s.io/minikube/pkg/minikube/config" - "k8s.io/minikube/pkg/minikube/constants" - "k8s.io/minikube/pkg/util" - "github.com/docker/machine/libmachine/drivers" "github.com/docker/machine/libmachine/log" "github.com/docker/machine/libmachine/state" @@ -102,14 +98,8 @@ func NewDriver(hostName, storePath string) *Driver { SSHUser: "docker", }, CommonDriver: &pkgdrivers.CommonDriver{}, - Boot2DockerURL: constants.DefaultISOURL, - CPU: constants.DefaultCPUS, - DiskSize: util.CalculateSizeInMB(constants.DefaultDiskSize), - Memory: util.CalculateSizeInMB(constants.DefaultMemorySize), PrivateNetwork: defaultPrivateNetworkName, Network: defaultNetworkName, - DiskPath: filepath.Join(constants.GetMinipath(), "machines", config.GetMachineName(), fmt.Sprintf("%s.rawdisk", config.GetMachineName())), - ISO: filepath.Join(constants.GetMinipath(), "machines", config.GetMachineName(), "boot2docker.iso"), ConnectionURI: qemusystem, } } @@ -224,7 +214,7 @@ func (d *Driver) GetSSHHostname() (string, error) { // DriverName returns the name of the driver func (d *Driver) DriverName() string { - return constants.DriverKvm2 + return "kvm2" } // Kill stops a host forcefully, including any containers that we are managing. From f2acb4a33e85b6d133a2676c5834798c4ae68267 Mon Sep 17 00:00:00 2001 From: Thomas Stromberg Date: Mon, 12 Aug 2019 14:51:41 -0700 Subject: [PATCH 068/115] Update code references to new documentation URL's --- CHANGELOG.md | 2 +- cmd/minikube/cmd/start.go | 4 ++-- hack/conformance_tests.sh | 2 +- pkg/drivers/kvm/gpu.go | 6 +++--- pkg/drivers/none/none.go | 2 +- pkg/minikube/cluster/cluster.go | 2 +- pkg/minikube/constants/constants.go | 2 +- pkg/minikube/problem/err_map.go | 18 +++++++++--------- site/content/en/_index.html | 8 ++++---- site/content/en/docs/Overview/_index.md | 18 +++++++++--------- site/content/en/docs/Tasks/docker_registry.md | 4 ++-- .../en/docs/Tutorials/openid_connect_auth.md | 2 +- translations/fr-FR.json | 4 ++-- translations/zh-CN.json | 4 ++-- 14 files changed, 39 insertions(+), 39 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dbd81b160a..abe7938e8c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1133,7 +1133,7 @@ Huge Thank You for this release to our contributors: * Added a `minikube dashboard` command to open the Kubernetes Dashboard. * Updated Docker to version 1.11.1. * Updated Kubernetes components to v1.3.0-alpha.5-330-g760c563. -* Generated documentation for all commands. Documentation [is here](https://github.com/kubernetes/minikube/blob/master/docs/minikube.md). +* Generated documentation for all commands. Documentation [is here](https://minikube.sigs.k8s.io/docs/). ## Version 0.2.0 - 6/3/2016 diff --git a/cmd/minikube/cmd/start.go b/cmd/minikube/cmd/start.go index 338b838b00..2fe85c9a1b 100644 --- a/cmd/minikube/cmd/start.go +++ b/cmd/minikube/cmd/start.go @@ -686,7 +686,7 @@ func prepareNone(vmDriver string) { out.T(out.Empty, "") out.WarningT("The 'none' driver provides limited isolation and may reduce system security and reliability.") out.WarningT("For more information, see:") - out.T(out.URL, "https://github.com/kubernetes/minikube/blob/master/docs/vmdriver-none.md") + out.T(out.URL, "https://minikube.sigs.k8s.io/docs/reference/drivers/none/") out.T(out.Empty, "") } @@ -749,7 +749,7 @@ func validateNetwork(h *host.Host) string { ipExcluded := proxy.IsIPExcluded(ip) // Skip warning if minikube ip is already in NO_PROXY k = strings.ToUpper(k) // for http_proxy & https_proxy if (k == "HTTP_PROXY" || k == "HTTPS_PROXY") && !ipExcluded && !warnedOnce { - out.WarningT("You appear to be using a proxy, but your NO_PROXY environment does not include the minikube IP ({{.ip_address}}). Please see https://github.com/kubernetes/minikube/blob/master/docs/http_proxy.md for more details", out.V{"ip_address": ip}) + out.WarningT("You appear to be using a proxy, but your NO_PROXY environment does not include the minikube IP ({{.ip_address}}). Please see https://minikube.sigs.k8s.io/docs/reference/networking/proxy/ for more details", out.V{"ip_address": ip}) warnedOnce = true } } diff --git a/hack/conformance_tests.sh b/hack/conformance_tests.sh index eb1564e58e..cff11af0a3 100755 --- a/hack/conformance_tests.sh +++ b/hack/conformance_tests.sh @@ -56,7 +56,7 @@ name: minikube version: ${version} website_url: https://github.com/kubernetes/minikube repo_url: https://github.com/kubernetes/minikube -documentation_url: https://github.com/kubernetes/minikube/blob/master/docs/README.md +documentation_url: https://minikube.sigs.k8s.io/docs/ product_logo_url: https://raw.githubusercontent.com/kubernetes/minikube/master/images/logo/logo.svg type: installer description: minikube runs a local Kubernetes cluster on macOS, Linux, and Windows. diff --git a/pkg/drivers/kvm/gpu.go b/pkg/drivers/kvm/gpu.go index 6c9043de5b..550846622e 100644 --- a/pkg/drivers/kvm/gpu.go +++ b/pkg/drivers/kvm/gpu.go @@ -110,7 +110,7 @@ func getPassthroughableNVIDIADevices() ([]string, error) { return []string{}, fmt.Errorf("error reading %q: %v", sysKernelIOMMUGroupsPath, err) } if len(iommuGroups) == 0 { - return []string{}, fmt.Errorf("no IOMMU groups found at %q. Make sure your host supports IOMMU. See instructions at https://github.com/kubernetes/minikube/blob/master/docs/gpu.md", sysKernelIOMMUGroupsPath) + return []string{}, fmt.Errorf("no IOMMU groups found at %q. Make sure your host supports IOMMU. See instructions at https://minikube.sigs.k8s.io/docs/tutorials/nvidia_gpu/", sysKernelIOMMUGroupsPath) } // Get list of PCI devices @@ -146,7 +146,7 @@ func getPassthroughableNVIDIADevices() ([]string, error) { return []string{}, fmt.Errorf("no NVIDIA devices found") } if len(unboundNVIDIADevices) == 0 { - return []string{}, fmt.Errorf("some NVIDIA devices were found but none of them were unbound. See instructions at https://github.com/kubernetes/minikube/blob/master/docs/gpu.md") + return []string{}, fmt.Errorf("some NVIDIA devices were found but none of them were unbound. See instructions at https://minikube.sigs.k8s.io/docs/tutorials/nvidia_gpu/") } // Make sure all the unbound devices are in IOMMU groups that only contain unbound devices. @@ -161,7 +161,7 @@ func getPassthroughableNVIDIADevices() ([]string, error) { } } if len(isolatedNVIDIADevices) == 0 { - return []string{}, fmt.Errorf("some unbound NVIDIA devices were found but they had other devices in their IOMMU group that were bound. See instructoins at https://github.com/kubernetes/minikube/blob/master/docs/gpu.md") + return []string{}, fmt.Errorf("some unbound NVIDIA devices were found but they had other devices in their IOMMU group that were bound. See instructoins at https://minikube.sigs.k8s.io/docs/tutorials/nvidia_gpu/") } return isolatedNVIDIADevices, nil diff --git a/pkg/drivers/none/none.go b/pkg/drivers/none/none.go index dd18634d4a..d4078fded3 100644 --- a/pkg/drivers/none/none.go +++ b/pkg/drivers/none/none.go @@ -44,7 +44,7 @@ var cleanupPaths = []string{ } // Driver is a driver designed to run kubeadm w/o VM management, and assumes systemctl. -// https://github.com/kubernetes/minikube/blob/master/docs/vmdriver-none.md +// https://minikube.sigs.k8s.io/docs/reference/drivers/none/ type Driver struct { *drivers.BaseDriver *pkgdrivers.CommonDriver diff --git a/pkg/minikube/cluster/cluster.go b/pkg/minikube/cluster/cluster.go index cbf82a9947..0e198e0b6e 100644 --- a/pkg/minikube/cluster/cluster.go +++ b/pkg/minikube/cluster/cluster.go @@ -414,7 +414,7 @@ func createHost(api libmachine.API, config cfg.MachineConfig) (*host.Host, error if config.VMDriver == constants.DriverVmwareFusion && viper.GetBool(cfg.ShowDriverDeprecationNotification) { out.WarningT(`The vmwarefusion driver is deprecated and support for it will be removed in a future release. Please consider switching to the new vmware unified driver, which is intended to replace the vmwarefusion driver. - See https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#vmware-unified-driver for more information. + See https://minikube.sigs.k8s.io/docs/reference/drivers/vmware/ for more information. To disable this message, run [minikube config set ShowDriverDeprecationNotification false]`) } if !localDriver(config.VMDriver) { diff --git a/pkg/minikube/constants/constants.go b/pkg/minikube/constants/constants.go index b2cbd0680d..eea5593fe7 100644 --- a/pkg/minikube/constants/constants.go +++ b/pkg/minikube/constants/constants.go @@ -424,5 +424,5 @@ const ( const ( // DriverDocumentation the documentation of the KVM driver - DriverDocumentation = "https://github.com/kubernetes/minikube/blob/master/docs/drivers.md" + DriverDocumentation = "https://minikube.sigs.k8s.io/docs/reference/drivers/" ) diff --git a/pkg/minikube/problem/err_map.go b/pkg/minikube/problem/err_map.go index 1ef7e97365..ac69ea3d32 100644 --- a/pkg/minikube/problem/err_map.go +++ b/pkg/minikube/problem/err_map.go @@ -33,7 +33,7 @@ var vmProblems = map[string]match{ "HYPERKIT_NO_IP": { Regexp: re(`IP address never found in dhcp leases file Temporary Error: Could not find an IP address for`), Advice: "Install the latest minikube hyperkit driver, and run 'minikube delete'", - URL: "https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#hyperkit-driver", + URL: "https://minikube.sigs.k8s.io/docs/reference/drivers/hyperkit/", Issues: []int{1926, 4206}, }, "VBOX_NOT_FOUND": { @@ -89,12 +89,12 @@ var vmProblems = map[string]match{ "KVM2_NOT_FOUND": { Regexp: re(`Driver "kvm2" not found. Do you have the plugin binary .* accessible in your PATH`), Advice: "Please install the minikube kvm2 VM driver, or select an alternative --vm-driver", - URL: "https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#kvm2-driver", + URL: "https://minikube.sigs.k8s.io/docs/reference/drivers/kvm2/", }, "HYPERKIT_NOT_FOUND": { Regexp: re(`Driver "hyperkit" not found. Do you have the plugin binary .* accessible in your PATH?`), Advice: "Please install the minikube hyperkit VM driver, or select an alternative --vm-driver", - URL: "https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#hyperkit-driver", + URL: "https://minikube.sigs.k8s.io/docs/reference/drivers/hyperkit/", }, "KVM2_RESTART_NO_IP": { Regexp: re(`Error starting stopped host: Machine didn't return an IP after 120 seconds`), @@ -104,7 +104,7 @@ var vmProblems = map[string]match{ "KVM2_START_NO_IP": { Regexp: re(`Error in driver during machine creation: Machine didn't return an IP after 120 seconds`), Advice: "Install the latest kvm2 driver and run 'virt-host-validate'", - URL: "https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#kvm2-driver", + URL: "https://minikube.sigs.k8s.io/docs/reference/drivers/kvm2/", Issues: []int{4249, 3566}, }, "KVM2_NETWORK_DEFINE_XML": { @@ -127,17 +127,17 @@ var vmProblems = map[string]match{ "KVM_CONNECTION_ERROR": { Regexp: re(`error connecting to libvirt socket`), Advice: "Have you set up libvirt correctly?", - URL: "https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#kvm2-driver", + URL: "https://minikube.sigs.k8s.io/docs/reference/drivers/kvm2/", }, "DRIVER_CRASHED": { Regexp: re(`Error attempting to get plugin server address for RPC`), Advice: "The VM driver exited with an error, and may be corrupt. Run 'minikube start' with --alsologtostderr -v=8 to see the error", - URL: "https://github.com/kubernetes/minikube/blob/master/docs/drivers.md", + URL: "https://minikube.sigs.k8s.io/docs/reference/drivers/", }, "DRIVER_EXITED": { Regexp: re(`Unable to start VM: create: creating: exit status 1`), Advice: "Re-run 'minikube start' with --alsologtostderr -v=8 to see the VM driver error message", - URL: "https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#troubleshooting", + URL: "https://minikube.sigs.k8s.io/docs/reference/drivers/#troubleshooting", }, "VM_BOOT_FAILED_HYPERV_ENABLED": { Regexp: re(`VirtualBox won't boot a 64bits VM when Hyper-V is activated`), @@ -173,7 +173,7 @@ var vmProblems = map[string]match{ } // proxyDoc is the URL to proxy documentation -const proxyDoc = "https://github.com/kubernetes/minikube/blob/master/docs/http_proxy.md" +const proxyDoc = "https://minikube.sigs.k8s.io/docs/reference/networking/proxy/" // netProblems are network related problems. var netProblems = map[string]match{ @@ -262,7 +262,7 @@ var osProblems = map[string]match{ "SYSTEMCTL_EXIT_1": { Regexp: re(`Failed to enable container runtime: .*sudo systemctl start docker: exit status 1`), Advice: "If using the none driver, ensure that systemctl is installed", - URL: "https://github.com/kubernetes/minikube/blob/master/docs/vmdriver-none.md", + URL: "https://minikube.sigs.k8s.io/docs/reference/drivers/none/", Issues: []int{2704}, }, } diff --git a/site/content/en/_index.html b/site/content/en/_index.html index 12d8977f91..fbea229abc 100644 --- a/site/content/en/_index.html +++ b/site/content/en/_index.html @@ -57,10 +57,10 @@ A single command away from reproducing your production environment, from the com {{< blocks/section color="white" >}} {{% blocks/feature icon="fa-star" title="Developer focused" %}} -- [LoadBalancer emulation](https://github.com/kubernetes/minikube/blob/master/docs/tunnel.md) -- [Addons Marketplace](https://github.com/kubernetes/minikube/blob/master/docs/addons.md) -- [Integrated Dashboard](https://github.com/kubernetes/minikube/blob/master/docs/dashboard.md) -- [GPU support](https://github.com/kubernetes/minikube/blob/master/docs/gpu.md) +- [LoadBalancer emulation](https://minikube.sigs.k8s.io/docs/tasks/loadbalancer/) +- [Addons Marketplace](https://minikube.sigs.k8s.io/docs/tasks/addons/) +- [Integrated Dashboard](https://minikube.sigs.k8s.io/docs/tasks/dashboard/) +- [GPU support](https://minikube.sigs.k8s.io/docs/tutorials/nvidia_gpu/) - Reusable Docker daemon {{% /blocks/feature %}} diff --git a/site/content/en/docs/Overview/_index.md b/site/content/en/docs/Overview/_index.md index e173cd330e..cd04ee65be 100644 --- a/site/content/en/docs/Overview/_index.md +++ b/site/content/en/docs/Overview/_index.md @@ -8,25 +8,25 @@ description: > minikube implements a local Kubernetes cluster on macOS, Linux, and Windows. -minikube's [primary goals](https://github.com/kubernetes/minikube/blob/master/docs/contributors/principles.md) are to be the best tool for local Kubernetes application development and to support all Kubernetes features that fit. +minikube's [primary goals](https://minikube.sigs.k8s.io/docs/concepts/principles/) are to be the best tool for local Kubernetes application development and to support all Kubernetes features that fit. minikube runs the latest stable release of Kubernetes, with support for standard Kubernetes features like: -* [LoadBalancer](https://github.com/kubernetes/minikube/blob/master/docs/tunnel.md) - using `minikube tunnel` +* [LoadBalancer](https://minikube.sigs.k8s.io/docs/tasks/loadbalancer/) - using `minikube tunnel` * Multi-cluster - using `minikube start -p ` * NodePorts - using `minikube service` -* [Persistent Volumes](https://github.com/kubernetes/minikube/blob/master/docs/persistent_volumes.md) +* [Persistent Volumes](https://minikube.sigs.k8s.io/docs/reference/persistent_volumes/) * Ingress * RBAC -* [Dashboard](https://github.com/kubernetes/minikube/blob/master/docs/dashboard.md) - `minikube dashboard` -* [Container runtimes](https://github.com/kubernetes/minikube/blob/master/docs/alternative_runtimes.md) - `start --container-runtime` -* [Configure apiserver and kubelet options](https://github.com/kubernetes/minikube/blob/master/docs/configuring_kubernetes.md) via command-line flags +* [Dashboard](https://minikube.sigs.k8s.io/docs/tasks/dashboard/) - `minikube dashboard` +* [Container runtimes](https://minikube.sigs.k8s.io/docs/reference/runtimes/) - `start --container-runtime` +* [Configure apiserver and kubelet options](https://minikube.sigs.k8s.io/docs/reference/configuration/kubernetes/) via command-line flags As well as developer-friendly features: -* [Addons](https://github.com/kubernetes/minikube/blob/master/docs/addons.md) - a marketplace for developers to share configurations for running services on minikube -* [GPU support](https://github.com/kubernetes/minikube/blob/master/docs/gpu.md) - for machine learning -* [Filesystem mounts](https://github.com/kubernetes/minikube/blob/master/docs/host_folder_mount.md) +* [Addons](https://minikube.sigs.k8s.io/docs/tasks/addons/) - a marketplace for developers to share configurations for running services on minikube +* [GPU support](https://minikube.sigs.k8s.io/docs/tutorials/nvidia_gpu/) - for machine learning +* [Filesystem mounts](https://minikube.sigs.k8s.io/docs/tasks/mount/) * Automatic failure analysis ## Why do I want it? diff --git a/site/content/en/docs/Tasks/docker_registry.md b/site/content/en/docs/Tasks/docker_registry.md index fe16b6831d..a3c08c5ca3 100644 --- a/site/content/en/docs/Tasks/docker_registry.md +++ b/site/content/en/docs/Tasks/docker_registry.md @@ -11,11 +11,11 @@ As an alternative to [reusing the Docker daemon](docker_daemon.md), you may enab Steps are as follows: -For illustration purpose, we will assume that minikube VM has one of the ip from `192.168.39.0/24` subnet. If you have not overridden these subnets as per [networking guide](https://github.com/kubernetes/minikube/blob/master/docs/networking.md), you can find out default subnet being used by minikube for a specific OS and driver combination [here](https://github.com/kubernetes/minikube/blob/dfd9b6b83d0ca2eeab55588a16032688bc26c348/pkg/minikube/cluster/cluster.go#L408) which is subject to change. Replace `192.168.39.0/24` with appropriate values for your environment wherever applicable. +For illustration purpose, we will assume that minikube VM has one of the ip from `192.168.39.0/24` subnet. If you have not overridden these subnets as per [networking guide](https://minikube.sigs.k8s.io/docs/reference/networking/), you can find out default subnet being used by minikube for a specific OS and driver combination [here](https://github.com/kubernetes/minikube/blob/dfd9b6b83d0ca2eeab55588a16032688bc26c348/pkg/minikube/cluster/cluster.go#L408) which is subject to change. Replace `192.168.39.0/24` with appropriate values for your environment wherever applicable. Ensure that docker is configured to use `192.168.39.0/24` as insecure registry. Refer [here](https://docs.docker.com/registry/insecure/) for instructions. -Ensure that `192.168.39.0/24` is enabled as insecure registry in minikube. Refer [here](https://github.com/kubernetes/minikube/blob/master/docs/insecure_registry.md) for instructions.. +Ensure that `192.168.39.0/24` is enabled as insecure registry in minikube. Refer [here](https://minikube.sigs.k8s.io/docs/tasks/registry/insecure/) for instructions.. Enable minikube registry addon: diff --git a/site/content/en/docs/Tutorials/openid_connect_auth.md b/site/content/en/docs/Tutorials/openid_connect_auth.md index 121af1281c..46fbe28968 100644 --- a/site/content/en/docs/Tutorials/openid_connect_auth.md +++ b/site/content/en/docs/Tutorials/openid_connect_auth.md @@ -13,7 +13,7 @@ Read more about OpenID Connect Authentication for Kubernetes here: Date: Mon, 12 Aug 2019 15:16:38 -0700 Subject: [PATCH 069/115] Fix rough edges in documentation presentation --- site/config.toml | 10 +++++----- site/content/en/docs/Overview/_index.md | 5 ++--- site/content/en/docs/Reference/_index.md | 2 +- site/content/en/docs/Tasks/_index.md | 2 +- site/content/en/docs/Tutorials/_index.md | 2 +- 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/site/config.toml b/site/config.toml index a5f1df2913..e90db5f754 100644 --- a/site/config.toml +++ b/site/config.toml @@ -71,12 +71,12 @@ privacy_policy = "" version_menu = "Releases" # Repository configuration (URLs for in-page links to opening issues and suggesting changes) -github_repo = "http://github.com/minikube/kubernetes" +github_repo = "http://github.com/kubernetes/minikube" # An optional link to a related project repo. For example, the sibling repository where your product code lives. github_project_repo = "" # Specify a value here if your content directory is not in your repo's root directory -github_subdir = "/site/content" +github_subdir = "site" # Google Custom Search Engine ID. Remove or comment out to disable search. gcs_engine_id = "005331096405080631692:s7c4yfpw9sy" @@ -84,7 +84,7 @@ gcs_engine_id = "005331096405080631692:s7c4yfpw9sy" # User interface configuration [params.ui] # Enable to show the side bar menu in its compact state. -sidebar_menu_compact = false +sidebar_menu_compact = true # Set to true to disable breadcrumb navigation. breadcrumb_disable = false # Set to true to hide the sidebar search box (the top nav search box will still be displayed if search is enabled) @@ -99,8 +99,8 @@ navbar_logo = true [params.ui.feedback] enable = true # The responses that the user sees after clicking "yes" (the page was helpful) or "no" (the page was not helpful). -yes = 'Glad to hear it! Please tell us how we can improve.' -no = 'Sorry to hear that. Please tell us how we can improve.' +yes = 'Glad to hear it! Please tell us how we can improve.' +no = 'Sorry to hear that. Please tell us how we can improve.' [params.links] # End user relevant links. These will show up on left side of footer and in the community page if you have one. diff --git a/site/content/en/docs/Overview/_index.md b/site/content/en/docs/Overview/_index.md index e173cd330e..ac599a25fc 100644 --- a/site/content/en/docs/Overview/_index.md +++ b/site/content/en/docs/Overview/_index.md @@ -40,11 +40,10 @@ If you would like to develop Kubernetes applications: Then minikube is for you. * **What is it good for?** Developing local Kubernetes applications -* **What is it not good for?** Production deployments of Kubernetes applications +* **What is it not good for?** Production Kubernetes deployments * **What is it *not yet* good for?** Environments which do not allow VM's ## Where should I go next? -* [Getting Started](/getting-started/): Get started with minikube +* [Getting Started](/start/): Get started with minikube * [Examples](/examples/): Check out some minikube examples! -* \ No newline at end of file diff --git a/site/content/en/docs/Reference/_index.md b/site/content/en/docs/Reference/_index.md index 15c29ef5b8..bfe11dd2b6 100644 --- a/site/content/en/docs/Reference/_index.md +++ b/site/content/en/docs/Reference/_index.md @@ -1,7 +1,7 @@ --- title: "Reference" linkTitle: "Reference" -weight: 3 +weight: 5 description: > Low level reference docs --- diff --git a/site/content/en/docs/Tasks/_index.md b/site/content/en/docs/Tasks/_index.md index 31ef743fc0..b5a2e67ad4 100755 --- a/site/content/en/docs/Tasks/_index.md +++ b/site/content/en/docs/Tasks/_index.md @@ -1,7 +1,7 @@ --- title: "Core Tasks" linkTitle: "Core Tasks" -weight: 6 +weight: 4 date: 2017-01-05 description: > What can you do with minikube? diff --git a/site/content/en/docs/Tutorials/_index.md b/site/content/en/docs/Tutorials/_index.md index edffedf46a..60e07fef45 100755 --- a/site/content/en/docs/Tutorials/_index.md +++ b/site/content/en/docs/Tutorials/_index.md @@ -1,7 +1,7 @@ --- title: "Tutorials" linkTitle: "Tutorials" -weight: 8 +weight: 4 date: 2017-01-04 description: > Contributed end-to-end tutorials using minikube From 4f1dd95b56fa06fbcd824255b0a01439269884a4 Mon Sep 17 00:00:00 2001 From: Ramiro Berrelleza Date: Tue, 13 Aug 2019 00:39:03 +0200 Subject: [PATCH 070/115] Typo in okteto's name (#5051) --- site/content/en/docs/Tasks/sync.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/content/en/docs/Tasks/sync.md b/site/content/en/docs/Tasks/sync.md index ad4cc0eafb..fc66a5822a 100644 --- a/site/content/en/docs/Tasks/sync.md +++ b/site/content/en/docs/Tasks/sync.md @@ -34,5 +34,5 @@ With a bit of work, one could setup [Syncthing](https://syncthing.net) between t If you are looking for a solution tuned for iterative application development, consider using a Kubernetes tool that is known to work well with minikube: - [Draft](https://draft.sh): see specific [minikube instructions](https://github.com/Azure/draft/blob/master/docs/install-minikube.md) -- [Oketo](https://github.com/okteto/okteto) +- [Okteto](https://github.com/okteto/okteto) - [Skaffold](http://github.com/ContainerTools/skaffold) From 2fae07d5c5423542b0c3633411db74d820ede696 Mon Sep 17 00:00:00 2001 From: Thomas Stromberg Date: Mon, 12 Aug 2019 18:24:37 -0700 Subject: [PATCH 071/115] Update to v1.3.1 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 691469ae73..6c6de03979 100755 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ # Bump these on release - and please check ISO_VERSION for correctness. VERSION_MAJOR ?= 1 VERSION_MINOR ?= 3 -VERSION_BUILD ?= 0 +VERSION_BUILD ?= 1 # Default to .0 for higher cache hit rates, as build increments typically don't require new ISO versions ISO_VERSION ?= v$(VERSION_MAJOR).$(VERSION_MINOR).0 From d2c60451b02e9fcecd9e9e8a0405757f176514e8 Mon Sep 17 00:00:00 2001 From: Thomas Stromberg Date: Mon, 12 Aug 2019 18:29:51 -0700 Subject: [PATCH 072/115] Add release notes for v1.3.1 --- CHANGELOG.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index abe7938e8c..5840a57e76 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,24 @@ # Release Notes +## Version 1.3.1 - 2019-08-13 + +* Update code references to point to new documentation site [#5052](https://github.com/kubernetes/minikube/pull/5052) +* Localization support for help text [#4814](https://github.com/kubernetes/minikube/pull/4814) +* Upgrade cheggaaa/pb from v1.0.27 to v3.0.1 [#5025](https://github.com/kubernetes/minikube/pull/5025) +* Restore --disable-driver-mounts flag [#5026](https://github.com/kubernetes/minikube/pull/5026) +* Fixed the template for dashboard output [#5004](https://github.com/kubernetes/minikube/pull/5004) +* Use a temp dest to atomically download the iso [#5000](https://github.com/kubernetes/minikube/pull/5000) + +Thank you to our merry band of contributors for assembling this last minute bug fix release. + +- Jituri, Pranav +- Medya Ghazizadeh +- Pranav Jituri +- Ramiro Berrelleza +- Sharif Elgamal +- Thomas Strömberg +- josedonizetti + ## Version 1.3.0 - 2019-08-05 * Added a new command: profile list [#4811](https://github.com/kubernetes/minikube/pull/4811) From ecf2c958e71f08d627e02636a10b705cbabe702e Mon Sep 17 00:00:00 2001 From: xieyanker Date: Tue, 13 Aug 2019 09:32:53 +0800 Subject: [PATCH 073/115] fix typo CrashloopBackoff->CrashLoopBackOff --- site/content/en/docs/Reference/Drivers/none.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/content/en/docs/Reference/Drivers/none.md b/site/content/en/docs/Reference/Drivers/none.md index d1a5300fa2..f9591bca67 100644 --- a/site/content/en/docs/Reference/Drivers/none.md +++ b/site/content/en/docs/Reference/Drivers/none.md @@ -55,7 +55,7 @@ As Kubernetes has full access to both your filesystem as well as your docker ima * `-p` (profiles) are unsupported: It is not possible to run more than one `--vm-driver=none` instance * Many `minikube` commands are not supported, such as: `dashboard`, `mount`, `ssh` * minikube with the `none` driver has a confusing permissions model, as some commands need to be run as root ("start"), and others by a regular user ("dashboard") -* CoreDNS detects resolver loop, goes into CrashloopBackoff - [#3511](https://github.com/kubernetes/minikube/issues/3511) +* CoreDNS detects resolver loop, goes into CrashLoopBackOff - [#3511](https://github.com/kubernetes/minikube/issues/3511) * Some versions of Linux have a version of docker that is newer then what Kubernetes expects. To overwrite this, run minikube with the following parameters: `sudo -E minikube start --vm-driver=none --kubernetes-version v1.11.8 --extra-config kubeadm.ignore-preflight-errors=SystemVerification` * [Full list of open 'none' driver issues](https://github.com/kubernetes/minikube/labels/co%2Fnone-driver) From d7e5301d75f20ef9753a8949a37dd08b935febcb Mon Sep 17 00:00:00 2001 From: minikube-bot Date: Tue, 13 Aug 2019 08:18:53 -0700 Subject: [PATCH 074/115] Update releases.json to include v1.3.1 --- deploy/minikube/releases.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/deploy/minikube/releases.json b/deploy/minikube/releases.json index 341097fae0..0c8c40075d 100644 --- a/deploy/minikube/releases.json +++ b/deploy/minikube/releases.json @@ -1,4 +1,12 @@ [ + { + "name": "v1.3.1", + "checksums": { + "darwin": "5947abe57fa390fcfd96849ac87fc9319f026d4b13f944b6beecc3615e3668be", + "linux": "057a4f4ca36ff51ecad59509d94d3694543b874949e805e2b79792ceef21f983", + "windows": "be1999452b166de72f946aac17ca7c40d53b8a5c8f59dad912c2413f7cc42563" + } + }, { "name": "v1.3.0", "checksums": { From 0176cc3433096cc9a911acb9674188b5d4127f3c Mon Sep 17 00:00:00 2001 From: Thomas Stromberg Date: Tue, 13 Aug 2019 08:39:10 -0700 Subject: [PATCH 075/115] Update docs to v1.3.1, fix start URL, checkoff roadmap item --- site/content/en/_index.html | 2 +- .../news/first-post/featured-sunset-get.png | Bin 387442 -> 0 bytes site/content/en/blog/news/first-post/index.md | 46 ---- site/content/en/blog/news/new-website.md | 12 + site/content/en/blog/news/second-post.md | 241 ------------------ .../in-depth-monoliths-detailed-spec.md | 241 ------------------ site/content/en/blog/releases/v1.13.1.md | 26 ++ .../en/docs/Contributing/roadmap.en.md | 2 +- 8 files changed, 40 insertions(+), 530 deletions(-) delete mode 100644 site/content/en/blog/news/first-post/featured-sunset-get.png delete mode 100644 site/content/en/blog/news/first-post/index.md create mode 100755 site/content/en/blog/news/new-website.md delete mode 100755 site/content/en/blog/news/second-post.md delete mode 100755 site/content/en/blog/releases/in-depth-monoliths-detailed-spec.md create mode 100755 site/content/en/blog/releases/v1.13.1.md diff --git a/site/content/en/_index.html b/site/content/en/_index.html index fbea229abc..4e385f34a7 100644 --- a/site/content/en/_index.html +++ b/site/content/en/_index.html @@ -15,7 +15,7 @@ resources:

Welcome to minikube!

Local Kubernetes, focused on application development & education

- + Get Started diff --git a/site/content/en/blog/news/first-post/featured-sunset-get.png b/site/content/en/blog/news/first-post/featured-sunset-get.png deleted file mode 100644 index db3373c0bfb39ce0d6707ac730766cf00c27f2de..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 387442 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