Merge branch 'master' of github.com:kubernetes/minikube into node-pkg

pull/6556/head
Sharif Elgamal 2020-02-04 17:29:31 -08:00
commit dc0be4aed6
No known key found for this signature in database
GPG Key ID: 23CC0225BD9FD702
84 changed files with 3215 additions and 2040 deletions

View File

@ -1,11 +1,10 @@
name: CI
on: [push]
on: [pull_request]
jobs:
docker_ubuntu:
runs-on: ubuntu-latest
docker_ubuntu_16_04:
runs-on: ubuntu-16.04
steps:
- uses: actions/checkout@v2
- name: build binaries
@ -13,15 +12,15 @@ jobs:
make minikube-linux-amd64
make e2e-linux-amd64
mkdir -p report
- name: run integration test
run: |
echo running docker driver intergration test on ubuntu
./out/e2e-linux-amd64 -minikube-start-args=--vm-driver=docker -expected-default-driver= -test.timeout=70m -test.v -binary=out/minikube-linux-amd64 2>&1 | tee ./report/testout.txt
- name: install gopogh
run: |
cd /tmp
GO111MODULE="on" go get github.com/medyagh/gopogh@v0.0.17 || true
cd -
- name: run integration test
run: |
mkdir -p /tmp/testhome
MINIKUBE_HOME=/tmp/testhome ./out/e2e-linux-amd64 -minikube-start-args=--vm-driver=docker -expected-default-driver= -test.timeout=70m -test.v -binary=out/minikube-linux-amd64 2>&1 | tee ./report/testout.txt
- name: generate gopogh report
run: |
export PATH=${PATH}:`go env GOPATH`/bin
@ -29,13 +28,37 @@ jobs:
gopogh -in ./report/testout.json -out ./report/testout.html -name "docker ubuntu" -repo github.com/kubernetes/minikube/ || true
- uses: actions/upload-artifact@v1
with:
name: docker_on_ubuntu_report
name: docker_on_ubuntu_16_04_report
path: report
docker_ubuntu_18_04:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: build binaries
run : |
make minikube-linux-amd64
make e2e-linux-amd64
mkdir -p report
- name: install gopogh
run: |
cd /tmp
GO111MODULE="on" go get github.com/medyagh/gopogh@v0.0.17 || true
cd -
- name: run integration test
run: |
mkdir -p /tmp/testhome
MINIKUBE_HOME=/tmp/testhome ./out/e2e-linux-amd64 -minikube-start-args=--vm-driver=docker -expected-default-driver= -test.timeout=70m -test.v -binary=out/minikube-linux-amd64 2>&1 | tee ./report/testout.txt
- name: generate gopogh report
run: |
export PATH=${PATH}:`go env GOPATH`/bin
go tool test2json -t < ./report/testout.txt > ./report/testout.json || true
gopogh -in ./report/testout.json -out ./report/testout.html -name "docker ubuntu" -repo github.com/kubernetes/minikube/ || true
- uses: actions/upload-artifact@v1
with:
name: docker_on_ubuntu_18_04_report
path: report
docker_macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: build binaries
@ -43,15 +66,20 @@ jobs:
make minikube-darwin-amd64
make e2e-darwin-amd64
mkdir -p report
- name: run integration test
- name: install docker
run: |
echo running docker driver intergration test on ubuntu
./out/e2e-darwin-amd64 -minikube-start-args=--vm-driver=docker -expected-default-driver= -test.timeout=70m -test.v -binary=out/minikube-darwin-amd64 2>&1 | tee ./report/testout.txt
brew install docker-machine docker || true
brew services start docker-machine || true
docker version || true
- name: install gopogh
run: |
cd /tmp
GO111MODULE="on" go get github.com/medyagh/gopogh@v0.0.17 || true
cd -
- name: run integration test
run: |
mkdir -p /tmp/testhome
MINIKUBE_HOME=/tmp/testhome ./out/e2e-darwin-amd64 -minikube-start-args=--vm-driver=docker -expected-default-driver= -test.timeout=70m -test.v -binary=./out/minikube-darwin-amd64 2>&1 | tee ./report/testout.txt
- name: generate gopogh report
run: |
export PATH=${PATH}:`go env GOPATH`/bin
@ -61,39 +89,8 @@ jobs:
with:
name: docker_on_macos_report
path: ./report
none_ubuntu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: build binaries
run : |
make minikube-linux-amd64
make e2e-linux-amd64
mkdir -p report
- name: run integration test
run: |
echo running docker driver intergration test on ubuntu
./out/e2e-linux-amd64 -minikube-start-args=--vm-driver=none -expected-default-driver= -test.timeout=70m -test.v -binary=out/minikube-linux-amd64 2>&1 | tee ./report/testout.txt
- name: install gopogh
run: |
cd /tmp
GO111MODULE="on" go get github.com/medyagh/gopogh@v0.0.17 || true
cd -
- name: generate gopogh report
run: |
export PATH=${PATH}:`go env GOPATH`/bin
go tool test2json -t < ./report/testout.txt > ./report/testout.json || true
gopogh -in ./report/testout.json -out ./report/testout.html -name "docker ubuntu" -repo github.com/kubernetes/minikube/ || true
- uses: actions/upload-artifact@v1
with:
name: none_on_ubuntu_latest_report
path: report
none_ubuntu16_04:
runs-on: ubuntu-16.04
steps:
- uses: actions/checkout@v2
- name: build binaries
@ -101,15 +98,15 @@ jobs:
make minikube-linux-amd64
make e2e-linux-amd64
mkdir -p report
- name: run integration test
run: |
echo running docker driver intergration test on ubuntu
./out/e2e-linux-amd64 -minikube-start-args=--vm-driver=none -expected-default-driver= -test.timeout=70m -test.v -binary=out/minikube-linux-amd64 2>&1 | tee ./report/testout.txt
- name: install gopogh
run: |
cd /tmp
GO111MODULE="on" go get github.com/medyagh/gopogh@v0.0.17 || true
cd -
- name: run integration test
run: |
mkdir -p /tmp/testhome
MINIKUBE_HOME=/tmp/testhome sudo -E ./out/e2e-linux-amd64 -minikube-start-args=--vm-driver=none -expected-default-driver= -test.timeout=70m -test.v -binary=out/minikube-linux-amd64 2>&1 | tee ./report/testout.txt
- name: generate gopogh report
run: |
export PATH=${PATH}:`go env GOPATH`/bin
@ -119,3 +116,29 @@ jobs:
with:
name: none_on_ubuntu_16_04
path: report
none_ubuntu_18_04:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: build binaries
run : |
make minikube-linux-amd64
make e2e-linux-amd64
- name: install gopogh
run: |
cd /tmp
GO111MODULE="on" go get github.com/medyagh/gopogh@v0.0.17 || true
cd -
- name: run integration test
run: |
mkdir -p /tmp/testhome
MINIKUBE_HOME=/tmp/testhome sudo -E ./out/e2e-linux-amd64 -minikube-start-args=--vm-driver=none -expected-default-driver= -test.timeout=70m -test.v -binary=out/minikube-linux-amd64 2>&1 | tee ./report/testout.txt
- name: generate gopogh report
run: |
export PATH=${PATH}:`go env GOPATH`/bin
go tool test2json -t < ./report/testout.txt > ./report/testout.json || true
gopogh -in ./report/testout.json -out ./report/testout.html -name "docker ubuntu" -repo github.com/kubernetes/minikube/ || true
- uses: actions/upload-artifact@v1
with:
name: none_on_ubuntu_latest_report
path: report

View File

@ -1,5 +1,30 @@
# Release Notes
## Version 1.7.0-beta.2 - 2020-01-31
* Add docker run-time for kic driver [#6436](https://github.com/kubernetes/minikube/pull/6436)
* Add addon enablement to start [#6440](https://github.com/kubernetes/minikube/pull/6440)
* Configure etcd and kube-proxy metrics to listen on minikube node IP [#6322](https://github.com/kubernetes/minikube/pull/6322)
* add container runtime info to profile list [#6409](https://github.com/kubernetes/minikube/pull/6409)
* Allow 'profiles list' to work even if a profile has no control plane [#6450](https://github.com/kubernetes/minikube/pull/6450)
* status: Explicitly state that the cluster does not exist [#6438](https://github.com/kubernetes/minikube/pull/6438)
* Do not use an arch suffix for the coredns name [#6243](https://github.com/kubernetes/minikube/pull/6243)
* Allow building storage-provisioner for other arch [#6257](https://github.com/kubernetes/minikube/pull/6257)
* Prevent registry-creds configure from failing when a secret does not exist. [#6380](https://github.com/kubernetes/minikube/pull/6380)
* improve checking modprob netfilter [#6427](https://github.com/kubernetes/minikube/pull/6427)
Huge thank you for this release towards our contributors:
- Anders Björklund
- Bjørn Harald Fotland
- Chance Zibolski
- Kim Bao Long
- Medya Ghazizadeh
- Priya Wadhwa
- Sharif Elgamal
- Thomas Strömberg
- akshay
## Version 1.7.0-beta.1 - 2020-01-24
* Add 'pause' command to freeze Kubernetes cluster [#5962](https://github.com/kubernetes/minikube/pull/5962)

View File

@ -15,7 +15,7 @@
# Bump these on release - and please check ISO_VERSION for correctness.
VERSION_MAJOR ?= 1
VERSION_MINOR ?= 7
VERSION_BUILD ?= 0-beta.1
VERSION_BUILD ?= 0-beta.2
RAW_VERSION=$(VERSION_MAJOR).$(VERSION_MINOR).${VERSION_BUILD}
VERSION ?= v$(RAW_VERSION)
@ -51,7 +51,7 @@ MINIKUBE_RELEASES_URL=https://github.com/kubernetes/minikube/releases/download
KERNEL_VERSION ?= 4.19.88
# latest from https://github.com/golangci/golangci-lint/releases
GOLINT_VERSION ?= v1.21.0
GOLINT_VERSION ?= v1.23.2
# Limit number of default jobs, to avoid the CI builds running out of memory
GOLINT_JOBS ?= 4
# see https://github.com/golangci/golangci-lint#memory-usage-of-golangci-lint
@ -81,10 +81,16 @@ BUILD_OS := $(shell uname -s)
SHA512SUM=$(shell command -v sha512sum || echo "shasum -a 512")
STORAGE_PROVISIONER_TAG := v1.8.1
# TODO: multi-arch manifest
ifeq ($(GOARCH),amd64)
STORAGE_PROVISIONER_IMAGE ?= $(REGISTRY)/storage-provisioner:$(STORAGE_PROVISIONER_TAG)
else
STORAGE_PROVISIONER_IMAGE ?= $(REGISTRY)/storage-provisioner-$(GOARCH):$(STORAGE_PROVISIONER_TAG)
endif
# Set the version information for the Kubernetes servers
MINIKUBE_LDFLAGS := -X k8s.io/minikube/pkg/version.version=$(VERSION) -X k8s.io/minikube/pkg/version.isoVersion=$(ISO_VERSION) -X k8s.io/minikube/pkg/version.isoPath=$(ISO_BUCKET) -X k8s.io/minikube/pkg/version.gitCommitID=$(COMMIT)
PROVISIONER_LDFLAGS := "$(MINIKUBE_LDFLAGS) -s -w"
PROVISIONER_LDFLAGS := "-X k8s.io/minikube/pkg/storage.version=$(STORAGE_PROVISIONER_TAG) -s -w"
MINIKUBEFILES := ./cmd/minikube/
HYPERKIT_FILES := ./cmd/drivers/hyperkit
@ -368,6 +374,9 @@ mdlint:
out/docs/minikube.md: $(shell find "cmd") $(shell find "pkg/minikube/constants") pkg/minikube/assets/assets.go pkg/minikube/translate/translations.go
go run -ldflags="$(MINIKUBE_LDFLAGS)" -tags gendocs hack/help_text/gen_help_text.go
deb_version:
@echo $(DEB_VERSION)
out/minikube_$(DEB_VERSION).deb: out/minikube_$(DEB_VERSION)-0_amd64.deb
cp $< $@
@ -381,6 +390,9 @@ out/minikube_$(DEB_VERSION)-0_%.deb: out/minikube-linux-%
fakeroot dpkg-deb --build out/minikube_$(DEB_VERSION) $@
rm -rf out/minikube_$(DEB_VERSION)
rpm_version:
@echo $(RPM_VERSION)
out/minikube-$(RPM_VERSION).rpm: out/minikube-$(RPM_VERSION)-0.x86_64.rpm
cp $< $@
@ -472,31 +484,30 @@ $(ISO_BUILD_IMAGE): deploy/iso/minikube-iso/Dockerfile
@echo ""
@echo "$(@) successfully built"
out/storage-provisioner:
CGO_ENABLED=0 GOOS=linux go build -o $@ -ldflags=$(PROVISIONER_LDFLAGS) cmd/storage-provisioner/main.go
out/storage-provisioner: out/storage-provisioner-$(GOARCH)
cp $< $@
out/storage-provisioner-%: cmd/storage-provisioner/main.go pkg/storage/storage_provisioner.go
ifeq ($(MINIKUBE_BUILD_IN_DOCKER),y)
$(call DOCKER,$(BUILD_IMAGE),/usr/bin/make $@)
else
CGO_ENABLED=0 GOOS=linux GOARCH=$* go build -o $@ -ldflags=$(PROVISIONER_LDFLAGS) cmd/storage-provisioner/main.go
endif
.PHONY: storage-provisioner-image
storage-provisioner-image: out/storage-provisioner ## Build storage-provisioner docker image
ifeq ($(GOARCH),amd64)
docker build -t $(REGISTRY)/storage-provisioner:$(STORAGE_PROVISIONER_TAG) -f deploy/storage-provisioner/Dockerfile .
else
docker build -t $(REGISTRY)/storage-provisioner-$(GOARCH):$(STORAGE_PROVISIONER_TAG) -f deploy/storage-provisioner/Dockerfile-$(GOARCH) .
endif
storage-provisioner-image: out/storage-provisioner-$(GOARCH) ## Build storage-provisioner docker image
docker build -t $(STORAGE_PROVISIONER_IMAGE) -f deploy/storage-provisioner/Dockerfile --build-arg arch=$(GOARCH) .
.PHONY: kic-base-image
kic-base-image: ## builds the base image used for kic.
docker rmi -f $(REGISTRY)/kicbase:v0.0.2-snapshot || true
docker build -f ./hack/images/kicbase.Dockerfile -t $(REGISTRY)/kicbase:v0.0.2-snapshot --build-arg COMMIT_SHA=${VERSION}-$(COMMIT) .
docker rmi -f $(REGISTRY)/kicbase:v0.0.5-snapshot || true
docker build -f ./hack/images/kicbase.Dockerfile -t $(REGISTRY)/kicbase:v0.0.5-snapshot --build-arg COMMIT_SHA=${VERSION}-$(COMMIT) .
.PHONY: push-storage-provisioner-image
push-storage-provisioner-image: storage-provisioner-image ## Push storage-provisioner docker image using gcloud
ifeq ($(GOARCH),amd64)
gcloud docker -- push $(REGISTRY)/storage-provisioner:$(STORAGE_PROVISIONER_TAG)
else
gcloud docker -- push $(REGISTRY)/storage-provisioner-$(GOARCH):$(STORAGE_PROVISIONER_TAG)
endif
gcloud docker -- push $(STORAGE_PROVISIONER_IMAGE)
.PHONY: out/gvisor-addon
out/gvisor-addon: pkg/minikube/assets/assets.go pkg/minikube/translate/translations.go ## Build gvisor addon
@ -520,13 +531,23 @@ release-minikube: out/minikube checksum ## Minikube release
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:
out/docker-machine-driver-kvm2: out/docker-machine-driver-kvm2-amd64
cp $< $@
out/docker-machine-driver-kvm2-x86_64: out/docker-machine-driver-kvm2-amd64
cp $< $@
out/docker-machine-driver-kvm2-aarch64: out/docker-machine-driver-kvm2-arm64
cp $< $@
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
GOARCH=$* \
go build \
-installsuffix "static" \
-ldflags="$(KVM2_LDFLAGS)" \
@ -536,21 +557,29 @@ else
endif
chmod +X $@
out/docker-machine-driver-kvm2_$(DEB_VERSION).deb: out/docker-machine-driver-kvm2
out/docker-machine-driver-kvm2_$(DEB_VERSION).deb: out/docker-machine-driver-kvm2_$(DEB_VERSION)-0_amd64.deb
cp $< $@
out/docker-machine-driver-kvm2_$(DEB_VERSION)-0_%.deb: out/docker-machine-driver-kvm2-%
cp -r installers/linux/deb/kvm2_deb_template out/docker-machine-driver-kvm2_$(DEB_VERSION)
chmod 0755 out/docker-machine-driver-kvm2_$(DEB_VERSION)/DEBIAN
sed -E -i 's/--VERSION--/'$(DEB_VERSION)'/g' out/docker-machine-driver-kvm2_$(DEB_VERSION)/DEBIAN/control
sed -E -i 's/--ARCH--/'$*'/g' out/docker-machine-driver-kvm2_$(DEB_VERSION)/DEBIAN/control
mkdir -p out/docker-machine-driver-kvm2_$(DEB_VERSION)/usr/bin
cp out/docker-machine-driver-kvm2 out/docker-machine-driver-kvm2_$(DEB_VERSION)/usr/bin/docker-machine-driver-kvm2
fakeroot dpkg-deb --build out/docker-machine-driver-kvm2_$(DEB_VERSION)
cp $< out/docker-machine-driver-kvm2_$(DEB_VERSION)/usr/bin/docker-machine-driver-kvm2
fakeroot dpkg-deb --build out/docker-machine-driver-kvm2_$(DEB_VERSION) $@
rm -rf out/docker-machine-driver-kvm2_$(DEB_VERSION)
out/docker-machine-driver-kvm2-$(RPM_VERSION).rpm: out/docker-machine-driver-kvm2
out/docker-machine-driver-kvm2-$(RPM_VERSION).rpm: out/docker-machine-driver-kvm2-$(RPM_VERSION)-0.x86_64.deb
cp $< $@
out/docker-machine-driver-kvm2-$(RPM_VERSION)-0.%.rpm: out/docker-machine-driver-kvm2-%
cp -r installers/linux/rpm/kvm2_rpm_template out/docker-machine-driver-kvm2-$(RPM_VERSION)
sed -E -i 's/--VERSION--/'$(RPM_VERSION)'/g' out/docker-machine-driver-kvm2-$(RPM_VERSION)/docker-machine-driver-kvm2.spec
sed -E -i 's|--OUT--|'$(PWD)/out'|g' out/docker-machine-driver-kvm2-$(RPM_VERSION)/docker-machine-driver-kvm2.spec
rpmbuild -bb -D "_rpmdir $(PWD)/out" -D "_rpmfilename docker-machine-driver-kvm2-$(RPM_VERSION).rpm" \
rpmbuild -bb -D "_rpmdir $(PWD)/out" --target $* \
out/docker-machine-driver-kvm2-$(RPM_VERSION)/docker-machine-driver-kvm2.spec
@mv out/$*/docker-machine-driver-kvm2-$(RPM_VERSION)-0.$*.rpm out/ && rmdir out/$*
rm -rf out/docker-machine-driver-kvm2-$(RPM_VERSION)
.PHONY: kvm-image

View File

@ -102,9 +102,9 @@ var printAddonsList = func() {
for _, addonName := range addonNames {
addonBundle := assets.Addons[addonName]
addonStatus, err := addonBundle.IsEnabled()
addonStatus, err := addonBundle.IsEnabled(pName)
if err != nil {
exit.WithError("Error getting addons status", err)
out.WarningT("Unable to get addon status for {{.name}}: {{.error}}", out.V{"name": addonName, "error": err})
}
tData = append(tData, []string{addonName, pName, fmt.Sprintf("%s %s", stringFromStatus(addonStatus), iconFromStatus(addonStatus))})
}
@ -114,12 +114,11 @@ var printAddonsList = func() {
v, _, err := config.ListProfiles()
if err != nil {
glog.Infof("error getting list of porfiles: %v", err)
glog.Errorf("list profiles returned error: %v", err)
}
if len(v) > 1 {
out.T(out.Tip, "To see addons list for other profiles use: `minikube addons -p name list`")
}
}
var printAddonsJSON = func() {
@ -135,9 +134,10 @@ var printAddonsJSON = func() {
for _, addonName := range addonNames {
addonBundle := assets.Addons[addonName]
addonStatus, err := addonBundle.IsEnabled()
addonStatus, err := addonBundle.IsEnabled(pName)
if err != nil {
exit.WithError("Error getting addons status", err)
glog.Errorf("Unable to get addon status for %s: %v", addonName, err)
continue
}
addonsMap[addonName] = map[string]interface{}{

View File

@ -39,7 +39,7 @@ var addonsDisableCmd = &cobra.Command{
if err != nil {
exit.WithError("disable failed", err)
}
out.SuccessT(`"{{.minikube_addon}}" was successfully disabled`, out.V{"minikube_addon": addon})
out.T(out.AddonDisable, `"The '{{.minikube_addon}}' addon is disabled`, out.V{"minikube_addon": addon})
},
}

View File

@ -33,13 +33,12 @@ var addonsEnableCmd = &cobra.Command{
if len(args) != 1 {
exit.UsageT("usage: minikube addons enable ADDON_NAME")
}
addon := args[0]
err := addons.Set(addon, "true", viper.GetString(config.MachineProfile))
if err != nil {
exit.WithError("enable failed", err)
}
out.SuccessT("{{.addonName}} was successfully enabled", out.V{"addonName": addon})
out.T(out.AddonEnable, "The '{{.addonName}}' addon is enabled", out.V{"addonName": addon})
},
}

View File

@ -24,8 +24,10 @@ import (
"github.com/pkg/browser"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"k8s.io/minikube/pkg/minikube/assets"
"k8s.io/minikube/pkg/minikube/cluster"
pkg_config "k8s.io/minikube/pkg/minikube/config"
"k8s.io/minikube/pkg/minikube/exit"
"k8s.io/minikube/pkg/minikube/machine"
"k8s.io/minikube/pkg/minikube/out"
@ -66,7 +68,8 @@ var addonsOpenCmd = &cobra.Command{
}
defer api.Close()
if !cluster.IsMinikubeRunning(api) {
profileName := viper.GetString(pkg_config.MachineProfile)
if !cluster.IsHostRunning(api, profileName) {
os.Exit(1)
}
addon, ok := assets.Addons[addonName] // validate addon input
@ -75,7 +78,7 @@ var addonsOpenCmd = &cobra.Command{
To see the list of available addons run:
minikube addons list`, out.V{"name": addonName})
}
ok, err = addon.IsEnabled()
ok, err = addon.IsEnabled(profileName)
if err != nil {
exit.WithError("IsEnabled failed", err)
}

View File

@ -22,6 +22,7 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"
pkgConfig "k8s.io/minikube/pkg/minikube/config"
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"
@ -78,7 +79,7 @@ var ProfileCmd = &cobra.Command{
}
cc, err := pkgConfig.Load(profile)
// might err when loading older version of cfg file that doesn't have KeepContext field
if err != nil && !os.IsNotExist(err) {
if err != nil && !pkg_config.IsNotExist(err) {
out.ErrT(out.Sad, `Error loading profile config: {{.error}}`, out.V{"error": err})
}
if err == nil {

View File

@ -60,7 +60,7 @@ var printProfilesTable = func() {
var validData [][]string
table := tablewriter.NewWriter(os.Stdout)
table.SetHeader([]string{"Profile", "VM Driver", "NodeIP", "Node Port", "Kubernetes Version", "Status"})
table.SetHeader([]string{"Profile", "VM Driver", "Runtime", "IP", "Port", "Version", "Status"})
table.SetAutoFormatHeaders(false)
table.SetBorders(tablewriter.Border{Left: true, Top: true, Right: true, Bottom: true})
table.SetCenterSeparator("|")
@ -71,20 +71,21 @@ var printProfilesTable = func() {
}
api, err := machine.NewAPIClient()
if err != nil {
glog.Infof("failed to get machine api client %v", err)
glog.Errorf("failed to get machine api client %v", err)
}
defer api.Close()
for _, p := range validProfiles {
p.Status, err = cluster.GetHostStatus(api, p.Name)
if err != nil {
glog.Infof("error getting host status for %v", err)
glog.Warningf("error getting host status for %s: %v", p.Name, err)
}
cp, err := config.PrimaryControlPlane(*p.Config)
if err != nil {
exit.WithError("profile has no control plane", err)
glog.Errorf("%q has no control plane: %v", p.Name, err)
// Print the data we know about anyways
}
validData = append(validData, []string{p.Name, p.Config.VMDriver, cp.IP, strconv.Itoa(cp.Port), p.Config.KubernetesConfig.KubernetesVersion, p.Status})
validData = append(validData, []string{p.Name, p.Config.VMDriver, p.Config.KubernetesConfig.ContainerRuntime, cp.IP, strconv.Itoa(cp.Port), p.Config.KubernetesConfig.KubernetesVersion, p.Status})
}
table.AppendBulk(validData)
@ -111,7 +112,7 @@ var printProfilesTable = func() {
var printProfilesJSON = func() {
api, err := machine.NewAPIClient()
if err != nil {
glog.Infof("failed to get machine api client %v", err)
glog.Errorf("failed to get machine api client %v", err)
}
defer api.Close()
@ -119,7 +120,7 @@ var printProfilesJSON = func() {
for _, v := range validProfiles {
status, err := cluster.GetHostStatus(api, v.Name)
if err != nil {
glog.Infof("error getting host status for %v", err)
glog.Warningf("error getting host status for %s: %v", v.Name, err)
}
v.Status = status
}
@ -141,7 +142,7 @@ var printProfilesJSON = func() {
var body = map[string]interface{}{}
if err == nil || os.IsNotExist(err) {
if err == nil || config.IsNotExist(err) {
body["valid"] = valid
body["invalid"] = invalid
jsonString, _ := json.Marshal(body)

View File

@ -16,9 +16,18 @@ limitations under the License.
package config
import "testing"
import (
"io/ioutil"
"os"
"path/filepath"
"testing"
"k8s.io/minikube/pkg/minikube/config"
"k8s.io/minikube/pkg/minikube/localpath"
)
func TestNotFound(t *testing.T) {
createTestProfile(t)
err := Set("nonexistent", "10")
if err == nil {
t.Fatalf("Set did not return error for unknown property")
@ -26,6 +35,7 @@ func TestNotFound(t *testing.T) {
}
func TestSetNotAllowed(t *testing.T) {
createTestProfile(t)
err := Set("vm-driver", "123456")
if err == nil || err.Error() != "[driver \"123456\" is not supported]" {
t.Fatalf("Set did not return error for unallowed value")
@ -33,7 +43,14 @@ func TestSetNotAllowed(t *testing.T) {
}
func TestSetOK(t *testing.T) {
createTestProfile(t)
err := Set("vm-driver", "virtualbox")
defer func() {
err = Unset("vm-driver")
if err != nil {
t.Errorf("failed to unset vm-driver")
}
}()
if err != nil {
t.Fatalf("Set returned error for valid property value")
}
@ -45,3 +62,25 @@ func TestSetOK(t *testing.T) {
t.Fatalf("Get returned %s, expected \"virtualbox\"", val)
}
}
func createTestProfile(t *testing.T) {
t.Helper()
td, err := ioutil.TempDir("", "profile")
if err != nil {
t.Fatalf("tempdir: %v", err)
}
err = os.Setenv(localpath.MinikubeHome, td)
if err != nil {
t.Errorf("error setting up test environment. could not set %s", localpath.MinikubeHome)
}
// Not necessary, but it is a handy random alphanumeric
name := filepath.Base(td)
if err := os.MkdirAll(config.ProfileFolderPath(name), 0777); err != nil {
t.Fatalf("error creating temporary directory")
}
if err := config.DefaultLoader.WriteConfigToFile(name, &config.MachineConfig{}); err != nil {
t.Fatalf("error creating temporary profile config: %v", err)
}
}

View File

@ -36,7 +36,6 @@ import (
pkgaddons "k8s.io/minikube/pkg/addons"
"k8s.io/minikube/pkg/minikube/assets"
"k8s.io/minikube/pkg/minikube/cluster"
"k8s.io/minikube/pkg/minikube/config"
pkg_config "k8s.io/minikube/pkg/minikube/config"
"k8s.io/minikube/pkg/minikube/exit"
"k8s.io/minikube/pkg/minikube/machine"
@ -61,7 +60,7 @@ var dashboardCmd = &cobra.Command{
Run: func(cmd *cobra.Command, args []string) {
profileName := viper.GetString(pkg_config.MachineProfile)
cc, err := pkg_config.Load(profileName)
if err != nil && !os.IsNotExist(err) {
if err != nil && !pkg_config.IsNotExist(err) {
exit.WithError("Error loading profile config", err)
}
@ -103,18 +102,18 @@ var dashboardCmd = &cobra.Command{
exit.WithCodeT(exit.NoInput, "kubectl not found in PATH, but is required for the dashboard. Installation guide: https://kubernetes.io/docs/tasks/tools/install-kubectl/")
}
if !cluster.IsMinikubeRunning(api) {
if !cluster.IsHostRunning(api, profileName) {
os.Exit(1)
}
// Check dashboard status before enabling it
dashboardAddon := assets.Addons["dashboard"]
dashboardStatus, _ := dashboardAddon.IsEnabled()
dashboardStatus, _ := dashboardAddon.IsEnabled(profileName)
if !dashboardStatus {
// Send status messages to stderr for folks re-using this output.
out.ErrT(out.Enabling, "Enabling dashboard ...")
// Enable the dashboard add-on
err = pkgaddons.Set("dashboard", "true", viper.GetString(config.MachineProfile))
err = pkgaddons.Set("dashboard", "true", profileName)
if err != nil {
exit.WithError("Unable to enable dashboard", err)
}

View File

@ -35,6 +35,7 @@ import (
"k8s.io/minikube/pkg/minikube/cluster"
pkg_config "k8s.io/minikube/pkg/minikube/config"
"k8s.io/minikube/pkg/minikube/constants"
"k8s.io/minikube/pkg/minikube/cruntime"
"k8s.io/minikube/pkg/minikube/driver"
"k8s.io/minikube/pkg/minikube/exit"
"k8s.io/minikube/pkg/minikube/kubeconfig"
@ -131,14 +132,12 @@ func runDelete(cmd *cobra.Command, args []string) {
profileName := viper.GetString(pkg_config.MachineProfile)
profile, err := pkg_config.LoadProfile(profileName)
if err != nil {
out.ErrT(out.Meh, `"{{.name}}" profile does not exist`, out.V{"name": profileName})
out.ErrT(out.Meh, `"{{.name}}" profile does not exist, trying anyways.`, out.V{"name": profileName})
}
errs := DeleteProfiles([]*pkg_config.Profile{profile})
if len(errs) > 0 {
HandleDeletionErrors(errs)
} else {
out.T(out.DeletingHost, "Successfully deleted profile \"{{.name}}\"", out.V{"name": profileName})
}
}
@ -153,7 +152,7 @@ func purgeMinikubeDirectory() {
if err := os.RemoveAll(localpath.MiniPath()); err != nil {
exit.WithError("unable to delete minikube config folder", err)
}
out.T(out.Crushed, "Successfully purged minikube directory located at - [{{.minikubeDirectory}}]", out.V{"minikubeDirectory": localpath.MiniPath()})
out.T(out.Deleted, "Successfully purged minikube directory located at - [{{.minikubeDirectory}}]", out.V{"minikubeDirectory": localpath.MiniPath()})
}
// DeleteProfiles deletes one or more profiles
@ -188,13 +187,13 @@ func deleteProfile(profile *pkg_config.Profile) error {
}
defer api.Close()
cc, err := pkg_config.Load(profile.Name)
if err != nil && !os.IsNotExist(err) {
if err != nil && !pkg_config.IsNotExist(err) {
delErr := profileDeletionErr(profile.Name, fmt.Sprintf("error loading profile config: %v", err))
return DeletionError{Err: delErr, Errtype: MissingProfile}
}
if err == nil && driver.BareMetal(cc.VMDriver) {
if err := uninstallKubernetes(api, cc.KubernetesConfig, viper.GetString(cmdcfg.Bootstrapper)); err != nil {
if err := uninstallKubernetes(api, profile.Name, cc.KubernetesConfig, viper.GetString(cmdcfg.Bootstrapper)); err != nil {
deletionError, ok := err.(DeletionError)
if ok {
delErr := profileDeletionErr(profile.Name, fmt.Sprintf("%v", err))
@ -212,7 +211,7 @@ func deleteProfile(profile *pkg_config.Profile) error {
if err = cluster.DeleteHost(api, profile.Name); err != nil {
switch errors.Cause(err).(type) {
case mcnerror.ErrHostDoesNotExist:
out.T(out.Meh, `"{{.name}}" cluster does not exist. Proceeding ahead with cleanup.`, out.V{"name": profile.Name})
glog.Infof("%s cluster does not exist. Proceeding ahead with cleanup.", profile.Name)
default:
out.T(out.FailureType, "Failed to delete cluster: {{.error}}", out.V{"error": err})
out.T(out.Notice, `You may need to manually remove the "{{.name}}" VM from your hypervisor`, out.V{"name": profile.Name})
@ -223,7 +222,7 @@ func deleteProfile(profile *pkg_config.Profile) error {
deleteProfileDirectory(profile.Name)
if err := pkg_config.DeleteProfile(profile.Name); err != nil {
if os.IsNotExist(err) {
if pkg_config.IsNotExist(err) {
delErr := profileDeletionErr(profile.Name, fmt.Sprintf("\"%s\" profile does not exist", profile.Name))
return DeletionError{Err: delErr, Errtype: MissingProfile}
}
@ -231,11 +230,10 @@ func deleteProfile(profile *pkg_config.Profile) error {
return DeletionError{Err: delErr, Errtype: Fatal}
}
out.T(out.Crushed, `The "{{.name}}" cluster has been deleted.`, out.V{"name": profile.Name})
if err := deleteContext(profile.Name); err != nil {
return err
}
out.T(out.Deleted, `Removed all traces of the "{{.name}}" cluster.`, out.V{"name": profile.Name})
return nil
}
@ -276,12 +274,34 @@ func profileDeletionErr(profileName string, additionalInfo string) error {
return fmt.Errorf("error deleting profile \"%s\": %s", profileName, additionalInfo)
}
func uninstallKubernetes(api libmachine.API, kc pkg_config.KubernetesConfig, bsName string) error {
func uninstallKubernetes(api libmachine.API, profile string, kc pkg_config.KubernetesConfig, bsName string) error {
out.T(out.Resetting, "Uninstalling Kubernetes {{.kubernetes_version}} using {{.bootstrapper_name}} ...", out.V{"kubernetes_version": kc.KubernetesVersion, "bootstrapper_name": bsName})
clusterBootstrapper, err := getClusterBootstrapper(api, bsName)
if err != nil {
return DeletionError{Err: fmt.Errorf("unable to get bootstrapper: %v", err), Errtype: Fatal}
} else if err = clusterBootstrapper.DeleteCluster(kc); err != nil {
}
host, err := cluster.CheckIfHostExistsAndLoad(api, profile)
if err != nil {
exit.WithError("Error getting host", err)
}
r, err := machine.CommandRunner(host)
if err != nil {
exit.WithError("Failed to get command runner", err)
}
cr, err := cruntime.New(cruntime.Config{Type: kc.ContainerRuntime, Runner: r})
if err != nil {
exit.WithError("Failed runtime", err)
}
// Unpause the cluster if necessary to avoid hung kubeadm
_, err = cluster.Unpause(cr, r, nil)
if err != nil {
glog.Errorf("unpause failed: %v", err)
}
if err = clusterBootstrapper.DeleteCluster(kc); err != nil {
return DeletionError{Err: fmt.Errorf("failed to delete cluster: %v", err), Errtype: Fatal}
}
return nil

View File

@ -27,7 +27,6 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"
"k8s.io/minikube/pkg/minikube/config"
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/machine"
@ -51,8 +50,8 @@ minikube kubectl -- get pods --namespace kube-system`,
}
defer api.Close()
cc, err := pkg_config.Load(viper.GetString(config.MachineProfile))
if err != nil && !os.IsNotExist(err) {
cc, err := config.Load(viper.GetString(config.MachineProfile))
if err != nil && !config.IsNotExist(err) {
out.ErrLn("Error loading profile config: %v", err)
}

View File

@ -53,7 +53,7 @@ func runPause(cmd *cobra.Command, args []string) {
defer api.Close()
cc, err := config.Load(cname)
if err != nil && !os.IsNotExist(err) {
if err != nil && !config.IsNotExist(err) {
exit.WithError("Error loading profile config", err)
}

View File

@ -25,8 +25,10 @@ import (
"github.com/golang/glog"
"github.com/pkg/browser"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"k8s.io/minikube/pkg/minikube/cluster"
pkg_config "k8s.io/minikube/pkg/minikube/config"
"k8s.io/minikube/pkg/minikube/exit"
"k8s.io/minikube/pkg/minikube/machine"
"k8s.io/minikube/pkg/minikube/out"
@ -71,7 +73,8 @@ var serviceCmd = &cobra.Command{
}
defer api.Close()
if !cluster.IsMinikubeRunning(api) {
profileName := viper.GetString(pkg_config.MachineProfile)
if !cluster.IsHostRunning(api, profileName) {
os.Exit(1)
}

View File

@ -46,7 +46,7 @@ import (
"github.com/spf13/viper"
"golang.org/x/sync/errgroup"
cmdcfg "k8s.io/minikube/cmd/minikube/cmd/config"
pkgaddons "k8s.io/minikube/pkg/addons"
"k8s.io/minikube/pkg/addons"
"k8s.io/minikube/pkg/minikube/bootstrapper"
"k8s.io/minikube/pkg/minikube/bootstrapper/bsutil"
"k8s.io/minikube/pkg/minikube/bootstrapper/images"
@ -104,7 +104,6 @@ const (
imageMirrorCountry = "image-mirror-country"
mountString = "mount-string"
disableDriverMounts = "disable-driver-mounts"
addons = "addons"
cacheImages = "cache-images"
uuid = "uuid"
vpnkitSock = "hyperkit-vpnkit-sock"
@ -159,7 +158,7 @@ func initMinikubeFlags() {
startCmd.Flags().Bool(force, false, "Force minikube to perform possibly dangerous operations")
startCmd.Flags().Bool(interactive, true, "Allow user prompts for more information")
startCmd.Flags().Bool(dryRun, false, "dry-run mode. Validates configuration, but does does not mutate system state")
startCmd.Flags().Bool(dryRun, false, "dry-run mode. Validates configuration, but does not mutate system state")
startCmd.Flags().Int(cpus, 2, "Number of CPUs allocated to the minikube VM.")
startCmd.Flags().String(memory, defaultMemorySize, "Amount of RAM allocated to the minikube VM (format: <number>[<unit>], where unit = b, k, m or g).")
@ -172,7 +171,7 @@ func initMinikubeFlags() {
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+":/minikube-host", "The argument to pass the minikube mount command on start.")
startCmd.Flags().StringArrayVar(&addonList, addons, nil, "Enable addons. see `minikube addons list` for a list of valid addon names.")
startCmd.Flags().StringArrayVar(&addonList, "addons", nil, "Enable addons. see `minikube addons list` for a list of valid addon names.")
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\".")
@ -296,7 +295,7 @@ func runStart(cmd *cobra.Command, args []string) {
}
existing, err := config.Load(viper.GetString(config.MachineProfile))
if err != nil && !os.IsNotExist(err) {
if err != nil && !config.IsNotExist(err) {
exit.WithCodeT(exit.Data, "Unable to load config: {{.error}}", out.V{"error": err})
}
@ -368,8 +367,12 @@ func runStart(cmd *cobra.Command, args []string) {
bootstrapCluster(bs, cr, mRunner, mc, preExists, isUpgrade)
configureMounts()
// enable addons with start command
enableAddons()
// enable addons, both old and new!
existingAddons := map[string]bool{}
if existing != nil && existing.Addons != nil {
existingAddons = existing.Addons
}
addons.Start(viper.GetString(config.MachineProfile), existingAddons, addonList)
if err = cacheAndLoadImagesInConfig(); err != nil {
out.T(out.FailureType, "Unable to load cached images from config file.")
@ -408,15 +411,6 @@ func cacheISO(cfg *config.MachineConfig, driverName string) {
}
}
func enableAddons() {
for _, a := range addonList {
err := pkgaddons.Set(a, "true", viper.GetString(config.MachineProfile))
if err != nil {
exit.WithError("addon enable failed", err)
}
}
}
func displayVersion(version string) {
prefix := ""
if viper.GetString(config.MachineProfile) != constants.DefaultMachineName {
@ -594,16 +588,16 @@ func selectDriver(existing *config.MachineConfig) string {
if existing != nil {
pick, alts := driver.Choose(existing.VMDriver, options)
if pick.Priority == registry.Experimental {
exp = "experimental"
exp = "experimental "
}
out.T(out.Sparkle, `Selecting {{.experimental}} '{{.driver}}' driver from existing profile (alternates: {{.alternates}})`, out.V{"experimental": exp, "driver": existing.VMDriver, "alternates": alts})
out.T(out.Sparkle, `Selecting {{.experimental}}'{{.driver}}' driver from existing profile (alternates: {{.alternates}})`, out.V{"experimental": exp, "driver": existing.VMDriver, "alternates": alts})
return pick.Name
}
if len(options) > 1 {
out.T(out.Sparkle, `Automatically selected the {{.experimental}} '{{.driver}}' driver (alternates: {{.alternates}})`, out.V{"experimental": exp, "driver": pick.Name, "alternates": alts})
out.T(out.Sparkle, `Automatically selected the {{.experimental}}'{{.driver}}' driver (alternates: {{.alternates}})`, out.V{"experimental": exp, "driver": pick.Name, "alternates": alts})
} else {
out.T(out.Sparkle, `Automatically selected the {{.experimental}} '{{.driver}}' driver`, out.V{"experimental": exp, "driver": pick.Name})
out.T(out.Sparkle, `Automatically selected the {{.experimental}}'{{.driver}}' driver`, out.V{"experimental": exp, "driver": pick.Name})
}
if pick.Name == "" {
@ -761,7 +755,7 @@ func validateUser(drvName string) {
os.Exit(exit.Permissions)
}
_, err = config.Load(viper.GetString(config.MachineProfile))
if err == nil || !os.IsNotExist(err) {
if err == nil || !config.IsNotExist(err) {
out.T(out.Tip, "Tip: To remove this root owned cluster, run: sudo {{.cmd}} delete", out.V{"cmd": minikubeCmd()})
}
if !useForce {
@ -1154,12 +1148,15 @@ Suggested workarounds:
func tryLookup(r command.Runner) {
// DNS check
if rr, err := r.RunCmd(exec.Command("nslookup", "kubernetes.io")); err != nil {
glog.Warningf("%s failed: %v", rr.Args, err)
out.WarningT("VM may be unable to resolve external DNS records")
if rr, err := r.RunCmd(exec.Command("nslookup", "kubernetes.io", "-type=ns")); err != nil {
glog.Infof("%s failed: %v which might be okay will retry nslookup without query type", rr.Args, err)
// will try with without query type for ISOs with different busybox versions.
if _, err = r.RunCmd(exec.Command("nslookup", "kubernetes.io")); err != nil {
glog.Warningf("nslookup failed: %v", err)
out.WarningT("Node may be unable to resolve external DNS records")
}
}
}
func tryRegistry(r command.Runner) {
// Try an HTTPS connection to the image repository
proxy := os.Getenv("HTTPS_PROXY")

View File

@ -30,7 +30,7 @@ import (
"github.com/pkg/errors"
"github.com/spf13/cobra"
"github.com/spf13/viper"
cmdcfg "k8s.io/minikube/cmd/minikube/cmd/config"
"k8s.io/minikube/pkg/minikube/bootstrapper/bsutil/kverify"
"k8s.io/minikube/pkg/minikube/cluster"
"k8s.io/minikube/pkg/minikube/config"
"k8s.io/minikube/pkg/minikube/constants"
@ -45,8 +45,10 @@ var output string
const (
// Additional states used by kubeconfig
Configured = "Configured" // analogous to state.Saved
Misconfigured = "Misconfigured" // analogous to state.Error
Configured = "Configured" // ~state.Saved
Misconfigured = "Misconfigured" // ~state.Error
// Additional states used for clarity
Nonexistent = "Nonexistent" // ~state.None
)
// Status holds string representations of component states
@ -92,6 +94,9 @@ var statusCmd = &cobra.Command{
if err != nil {
glog.Errorf("status error: %v", err)
}
if st.Host == Nonexistent {
glog.Errorf("The %q cluster does not exist!", machineName)
}
switch strings.ToLower(output) {
case "text":
@ -125,27 +130,35 @@ func exitCode(st *Status) int {
}
func status(api libmachine.API, name string) (*Status, error) {
st := &Status{}
st := &Status{
Host: Nonexistent,
APIServer: Nonexistent,
Kubelet: Nonexistent,
Kubeconfig: Nonexistent,
}
hs, err := cluster.GetHostStatus(api, name)
glog.Infof("%s host status = %q (err=%v)", name, hs, err)
if err != nil {
return st, errors.Wrap(err, "host")
}
// We have no record of this host. Return nonexistent struct
if hs == state.None.String() {
return st, nil
}
st.Host = hs
// If it's not running, quickly bail out rather than delivering conflicting messages
if st.Host != state.Running.String() {
glog.Infof("host is not running, skipping remaining checks")
st.APIServer = st.Host
st.Kubelet = st.Host
st.Kubeconfig = st.Host
return st, nil
}
bs, err := getClusterBootstrapper(api, viper.GetString(cmdcfg.Bootstrapper))
if err != nil {
return st, errors.Wrap(err, "bootstrapper")
}
st.Kubelet, err = bs.GetKubeletStatus()
if err != nil {
glog.Warningf("kubelet err: %v", err)
st.Kubelet = state.Error.String()
}
// We have a fully operational host, now we can check for details
ip, err := cluster.GetHostDriverIP(api, name)
if err != nil {
glog.Errorln("Error host driver ip status:", err)
@ -159,20 +172,43 @@ func status(api libmachine.API, name string) (*Status, error) {
port = constants.APIServerPort
}
st.APIServer, err = bs.GetAPIServerStatus(ip, port)
st.Kubeconfig = Misconfigured
ok, err := kubeconfig.IsClusterInConfig(ip, name)
glog.Infof("%s is in kubeconfig at ip %s: %v (err=%v)", name, ip, ok, err)
if ok {
st.Kubeconfig = Configured
}
host, err := cluster.CheckIfHostExistsAndLoad(api, name)
if err != nil {
return st, err
}
cr, err := machine.CommandRunner(host)
if err != nil {
return st, err
}
stk, err := kverify.KubeletStatus(cr)
glog.Infof("%s kubelet status = %s (err=%v)", name, stk, err)
if err != nil {
glog.Warningf("kubelet err: %v", err)
st.Kubelet = state.Error.String()
} else {
st.Kubelet = stk.String()
}
sta, err := kverify.APIServerStatus(cr, ip, port)
glog.Infof("%s apiserver status = %s (err=%v)", name, stk, err)
if err != nil {
glog.Errorln("Error apiserver status:", err)
st.APIServer = state.Error.String()
} else {
st.APIServer = sta.String()
}
st.Kubeconfig = Misconfigured
ks, err := kubeconfig.IsClusterInConfig(ip, name)
if err != nil {
glog.Errorln("Error kubeconfig status:", err)
}
if ks {
st.Kubeconfig = Configured
}
return st, nil
}

View File

@ -0,0 +1,107 @@
/*
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 cmd
import (
"bytes"
"encoding/json"
"testing"
)
func TestExitCode(t *testing.T) {
var tests = []struct {
name string
want int
state *Status
}{
{"ok", 0, &Status{Host: "Running", Kubelet: "Running", APIServer: "Running", Kubeconfig: Configured}},
{"paused", 2, &Status{Host: "Running", Kubelet: "Stopped", APIServer: "Paused", Kubeconfig: Configured}},
{"down", 7, &Status{Host: "Stopped", Kubelet: "Stopped", APIServer: "Stopped", Kubeconfig: Misconfigured}},
{"missing", 7, &Status{Host: "Nonexistent", Kubelet: "Nonexistent", APIServer: "Nonexistent", Kubeconfig: "Nonexistent"}},
}
for _, tc := range tests {
t.Run(tc.name, func(t *testing.T) {
got := exitCode(tc.state)
if got != tc.want {
t.Errorf("exitcode(%+v) = %d, want: %d", tc.state, got, tc.want)
}
})
}
}
func TestStatusText(t *testing.T) {
var tests = []struct {
name string
state *Status
want string
}{
{
name: "ok",
state: &Status{Host: "Running", Kubelet: "Running", APIServer: "Running", Kubeconfig: Configured},
want: "host: Running\nkubelet: Running\napiserver: Running\nkubeconfig: Configured\n",
},
{
name: "paused",
state: &Status{Host: "Running", Kubelet: "Stopped", APIServer: "Paused", Kubeconfig: Configured},
want: "host: Running\nkubelet: Stopped\napiserver: Paused\nkubeconfig: Configured\n",
},
{
name: "down",
state: &Status{Host: "Stopped", Kubelet: "Stopped", APIServer: "Stopped", Kubeconfig: Misconfigured},
want: "host: Stopped\nkubelet: Stopped\napiserver: Stopped\nkubeconfig: Misconfigured\n\nWARNING: Your kubectl is pointing to stale minikube-vm.\nTo fix the kubectl context, run `minikube update-context`\n",
},
}
for _, tc := range tests {
t.Run(tc.name, func(t *testing.T) {
var b bytes.Buffer
err := statusText(tc.state, &b)
if err != nil {
t.Errorf("text(%+v) error: %v", tc.state, err)
}
got := b.String()
if got != tc.want {
t.Errorf("text(%+v) = %q, want: %q", tc.state, got, tc.want)
}
})
}
}
func TestStatusJSON(t *testing.T) {
var tests = []struct {
name string
state *Status
}{
{"ok", &Status{Host: "Running", Kubelet: "Running", APIServer: "Running", Kubeconfig: Configured}},
{"paused", &Status{Host: "Running", Kubelet: "Stopped", APIServer: "Paused", Kubeconfig: Configured}},
{"down", &Status{Host: "Stopped", Kubelet: "Stopped", APIServer: "Stopped", Kubeconfig: Misconfigured}},
}
for _, tc := range tests {
t.Run(tc.name, func(t *testing.T) {
var b bytes.Buffer
err := statusJSON(tc.state, &b)
if err != nil {
t.Errorf("json(%+v) error: %v", tc.state, err)
}
st := &Status{}
if err := json.Unmarshal(b.Bytes(), st); err != nil {
t.Errorf("json(%+v) unmarshal error: %v", tc.state, err)
}
})
}
}

View File

@ -20,6 +20,7 @@ import (
"time"
"github.com/docker/machine/libmachine/mcnerror"
"github.com/golang/glog"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"github.com/spf13/viper"
@ -54,6 +55,11 @@ func runStop(cmd *cobra.Command, args []string) {
nonexistent := false
stop := func() (err error) {
err = cluster.StopHost(api)
if err == nil {
return nil
}
glog.Warningf("stop host returned error: %v", err)
switch err := errors.Cause(err).(type) {
case mcnerror.ErrHostDoesNotExist:
out.T(out.Meh, `"{{.profile_name}}" VM does not exist, nothing to stop`, out.V{"profile_name": profile})

View File

@ -45,7 +45,7 @@ var unpauseCmd = &cobra.Command{
defer api.Close()
cc, err := config.Load(cname)
if err != nil && !os.IsNotExist(err) {
if err != nil && !config.IsNotExist(err) {
exit.WithError("Error loading profile config", err)
}

View File

@ -13,5 +13,6 @@
# limitations under the License.
FROM scratch
COPY out/storage-provisioner storage-provisioner
ARG arch
COPY out/storage-provisioner-${arch} storage-provisioner
CMD ["/storage-provisioner"]

View File

@ -1,17 +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.
FROM s390x/ubuntu:16.04
COPY out/storage-provisioner storage-provisioner
CMD ["/storage-provisioner"]

1
go.mod
View File

@ -72,7 +72,6 @@ require (
golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456
golang.org/x/text v0.3.2
gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 // indirect
gotest.tools v2.2.0+incompatible
k8s.io/api v0.17.2
k8s.io/apimachinery v0.17.2
k8s.io/client-go v11.0.0+incompatible

View File

@ -1,21 +1,38 @@
ARG COMMIT_SHA
# for now using node image created by kind https://github.com/kubernetes-sigs/kind
# could be changed to slim ubuntu with systemd.
FROM kindest/node:v1.16.2
# using base image created by kind https://github.com/kubernetes-sigs/kind
# which is an ubuntu 19.10 with an entry-point that helps running systemd
# could be changed to any debian that can run systemd
FROM kindest/base:v20200122-2dfe64b2
USER root
RUN apt-get update && apt-get install -y \
sudo \
dnsutils \
openssh-server \
docker.io \
&& apt-get clean -y
# based on https://github.com/rastasheep/ubuntu-sshd/blob/master/18.04/Dockerfile
# disable containerd by default
RUN systemctl disable containerd
RUN rm /etc/crictl.yaml
# enable docker which is default
RUN systemctl enable docker
# making SSH work for docker container
# based on https://github.com/rastasheep/ubuntu-sshd/blob/master/18.04/Dockerfile
RUN mkdir /var/run/sshd
RUN echo 'root:root' |chpasswd
RUN sed -ri 's/^#?PermitRootLogin\s+.*/PermitRootLogin yes/' /etc/ssh/sshd_config
RUN sed -ri 's/UsePAM yes/#UsePAM yes/g' /etc/ssh/sshd_config
EXPOSE 22
# Deleting all "kind" related stuff from the image.
# for minikube ssh. to match VM using "docker" as username
RUN adduser --ingroup docker --disabled-password --gecos '' docker
RUN adduser docker sudo
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
USER docker
RUN mkdir /home/docker/.ssh
# Deleting leftovers
USER root
# kind base-image entry-point expects a "kind" folder for product_name,product_uuid
# https://github.com/kubernetes-sigs/kind/blob/master/images/base/files/usr/local/bin/entrypoint
RUN mkdir -p /kind
RUN rm -rf \
/var/cache/debconf/* \
/var/lib/apt/lists/* \
@ -25,12 +42,4 @@ RUN rm -rf \
/usr/share/doc/* \
/usr/share/man/* \
/usr/share/local/* \
/kind/bin/kubeadm /kind/bin/kubelet /kind/systemd /kind/images /kind/manifests
RUN echo "kic! Build: ${COMMIT_SHA} Time :$(date)" > "/kic.txt"
# for minikube ssh. to match VM using docker username
RUN adduser --disabled-password --gecos '' docker
RUN adduser docker sudo
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
USER docker
RUN mkdir /home/docker/.ssh
USER root

View File

@ -43,10 +43,10 @@ env GOPATH=$HOME/go BUILD_IN_DOCKER=y \
make -j 16 \
all \
out/minikube-installer.exe \
"out/minikube_${DEB_VERSION}.deb" \
"out/minikube-${RPM_VERSION}.rpm" \
"out/docker-machine-driver-kvm2_${DEB_VERSION}.deb" \
"out/docker-machine-driver-kvm2-${RPM_VERSION}.rpm"
"out/minikube_${DEB_VERSION}-0_amd64.deb" \
"out/minikube-${RPM_VERSION}-0.x86_64.rpm" \
"out/docker-machine-driver-kvm2_${DEB_VERSION}-0_amd64.deb" \
"out/docker-machine-driver-kvm2-${RPM_VERSION}-0.x86_64.rpm"
make checksum

View File

@ -84,8 +84,8 @@ FILES_TO_UPLOAD=(
'minikube-windows-amd64.exe'
'minikube-windows-amd64.exe.sha256'
'minikube-installer.exe'
"minikube_${DEB_VERSION}.deb"
"minikube-${RPM_VERSION}.rpm"
"minikube_${DEB_VERSION}-0_amd64.deb"
"minikube-${RPM_VERSION}-0.x86_64.rpm"
'docker-machine-driver-kvm2'
'docker-machine-driver-kvm2.sha256'
'docker-machine-driver-hyperkit'

View File

@ -2,7 +2,7 @@ Package: docker-machine-driver-kvm2
Version: --VERSION--
Section: base
Priority: optional
Architecture: amd64
Architecture: --ARCH--
Depends: libvirt0 (>= 1.3.1)
Recommends: minikube
Maintainer: Thomas Strömberg <t+minikube@stromberg.org>

View File

@ -18,7 +18,7 @@ a consistent way to manage various VM providers.
%prep
mkdir -p %{name}-%{version}
cd %{name}-%{version}
cp --OUT--/docker-machine-driver-kvm2 .
cp --OUT--/docker-machine-driver-kvm2-%{_arch} docker-machine-driver-kvm2
%install
cd %{name}-%{version}

View File

@ -18,9 +18,11 @@ package addons
import (
"fmt"
"os"
"path/filepath"
"path"
"sort"
"strconv"
"strings"
"time"
"github.com/golang/glog"
"github.com/pkg/errors"
@ -41,6 +43,7 @@ const defaultStorageClassProvisioner = "standard"
// Set sets a value
func Set(name, value, profile string) error {
glog.Infof("Setting %s=%s in profile %q", name, value, profile)
a, valid := isAddonValid(name)
if !valid {
return errors.Errorf("%s is not a valid addon", name)
@ -66,7 +69,7 @@ func Set(name, value, profile string) error {
return errors.Wrap(err, "running callbacks")
}
// Write the value
glog.Infof("Writing out %q config to set %s=%v...", profile, name, value)
return config.Write(profile, c)
}
@ -100,6 +103,7 @@ func SetBool(m *config.MachineConfig, name string, val string) error {
// enableOrDisableAddon updates addon status executing any commands necessary
func enableOrDisableAddon(name, val, profile string) error {
glog.Infof("Setting addon %s=%s in %q", name, val, profile)
enable, err := strconv.ParseBool(val)
if err != nil {
return errors.Wrapf(err, "parsing bool: %s", name)
@ -107,14 +111,14 @@ func enableOrDisableAddon(name, val, profile string) error {
addon := assets.Addons[name]
// check addon status before enabling/disabling it
alreadySet, err := isAddonAlreadySet(addon, enable)
alreadySet, err := isAddonAlreadySet(addon, enable, profile)
if err != nil {
out.ErrT(out.Conflict, "{{.error}}", out.V{"error": err})
return err
}
//if addon is already enabled or disabled, do nothing
if alreadySet {
return nil
glog.Warningf("addon %s should already be in state %v", name, val)
}
if name == "istio" && enable {
@ -134,20 +138,15 @@ func enableOrDisableAddon(name, val, profile string) error {
}
defer api.Close()
//if minikube is not running, we return and simply update the value in the addon
//config and rewrite the file
if !cluster.IsMinikubeRunning(api) {
return nil
}
cfg, err := config.Load(profile)
if err != nil && !os.IsNotExist(err) {
if err != nil && !config.IsNotExist(err) {
exit.WithCodeT(exit.Data, "Unable to load config: {{.error}}", out.V{"error": err})
}
host, err := cluster.CheckIfHostExistsAndLoad(api, cfg.Name)
if err != nil {
return errors.Wrap(err, "getting host")
host, err := cluster.CheckIfHostExistsAndLoad(api, profile)
if err != nil || !cluster.IsHostRunning(api, profile) {
glog.Warningf("%q is not running, writing %s=%v to disk and skipping enablement (err=%v)", profile, addon.Name(), enable, err)
return nil
}
cmd, err := machine.CommandRunner(host)
@ -159,11 +158,10 @@ func enableOrDisableAddon(name, val, profile string) error {
return enableOrDisableAddonInternal(addon, cmd, data, enable, profile)
}
func isAddonAlreadySet(addon *assets.Addon, enable bool) (bool, error) {
addonStatus, err := addon.IsEnabled()
func isAddonAlreadySet(addon *assets.Addon, enable bool, profile string) (bool, error) {
addonStatus, err := addon.IsEnabled(profile)
if err != nil {
return false, errors.Wrap(err, "get the addon status")
return false, errors.Wrap(err, "is enabled")
}
if addonStatus && enable {
@ -178,42 +176,50 @@ func isAddonAlreadySet(addon *assets.Addon, enable bool) (bool, error) {
func enableOrDisableAddonInternal(addon *assets.Addon, cmd command.Runner, data interface{}, enable bool, profile string) error {
files := []string{}
for _, addon := range addon.Assets {
var addonFile assets.CopyableFile
var f assets.CopyableFile
var err error
if addon.IsTemplate() {
addonFile, err = addon.Evaluate(data)
f, err = addon.Evaluate(data)
if err != nil {
return errors.Wrapf(err, "evaluate bundled addon %s asset", addon.GetAssetName())
}
} else {
addonFile = addon
f = addon
}
fPath := path.Join(f.GetTargetDir(), f.GetTargetName())
if enable {
if err := cmd.Copy(addonFile); err != nil {
glog.Infof("installing %s", fPath)
if err := cmd.Copy(f); err != nil {
return err
}
} else {
glog.Infof("Removing %+v", fPath)
defer func() {
if err := cmd.Remove(addonFile); err != nil {
glog.Warningf("error removing %s; addon should still be disabled as expected", addonFile)
if err := cmd.Remove(f); err != nil {
glog.Warningf("error removing %s; addon should still be disabled as expected", fPath)
}
}()
}
files = append(files, filepath.Join(addonFile.GetTargetDir(), addonFile.GetTargetName()))
files = append(files, fPath)
}
command, err := kubectlCommand(profile, files, enable)
if err != nil {
return err
}
if result, err := cmd.RunCmd(command); err != nil {
return errors.Wrapf(err, "error updating addon:\n%s", result.Output())
glog.Infof("Running: %s", command)
rr, err := cmd.RunCmd(command)
if err != nil {
return errors.Wrapf(err, "addon apply")
}
glog.Infof("output:\n%s", rr.Output())
return nil
}
// enableOrDisableStorageClasses enables or disables storage classes
func enableOrDisableStorageClasses(name, val, profile string) error {
glog.Infof("enableOrDisableStorageClasses %s=%v on %q", name, val, profile)
enable, err := strconv.ParseBool(val)
if err != nil {
return errors.Wrap(err, "Error parsing boolean")
@ -228,6 +234,17 @@ func enableOrDisableStorageClasses(name, val, profile string) error {
return errors.Wrapf(err, "Error getting storagev1 interface %v ", err)
}
api, err := machine.NewAPIClient()
if err != nil {
return errors.Wrap(err, "machine client")
}
defer api.Close()
if !cluster.IsHostRunning(api, profile) {
glog.Warningf("%q is not running, writing %s=%v to disk and skipping enablement", profile, name, val)
return enableOrDisableAddon(name, val, profile)
}
if enable {
// Only StorageClass for 'name' should be marked as default
err = storageclass.SetDefaultStorageClass(storagev1, class)
@ -244,3 +261,48 @@ func enableOrDisableStorageClasses(name, val, profile string) error {
return enableOrDisableAddon(name, val, profile)
}
// Start enables the default addons for a profile, plus any additional
func Start(profile string, toEnable map[string]bool, additional []string) {
start := time.Now()
glog.Infof("enableAddons start: toEnable=%v, additional=%s", toEnable, additional)
defer func() {
glog.Infof("enableAddons completed in %s", time.Since(start))
}()
// Get the default values of any addons not saved to our config
for name, a := range assets.Addons {
defaultVal, err := a.IsEnabled(profile)
if err != nil {
glog.Errorf("is-enabled failed for %q: %v", a.Name(), err)
continue
}
_, exists := toEnable[name]
if !exists {
toEnable[name] = defaultVal
}
}
// Apply new addons
for _, name := range additional {
toEnable[name] = true
}
toEnableList := []string{}
for k, v := range toEnable {
if v {
toEnableList = append(toEnableList, k)
}
}
sort.Strings(toEnableList)
out.T(out.AddonEnable, "Enabling addons: {{.addons}}", out.V{"addons": strings.Join(toEnableList, ", ")})
for _, a := range toEnableList {
err := Set(a, "true", profile)
if err != nil {
// Intentionally non-fatal
out.WarningT("Enabling '{{.name}}' returned an error: {{.error}}", out.V{"name": a, "error": err})
}
}
}

View File

@ -17,93 +17,115 @@ limitations under the License.
package addons
import (
"fmt"
"io/ioutil"
"os"
"path/filepath"
"testing"
"gotest.tools/assert"
"k8s.io/minikube/pkg/minikube/assets"
"k8s.io/minikube/pkg/minikube/config"
"k8s.io/minikube/pkg/minikube/localpath"
)
func createTestProfile(t *testing.T) string {
t.Helper()
td, err := ioutil.TempDir("", "profile")
if err != nil {
t.Fatalf("tempdir: %v", err)
}
err = os.Setenv(localpath.MinikubeHome, td)
if err != nil {
t.Errorf("error setting up test environment. could not set %s", localpath.MinikubeHome)
}
// Not necessary, but it is a handy random alphanumeric
name := filepath.Base(td)
if err := os.MkdirAll(config.ProfileFolderPath(name), 0777); err != nil {
t.Fatalf("error creating temporary directory")
}
if err := config.DefaultLoader.WriteConfigToFile(name, &config.MachineConfig{}); err != nil {
t.Fatalf("error creating temporary profile config: %v", err)
}
return name
}
func TestIsAddonAlreadySet(t *testing.T) {
testCases := []struct {
addonName string
}{
{
addonName: "ingress",
},
{
addonName: "registry",
},
profile := createTestProfile(t)
if err := Set("registry", "true", profile); err != nil {
t.Errorf("unable to set registry true: %v", err)
}
enabled, err := assets.Addons["registry"].IsEnabled(profile)
if err != nil {
t.Errorf("registry: %v", err)
}
if !enabled {
t.Errorf("expected registry to be enabled")
}
for _, test := range testCases {
addon := assets.Addons[test.addonName]
addonStatus, _ := addon.IsEnabled()
alreadySet, err := isAddonAlreadySet(addon, addonStatus)
if !alreadySet {
if addonStatus {
t.Errorf("Did not get expected status, \n\n expected %+v already enabled", test.addonName)
} else {
t.Errorf("Did not get expected status, \n\n expected %+v already disabled", test.addonName)
}
}
if err != nil {
t.Errorf("Got unexpected error: %+v", err)
}
enabled, err = assets.Addons["ingress"].IsEnabled(profile)
if err != nil {
t.Errorf("ingress: %v", err)
}
if enabled {
t.Errorf("expected ingress to not be enabled")
}
}
func TestDisableUnknownAddon(t *testing.T) {
tmpProfile := "temp-minikube-profile"
if err := Set("InvalidAddon", "false", tmpProfile); err == nil {
profile := createTestProfile(t)
if err := Set("InvalidAddon", "false", profile); err == nil {
t.Fatalf("Disable did not return error for unknown addon")
}
}
func TestEnableUnknownAddon(t *testing.T) {
tmpProfile := "temp-minikube-profile"
if err := Set("InvalidAddon", "true", tmpProfile); err == nil {
profile := createTestProfile(t)
if err := Set("InvalidAddon", "true", profile); err == nil {
t.Fatalf("Enable did not return error for unknown addon")
}
}
func TestEnableAndDisableAddon(t *testing.T) {
tests := []struct {
name string
enable bool
}{
{
name: "test enable",
enable: true,
}, {
name: "test disable",
enable: false,
},
profile := createTestProfile(t)
// enable
if err := Set("dashboard", "true", profile); err != nil {
t.Errorf("Disable returned unexpected error: " + err.Error())
}
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
tmpProfile := "temp-minikube-profile"
if err := os.MkdirAll(config.ProfileFolderPath(tmpProfile), 0777); err != nil {
t.Fatalf("error creating temporary directory")
}
defer os.RemoveAll(config.ProfileFolderPath(tmpProfile))
c, err := config.DefaultLoader.LoadConfigFromFile(profile)
if err != nil {
t.Errorf("unable to load profile: %v", err)
}
if c.Addons["dashboard"] != true {
t.Errorf("expected dashboard to be enabled")
}
if err := config.DefaultLoader.WriteConfigToFile(tmpProfile, &config.MachineConfig{}); err != nil {
t.Fatalf("error creating temporary profile config: %v", err)
}
if err := Set("dashboard", fmt.Sprintf("%t", test.enable), tmpProfile); err != nil {
t.Fatalf("Disable returned unexpected error: " + err.Error())
}
c, err := config.DefaultLoader.LoadConfigFromFile(tmpProfile)
if err != nil {
t.Fatalf("error loading config: %v", err)
}
assert.Equal(t, c.Addons["dashboard"], test.enable)
})
// disable
if err := Set("dashboard", "false", profile); err != nil {
t.Errorf("Disable returned unexpected error: " + err.Error())
}
c, err = config.DefaultLoader.LoadConfigFromFile(profile)
if err != nil {
t.Errorf("unable to load profile: %v", err)
}
if c.Addons["dashboard"] != false {
t.Errorf("expected dashboard to be enabled")
}
}
func TestStart(t *testing.T) {
profile := createTestProfile(t)
Start(profile, map[string]bool{}, []string{"dashboard"})
enabled, err := assets.Addons["dashboard"].IsEnabled(profile)
if err != nil {
t.Errorf("dashboard: %v", err)
}
if !enabled {
t.Errorf("expected dashboard to be enabled")
}
}

View File

@ -17,7 +17,6 @@ limitations under the License.
package addons
import (
"os"
"os/exec"
"path"
@ -53,7 +52,7 @@ func kubectlCommand(profile string, files []string, enable bool) (*exec.Cmd, err
func kubernetesVersion(profile string) (string, error) {
cc, err := config.Load(profile)
if err != nil && !os.IsNotExist(err) {
if err != nil && !config.IsNotExist(err) {
return "", err
}
version := constants.DefaultKubernetesVersion

View File

@ -24,30 +24,18 @@ import (
"strings"
"github.com/docker/machine/libmachine/drivers"
"github.com/docker/machine/libmachine/log"
"github.com/docker/machine/libmachine/ssh"
"github.com/docker/machine/libmachine/state"
"github.com/golang/glog"
"github.com/pkg/errors"
pkgdrivers "k8s.io/minikube/pkg/drivers"
"k8s.io/minikube/pkg/drivers/kic/node"
"k8s.io/minikube/pkg/drivers/kic/oci"
"k8s.io/minikube/pkg/minikube/assets"
"k8s.io/minikube/pkg/minikube/command"
"k8s.io/minikube/pkg/minikube/constants"
)
// DefaultPodCIDR is The CIDR to be used for pods inside the node.
const DefaultPodCIDR = "10.244.0.0/16"
// DefaultBindIPV4 is The default IP the container will bind to.
const DefaultBindIPV4 = "127.0.0.1"
// BaseImage is the base image is used to spin up kic containers created by kind.
const BaseImage = "gcr.io/k8s-minikube/kicbase:v0.0.2@sha256:8f531b90901721a7bd4e67ceffbbc7ee6c4292b0e6d1a9d6eb59f117d57bc4e9"
// OverlayImage is the cni plugin used for overlay image, created by kind.
const OverlayImage = "kindest/kindnetd:0.5.3"
// Driver represents a kic driver https://minikube.sigs.k8s.io/docs/reference/drivers/kic/
type Driver struct {
*drivers.BaseDriver
@ -58,20 +46,6 @@ type Driver struct {
OCIBinary string // docker,podman
}
// Config is configuration for the kic driver used by registry
type Config struct {
MachineName string // maps to the container name being created
CPU int // Number of CPU cores assigned to the container
Memory int // max memory in MB
StorePath string // libmachine store path
OCIBinary string // oci tool to use (docker, podman,...)
ImageDigest string // image name with sha to use for the node
Mounts []oci.Mount // mounts
APIServerPort int // kubernetes api server port inside the container
PortMappings []oci.PortMapping // container port mappings
Envs map[string]string // key,value of environment variables passed to the node
}
// NewDriver returns a fully configured Kic driver
func NewDriver(c Config) *Driver {
d := &Driver{
@ -88,10 +62,10 @@ func NewDriver(c Config) *Driver {
// Create a host using the driver's config
func (d *Driver) Create() error {
params := node.CreateConfig{
params := oci.CreateParams{
Name: d.NodeConfig.MachineName,
Image: d.NodeConfig.ImageDigest,
ClusterLabel: node.ClusterLabelKey + "=" + d.MachineName,
ClusterLabel: oci.ClusterLabelKey + "=" + d.MachineName,
CPUs: strconv.Itoa(d.NodeConfig.CPU),
Memory: strconv.Itoa(d.NodeConfig.Memory) + "mb",
Envs: d.NodeConfig.Envs,
@ -109,8 +83,12 @@ func (d *Driver) Create() error {
ListenAddress: DefaultBindIPV4,
ContainerPort: constants.SSHPort,
},
oci.PortMapping{
ListenAddress: DefaultBindIPV4,
ContainerPort: constants.DockerDaemonPort,
},
)
_, err := node.CreateNode(params)
err := oci.CreateContainerNode(params)
if err != nil {
return errors.Wrap(err, "create kic node")
}
@ -154,14 +132,15 @@ func (d *Driver) DriverName() string {
// GetIP returns an IP or hostname that this host is available at
func (d *Driver) GetIP() (string, error) {
node, err := node.Find(d.OCIBinary, d.MachineName, d.exec)
if err != nil {
return "", fmt.Errorf("ip not found for nil node")
}
ip, _, err := node.IP()
ip, _, err := oci.ContainerIPs(d.OCIBinary, d.MachineName)
return ip, err
}
// GetExternalIP returns an IP which is accissble from outside
func (d *Driver) GetExternalIP() (string, error) {
return DefaultBindIPV4, nil
}
// GetSSHHostname returns hostname for use with ssh
func (d *Driver) GetSSHHostname() (string, error) {
return DefaultBindIPV4, nil
@ -205,7 +184,7 @@ func (d *Driver) GetState() (state.State, error) {
out, err := cmd.CombinedOutput()
o := strings.Trim(string(out), "\n")
if err != nil {
return state.Error, errors.Wrapf(err, "error stop node %s", d.MachineName)
return state.Error, errors.Wrapf(err, "get container %s status", d.MachineName)
}
switch o {
case "running":
@ -234,12 +213,17 @@ func (d *Driver) Kill() error {
// Remove will delete the Kic Node Container
func (d *Driver) Remove() error {
if _, err := d.nodeID(d.MachineName); err != nil {
return errors.Wrapf(err, "not found node %s", d.MachineName)
if _, err := oci.ContainerID(d.OCIBinary, d.MachineName); err != nil {
log.Warnf("could not find the container %s to remove it.", d.MachineName)
}
cmd := exec.Command(d.NodeConfig.OCIBinary, "rm", "-f", "-v", d.MachineName)
if err := cmd.Run(); err != nil {
return errors.Wrapf(err, "error removing node %s", d.MachineName)
o, err := cmd.CombinedOutput()
out := strings.Trim(string(o), "\n")
if err != nil {
if strings.Contains(out, "is already in progress") {
log.Warnf("Docker engine is stuck. please restart docker daemon on your computer.", d.MachineName)
}
return errors.Wrapf(err, "removing container %s, output %s", d.MachineName, out)
}
return nil
}
@ -308,13 +292,3 @@ func (d *Driver) Stop() error {
func (d *Driver) RunSSHCommandFromDriver() error {
return fmt.Errorf("driver does not support RunSSHCommandFromDriver commands")
}
// looks up for a container node by name, will return error if not found.
func (d *Driver) nodeID(nameOrID string) (string, error) {
cmd := exec.Command(d.NodeConfig.OCIBinary, "inspect", "-f", "{{.Id}}", nameOrID)
id, err := cmd.CombinedOutput()
if err != nil {
id = []byte{}
}
return string(id), err
}

View File

@ -1,196 +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 node
import (
"fmt"
"os/exec"
"path/filepath"
"strings"
"k8s.io/minikube/pkg/drivers/kic/oci"
"k8s.io/minikube/pkg/minikube/assets"
"k8s.io/minikube/pkg/minikube/command"
"github.com/pkg/errors"
)
const (
// Docker default bridge network is named "bridge" (https://docs.docker.com/network/bridge/#use-the-default-bridge-network)
DefaultNetwork = "bridge"
ClusterLabelKey = "io.x-k8s.kic.cluster" // ClusterLabelKey is applied to each node docker container for identification
NodeRoleKey = "io.k8s.sigs.kic.role"
)
// Node represents a handle to a kic node
// This struct must be created by one of: CreateControlPlane
type Node struct {
id string // container id
name string // container name
r command.Runner // Runner
ociBinary string
}
type CreateConfig struct {
Name string // used for container name and hostname
Image string // container image to use to create the node.
ClusterLabel string // label the containers we create using minikube so we can clean up
Role string // currently only role supported is control-plane
Mounts []oci.Mount // volume mounts
APIServerPort int // kubernetes api server port
PortMappings []oci.PortMapping // ports to map to container from host
CPUs string // number of cpu cores assign to container
Memory string // memory (mbs) to assign to the container
Envs map[string]string // environment variables to pass to the container
ExtraArgs []string // a list of any extra option to pass to oci binary during creation time, for example --expose 8080...
OCIBinary string // docker or podman
}
// CreateNode creates a new container node
func CreateNode(p CreateConfig) (*Node, error) {
cmder := command.NewKICRunner(p.Name, p.OCIBinary)
runArgs := []string{
fmt.Sprintf("--cpus=%s", p.CPUs),
fmt.Sprintf("--memory=%s", p.Memory),
"-d", // run the container detached
"-t", // allocate a tty for entrypoint logs
// running containers in a container requires privileged
// NOTE: we could try to replicate this with --cap-add, and use less
// privileges, but this flag also changes some mounts that are necessary
// including some ones docker would otherwise do by default.
// for now this is what we want. in the future we may revisit this.
"--privileged",
"--security-opt", "seccomp=unconfined", // also ignore seccomp
"--tmpfs", "/tmp", // various things depend on working /tmp
"--tmpfs", "/run", // systemd wants a writable /run
// logs,pods be stroed on filesystem vs inside container,
"--volume", "/var",
// some k8s things want /lib/modules
"-v", "/lib/modules:/lib/modules:ro",
"--hostname", p.Name, // make hostname match container name
"--name", p.Name, // ... and set the container name
// label the node with the cluster ID
"--label", p.ClusterLabel,
// label the node with the role ID
"--label", fmt.Sprintf("%s=%s", NodeRoleKey, p.Role),
}
for key, val := range p.Envs {
runArgs = append(runArgs, "-e", fmt.Sprintf("%s=%s", key, val))
}
// adds node specific args
runArgs = append(runArgs, p.ExtraArgs...)
if oci.UsernsRemap(p.OCIBinary) {
// We need this argument in order to make this command work
// in systems that have userns-remap enabled on the docker daemon
runArgs = append(runArgs, "--userns=host")
}
_, err := oci.CreateContainer(p.OCIBinary,
p.Image,
oci.WithRunArgs(runArgs...),
oci.WithMounts(p.Mounts),
oci.WithPortMappings(p.PortMappings),
)
if err != nil {
return nil, errors.Wrap(err, "oci create ")
}
// we should return a handle so the caller can clean it up
node, err := Find(p.OCIBinary, p.Name, cmder)
if err != nil {
return node, errors.Wrap(err, "find node")
}
return node, nil
}
// Find finds a node
func Find(ociBinary string, name string, cmder command.Runner) (*Node, error) {
n, err := oci.Inspect(ociBinary, name, "{{.Id}}")
if err != nil {
return nil, fmt.Errorf("can't find node %v", err)
}
return &Node{
ociBinary: ociBinary,
id: n[0],
name: name,
r: cmder,
}, nil
}
// WriteFile writes content to dest on the node
func (n *Node) WriteFile(dest, content string, perm string) error {
// create destination directory
cmd := exec.Command("mkdir", "-p", filepath.Dir(dest))
rr, err := n.r.RunCmd(cmd)
if err != nil {
return errors.Wrapf(err, "failed to create directory %s cmd: %v output:%q", cmd.Args, dest, rr.Output())
}
cmd = exec.Command("cp", "/dev/stdin", dest)
cmd.Stdin = strings.NewReader(content)
if rr, err := n.r.RunCmd(cmd); err != nil {
return errors.Wrapf(err, "failed to run: cp /dev/stdin %s cmd: %v output:%q", dest, cmd.Args, rr.Output())
}
cmd = exec.Command("chmod", perm, dest)
_, err = n.r.RunCmd(cmd)
if err != nil {
return errors.Wrapf(err, "failed to run: chmod %s %s", perm, dest)
}
return nil
}
// IP returns the IP address of the node
func (n *Node) IP() (ipv4 string, ipv6 string, err error) {
// retrieve the IP address of the node using docker inspect
lines, err := oci.Inspect(n.ociBinary, n.name, "{{range .NetworkSettings.Networks}}{{.IPAddress}},{{.GlobalIPv6Address}}{{end}}")
if err != nil {
return "", "", errors.Wrap(err, "node ips")
}
if len(lines) != 1 {
return "", "", errors.Errorf("file should only be one line, got %d lines", len(lines))
}
ips := strings.Split(lines[0], ",")
if len(ips) != 2 {
return "", "", errors.Errorf("container addresses should have 2 values, got %d values: %+v", len(ips), ips)
}
return ips[0], ips[1], nil
}
// Copy copies a local asset into the node
func (n *Node) Copy(ociBinary string, asset assets.CopyableFile) error {
if err := oci.Copy(ociBinary, n.name, asset); err != nil {
return errors.Wrap(err, "failed to copy file/folder")
}
cmd := exec.Command("chmod", asset.GetPermissions(), asset.GetTargetName())
if _, err := n.r.RunCmd(cmd); err != nil {
return errors.Wrap(err, "failed to chmod file permissions")
}
return nil
}
// Remove removes the node
func (n *Node) Remove() error {
return oci.Remove(n.ociBinary, n.name)
}

View File

@ -20,9 +20,6 @@ import (
"os"
"strconv"
"github.com/docker/machine/libmachine/state"
"k8s.io/minikube/pkg/minikube/assets"
"bufio"
"bytes"
@ -31,83 +28,166 @@ import (
"fmt"
"os/exec"
"strings"
"time"
"github.com/cenkalti/backoff"
)
// Stop stops a container
func Stop(ociBinary, ociID string) error {
cmd := exec.Command(ociBinary, "stop", ociID)
// CreateContainerNode creates a new container node
func CreateContainerNode(p CreateParams) error {
runArgs := []string{
fmt.Sprintf("--cpus=%s", p.CPUs),
fmt.Sprintf("--memory=%s", p.Memory),
"-d", // run the container detached
"-t", // allocate a tty for entrypoint logs
// running containers in a container requires privileged
// NOTE: we could try to replicate this with --cap-add, and use less
// privileges, but this flag also changes some mounts that are necessary
// including some ones docker would otherwise do by default.
// for now this is what we want. in the future we may revisit this.
"--privileged",
"--security-opt", "seccomp=unconfined", // also ignore seccomp
"--tmpfs", "/tmp", // various things depend on working /tmp
"--tmpfs", "/run", // systemd wants a writable /run
// logs,pods be stroed on filesystem vs inside container,
"--volume", "/var",
// some k8s things want /lib/modules
"-v", "/lib/modules:/lib/modules:ro",
"--hostname", p.Name, // make hostname match container name
"--name", p.Name, // ... and set the container name
// label the node with the cluster ID
"--label", p.ClusterLabel,
// label the node with the role ID
"--label", fmt.Sprintf("%s=%s", nodeRoleKey, p.Role),
}
for key, val := range p.Envs {
runArgs = append(runArgs, "-e", fmt.Sprintf("%s=%s", key, val))
}
// adds node specific args
runArgs = append(runArgs, p.ExtraArgs...)
if isUsernsRemapEnabled(p.OCIBinary) {
// We need this argument in order to make this command work
// in systems that have userns-remap enabled on the docker daemon
runArgs = append(runArgs, "--userns=host")
}
_, err := createContainer(p.OCIBinary,
p.Image,
withRunArgs(runArgs...),
withMounts(p.Mounts),
withPortMappings(p.PortMappings),
)
if err != nil {
return errors.Wrap(err, "create a kic node")
}
return nil
}
// CreateContainer creates a container with "docker/podman run"
func createContainer(ociBinary string, image string, opts ...createOpt) ([]string, error) {
o := &createOpts{}
for _, opt := range opts {
o = opt(o)
}
// convert mounts to container run args
runArgs := o.RunArgs
for _, mount := range o.Mounts {
runArgs = append(runArgs, generateMountBindings(mount)...)
}
for _, portMapping := range o.PortMappings {
runArgs = append(runArgs, generatePortMappings(portMapping)...)
}
// construct the actual docker run argv
args := []string{"run"}
args = append(args, runArgs...)
args = append(args, image)
args = append(args, o.ContainerArgs...)
cmd := exec.Command(ociBinary, args...)
var buff bytes.Buffer
cmd.Stdout = &buff
cmd.Stderr = &buff
err := cmd.Run()
scanner := bufio.NewScanner(&buff)
var output []string
for scanner.Scan() {
output = append(output, scanner.Text())
}
if err != nil {
return output, errors.Wrapf(err, "args: %v output: %s ", args, output)
}
return output, nil
}
// Copy copies a local asset into the container
func Copy(ociBinary string, ociID string, targetDir string, fName string) error {
if _, err := os.Stat(fName); os.IsNotExist(err) {
return errors.Wrapf(err, "error source %s does not exist", fName)
}
destination := fmt.Sprintf("%s:%s", ociID, targetDir)
cmd := exec.Command(ociBinary, "cp", fName, destination)
err := cmd.Run()
if err != nil {
return errors.Wrapf(err, "error stop node %s", ociID)
return errors.Wrapf(err, "error copying %s into node", fName)
}
return nil
}
// Status returns the status of the container
func Status(ociBinary string, ociID string) (state.State, error) {
cmd := exec.Command(ociBinary, "inspect", "-f", "{{.State.Status}}", ociID)
// HostPortBinding will return port mapping for a container using cli.
// example : HostPortBinding("docker", "minikube", "22")
// will return the docker assigned port:
// 32769, nil
// only supports TCP ports
func HostPortBinding(ociBinary string, ociID string, contPort int) (int, error) {
cmd := exec.Command(ociBinary, "inspect", "-f", fmt.Sprintf("'{{(index (index .NetworkSettings.Ports \"%d/tcp\") 0).HostPort}}'", contPort), ociID)
out, err := cmd.CombinedOutput()
if err != nil {
return 0, errors.Wrapf(err, "getting host-bind port %d for container ID %q, output %s", contPort, ociID, out)
}
o := strings.Trim(string(out), "\n")
s := state.Error
switch o {
case "running":
s = state.Running
case "exited":
s = state.Stopped
case "paused":
s = state.Paused
case "restaring":
s = state.Starting
}
o = strings.Trim(o, "'")
p, err := strconv.Atoi(o)
if err != nil {
return state.Error, errors.Wrapf(err, "error getting node %s status", ociID)
return p, errors.Wrapf(err, "convert host-port %q to number", p)
}
return s, nil
return p, nil
}
// SystemStatus checks if the oci container engine is running
func SystemStatus(ociBinary string, ociID string) (state.State, error) {
_, err := exec.LookPath(ociBinary)
// ContainerIPs returns ipv4,ipv6, error of a container by their name
func ContainerIPs(ociBinary string, name string) (string, string, error) {
// retrieve the IP address of the node using docker inspect
lines, err := inspect(ociBinary, name, "{{range .NetworkSettings.Networks}}{{.IPAddress}},{{.GlobalIPv6Address}}{{end}}")
if err != nil {
return state.Error, err
return "", "", errors.Wrap(err, "inspecting NetworkSettings.Networks")
}
if len(lines) != 1 {
return "", "", errors.Errorf("IPs output should only be one line, got %d lines", len(lines))
}
ips := strings.Split(lines[0], ",")
if len(ips) != 2 {
return "", "", errors.Errorf("container addresses should have 2 values, got %d values: %+v", len(ips), ips)
}
return ips[0], ips[1], nil
err = exec.Command("docker", "info").Run()
}
// ContainerID returns id of a container name
func ContainerID(ociBinary string, nameOrID string) (string, error) {
cmd := exec.Command(ociBinary, "inspect", "-f", "{{.Id}}", nameOrID)
id, err := cmd.CombinedOutput()
if err != nil {
return state.Error, err
id = []byte{}
}
return state.Running, nil
return string(id), err
}
// Remove removes a container
func Remove(ociBinary string, ociID string) error {
// TODO: force remove should be an option
cmd := exec.Command(ociBinary, "rm", "-f", "-v", ociID)
if err := cmd.Run(); err != nil {
return errors.Wrapf(err, "error removing node %s", ociID)
}
return nil
// ListOwnedContainers lists all the containres that kic driver created on user's machine using a label
func ListOwnedContainers(ociBinary string) ([]string, error) {
return listContainersByLabel(ociBinary, ClusterLabelKey)
}
// Pause pauses a container
func Pause(ociBinary string, ociID string) error {
cmd := exec.Command(ociBinary, "pause", ociID)
if err := cmd.Run(); err != nil {
return errors.Wrapf(err, "error pausing node %s", ociID)
}
return nil
}
// Inspect return low-level information on containers
func Inspect(ociBinary string, containerNameOrID, format string) ([]string, error) {
// inspect return low-level information on containers
func inspect(ociBinary string, containerNameOrID, format string) ([]string, error) {
cmd := exec.Command(ociBinary, "inspect",
"-f", format,
containerNameOrID) // ... against the "node" container
@ -123,65 +203,6 @@ func Inspect(ociBinary string, containerNameOrID, format string) ([]string, erro
return lines, err
}
// NetworkInspect displays detailed information on one or more networks
func NetworkInspect(networkNames []string, format string) ([]string, error) {
cmd := exec.Command("docker", "network", "inspect",
"-f", format,
strings.Join(networkNames, " "))
var buff bytes.Buffer
cmd.Stdout = &buff
cmd.Stderr = &buff
err := cmd.Run()
scanner := bufio.NewScanner(&buff)
var lines []string
for scanner.Scan() {
lines = append(lines, scanner.Text())
}
return lines, err
}
// GetSubnets returns a slice of subnets for a specified network name
// For example the command : docker network inspect -f '{{range (index (index . "IPAM") "Config")}}{{index . "Subnet"}} {{end}}' bridge
// returns 172.17.0.0/16
func GetSubnets(networkName string) ([]string, error) {
format := `{{range (index (index . "IPAM") "Config")}}{{index . "Subnet"}} {{end}}`
lines, err := NetworkInspect([]string{networkName}, format)
if err != nil {
return nil, err
}
return strings.Split(lines[0], " "), nil
}
// ImageInspect return low-level information on containers images
func ImageInspect(containerNameOrID, format string) ([]string, error) {
cmd := exec.Command("docker", "image", "inspect",
"-f", format,
containerNameOrID,
)
var buff bytes.Buffer
cmd.Stdout = &buff
cmd.Stderr = &buff
err := cmd.Run()
scanner := bufio.NewScanner(&buff)
var lines []string
for scanner.Scan() {
lines = append(lines, scanner.Text())
}
return lines, err
}
// ImageID return the Id of the container image
func ImageID(containerNameOrID string) (string, error) {
lines, err := ImageInspect(containerNameOrID, "{{ .Id }}")
if err != nil {
return "", err
}
if len(lines) != 1 {
return "", fmt.Errorf("docker image ID should only be one line, got %d lines", len(lines))
}
return lines[0], nil
}
/*
This is adapated from:
https://github.com/kubernetes/kubernetes/blob/07a5488b2a8f67add543da72e8819407d8314204/pkg/kubelet/dockershim/helpers.go#L115-L155
@ -228,33 +249,8 @@ func generateMountBindings(mounts ...Mount) []string {
return result
}
// PullIfNotPresent pulls docker image if not present back off exponentially
func PullIfNotPresent(ociBinary string, image string, forceUpdate bool, maxWait time.Duration) error {
cmd := exec.Command(ociBinary, "inspect", "--type=image", image)
err := cmd.Run()
if err == nil && !forceUpdate {
return nil // if presents locally and not force
}
b := backoff.NewExponentialBackOff()
b.MaxElapsedTime = maxWait
f := func() error {
return pull(ociBinary, image)
}
return backoff.Retry(f, b)
}
// Pull pulls an image, retrying up to retries times
func pull(ociBinary string, image string) error {
cmd := exec.Command(ociBinary, "pull", image)
err := cmd.Run()
if err != nil {
return fmt.Errorf("error pull image %s : %v", image, err)
}
return err
}
// UsernsRemap checks if userns-remap is enabled in dockerd
func UsernsRemap(ociBinary string) bool {
// isUsernsRemapEnabled checks if userns-remap is enabled in docker
func isUsernsRemapEnabled(ociBinary string) bool {
cmd := exec.Command(ociBinary, "info", "--format", "'{{json .SecurityOptions}}'")
var buff bytes.Buffer
cmd.Stdout = &buff
@ -287,126 +283,43 @@ func generatePortMappings(portMappings ...PortMapping) []string {
return result
}
// Save saves an image archive "docker/podman save"
func Save(ociBinary string, image, dest string) error {
cmd := exec.Command(ociBinary, "save", "-o", dest, image)
var buff bytes.Buffer
cmd.Stdout = &buff
cmd.Stderr = &buff
err := cmd.Run()
scanner := bufio.NewScanner(&buff)
var lines []string
for scanner.Scan() {
lines = append(lines, scanner.Text())
}
if err != nil {
return errors.Wrapf(err, "saving image to tar failed, output %s", lines[0])
}
return nil
}
// CreateOpt is an option for Create
type CreateOpt func(*createOpts) *createOpts
// actual options struct
type createOpts struct {
RunArgs []string
ContainerArgs []string
Mounts []Mount
PortMappings []PortMapping
}
// CreateContainer creates a container with "docker/podman run"
func CreateContainer(ociBinary string, image string, opts ...CreateOpt) ([]string, error) {
o := &createOpts{}
for _, opt := range opts {
o = opt(o)
}
// convert mounts to container run args
runArgs := o.RunArgs
for _, mount := range o.Mounts {
runArgs = append(runArgs, generateMountBindings(mount)...)
}
for _, portMapping := range o.PortMappings {
runArgs = append(runArgs, generatePortMappings(portMapping)...)
}
// construct the actual docker run argv
args := []string{"run"}
args = append(args, runArgs...)
args = append(args, image)
args = append(args, o.ContainerArgs...)
cmd := exec.Command(ociBinary, args...)
var buff bytes.Buffer
cmd.Stdout = &buff
cmd.Stderr = &buff
err := cmd.Run()
scanner := bufio.NewScanner(&buff)
var output []string
for scanner.Scan() {
output = append(output, scanner.Text())
}
if err != nil {
return output, errors.Wrapf(err, "args: %v output: %s ", args, output)
}
return output, nil
}
// WithRunArgs sets the args for docker run
// withRunArgs sets the args for docker run
// as in the args portion of `docker run args... image containerArgs...`
func WithRunArgs(args ...string) CreateOpt {
func withRunArgs(args ...string) createOpt {
return func(r *createOpts) *createOpts {
r.RunArgs = args
return r
}
}
// WithMounts sets the container mounts
func WithMounts(mounts []Mount) CreateOpt {
// withMounts sets the container mounts
func withMounts(mounts []Mount) createOpt {
return func(r *createOpts) *createOpts {
r.Mounts = mounts
return r
}
}
// WithPortMappings sets the container port mappings to the host
func WithPortMappings(portMappings []PortMapping) CreateOpt {
// withPortMappings sets the container port mappings to the host
func withPortMappings(portMappings []PortMapping) createOpt {
return func(r *createOpts) *createOpts {
r.PortMappings = portMappings
return r
}
}
// Copy copies a local asset into the container
func Copy(ociBinary string, ociID string, asset assets.CopyableFile) error {
if _, err := os.Stat(asset.GetAssetName()); os.IsNotExist(err) {
return errors.Wrapf(err, "error source %s does not exist", asset.GetAssetName())
}
destination := fmt.Sprintf("%s:%s", ociID, asset.GetTargetDir())
cmd := exec.Command(ociBinary, "cp", asset.GetAssetName(), destination)
// listContainersByLabel lists all the containres that kic driver created on user's machine using a label
// io.x-k8s.kic.cluster
func listContainersByLabel(ociBinary string, label string) ([]string, error) {
cmd := exec.Command(ociBinary, "ps", "-a", "--filter", fmt.Sprintf("label=%s", label), "--format", "{{.Names}}")
var b bytes.Buffer
cmd.Stdout = &b
cmd.Stderr = &b
err := cmd.Run()
if err != nil {
return errors.Wrapf(err, "error copying %s into node", asset.GetAssetName())
var lines []string
sc := bufio.NewScanner(&b)
for sc.Scan() {
lines = append(lines, sc.Text())
}
return nil
}
// HostPortBinding will return port mapping for a container using cli.
// example : HostPortBinding("docker", "minikube", "22")
// will return the docker assigned port:
// 32769, nil
// only supports TCP ports
func HostPortBinding(ociBinary string, ociID string, contPort int) (int, error) {
cmd := exec.Command(ociBinary, "inspect", "-f", fmt.Sprintf("'{{(index (index .NetworkSettings.Ports \"%d/tcp\") 0).HostPort}}'", contPort), ociID)
out, err := cmd.CombinedOutput()
if err != nil {
return 0, errors.Wrapf(err, "getting host-bind port %d for container ID %q, output %s", contPort, ociID, out)
}
o := strings.Trim(string(out), "\n")
o = strings.Trim(o, "'")
p, err := strconv.Atoi(o)
if err != nil {
return p, errors.Wrapf(err, "convert host-port %q to number", p)
}
return p, nil
return lines, err
}

View File

@ -19,8 +19,38 @@ package oci
const (
Docker = "docker"
Podman = "podman"
// ClusterLabelKey is applied to each node docker container for identification
ClusterLabelKey = "io.x-k8s.kic.cluster"
// NodeRoleKey is used to identify if it is control plane or worker
nodeRoleKey = "io.k8s.sigs.kic.role"
)
type CreateParams struct {
Name string // used for container name and hostname
Image string // container image to use to create the node.
ClusterLabel string // label the containers we create using minikube so we can clean up
Role string // currently only role supported is control-plane
Mounts []Mount // volume mounts
APIServerPort int // kubernetes api server port
PortMappings []PortMapping // ports to map to container from host
CPUs string // number of cpu cores assign to container
Memory string // memory (mbs) to assign to the container
Envs map[string]string // environment variables to pass to the container
ExtraArgs []string // a list of any extra option to pass to oci binary during creation time, for example --expose 8080...
OCIBinary string // docker or podman
}
// createOpt is an option for Create
type createOpt func(*createOpts) *createOpts
// actual options struct
type createOpts struct {
RunArgs []string
ContainerArgs []string
Mounts []Mount
PortMappings []PortMapping
}
/*
These types are from
https://github.com/kubernetes/kubernetes/blob/063e7ff358fdc8b0916e6f39beedc0d025734cb1/pkg/kubelet/apis/cri/runtime/v1alpha2/api.pb.go#L183

47
pkg/drivers/kic/types.go Normal file
View File

@ -0,0 +1,47 @@
/*
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 kic
import "k8s.io/minikube/pkg/drivers/kic/oci"
const (
// Docker default bridge network is named "bridge" (https://docs.docker.com/network/bridge/#use-the-default-bridge-network)
DefaultNetwork = "bridge"
// DefaultPodCIDR is The CIDR to be used for pods inside the node.
DefaultPodCIDR = "10.244.0.0/16"
// DefaultBindIPV4 is The default IP the container will bind to.
DefaultBindIPV4 = "127.0.0.1"
// BaseImage is the base image is used to spin up kic containers. it uses same base-image as kind.
BaseImage = "gcr.io/k8s-minikube/kicbase:v0.0.5@sha256:3ddd8461dfb5c3e452ccc44d87750b87a574ec23fc425da67dccc1f0c57d428a"
// OverlayImage is the cni plugin used for overlay image, created by kind.
// CNI plugin image used for kic drivers created by kind.
OverlayImage = "kindest/kindnetd:0.5.3"
)
// Config is configuration for the kic driver used by registry
type Config struct {
MachineName string // maps to the container name being created
CPU int // Number of CPU cores assigned to the container
Memory int // max memory in MB
StorePath string // libmachine store path
OCIBinary string // oci tool to use (docker, podman,...)
ImageDigest string // image name with sha to use for the node
Mounts []oci.Mount // mounts
APIServerPort int // kubernetes api server port inside the container
PortMappings []oci.PortMapping // container port mappings
Envs map[string]string // key,value of environment variables passed to the node
}

View File

@ -18,6 +18,7 @@ package none
import (
"fmt"
"net"
"os/exec"
"strings"
"time"
@ -26,10 +27,13 @@ import (
"github.com/docker/machine/libmachine/state"
"github.com/golang/glog"
"github.com/pkg/errors"
"k8s.io/apimachinery/pkg/util/net"
knet "k8s.io/apimachinery/pkg/util/net"
pkgdrivers "k8s.io/minikube/pkg/drivers"
"k8s.io/minikube/pkg/minikube/bootstrapper/bsutil/kverify"
"k8s.io/minikube/pkg/minikube/command"
"k8s.io/minikube/pkg/minikube/constants"
"k8s.io/minikube/pkg/minikube/cruntime"
"k8s.io/minikube/pkg/minikube/kubeconfig"
"k8s.io/minikube/pkg/minikube/vmpath"
"k8s.io/minikube/pkg/util/retry"
)
@ -94,7 +98,7 @@ func (d *Driver) DriverName() string {
// GetIP returns an IP or hostname that this host is available at
func (d *Driver) GetIP() (string, error) {
ip, err := net.ChooseHostInterface()
ip, err := knet.ChooseHostInterface()
if err != nil {
return "", err
}
@ -123,11 +127,30 @@ func (d *Driver) GetURL() (string, error) {
// GetState returns the state that the host is in (running, stopped, etc)
func (d *Driver) GetState() (state.State, error) {
if err := checkKubelet(d.exec); err != nil {
glog.Infof("kubelet not running: %v", err)
return state.Stopped, nil
glog.Infof("GetState called")
ip, err := d.GetIP()
if err != nil {
return state.Error, err
}
return state.Running, nil
port, err := kubeconfig.Port(d.BaseDriver.MachineName)
if err != nil {
glog.Warningf("unable to get port: %v", err)
port = constants.APIServerPort
}
// Confusing logic, as libmachine.Stop will loop until the state == Stopped
ast, err := kverify.APIServerStatus(d.exec, net.ParseIP(ip), port)
if err != nil {
return ast, err
}
// If the apiserver is up, we'll claim to be up.
if ast == state.Paused || ast == state.Running {
return state.Running, nil
}
return kverify.KubeletStatus(d.exec)
}
// Kill stops a host forcefully, including any containers that we are managing.
@ -197,7 +220,7 @@ func (d *Driver) Start() error {
// Stop a host gracefully, including any containers that we are managing.
func (d *Driver) Stop() error {
if err := stopKubelet(d.exec); err != nil {
return err
return errors.Wrap(err, "stop kubelet")
}
containers, err := d.runtime.ListContainers(cruntime.ListOptions{})
if err != nil {
@ -205,9 +228,10 @@ func (d *Driver) Stop() error {
}
if len(containers) > 0 {
if err := d.runtime.StopContainers(containers); err != nil {
return errors.Wrap(err, "stop")
return errors.Wrap(err, "stop containers")
}
}
glog.Infof("none driver is stopped!")
return nil
}
@ -251,13 +275,3 @@ func restartKubelet(cr command.Runner) error {
}
return nil
}
// checkKubelet returns an error if the kubelet is not running.
func checkKubelet(cr command.Runner) error {
glog.Infof("checking for running kubelet ...")
c := exec.Command("systemctl", "is-active", "--quiet", "service", "kubelet")
if _, err := cr.RunCmd(c); err != nil {
return errors.Wrap(err, "check kubelet")
}
return nil
}

View File

@ -23,8 +23,8 @@ import (
"path/filepath"
"runtime"
"github.com/golang/glog"
"github.com/pkg/errors"
"github.com/spf13/viper"
"k8s.io/minikube/pkg/minikube/config"
"k8s.io/minikube/pkg/minikube/constants"
"k8s.io/minikube/pkg/minikube/localpath"
@ -54,14 +54,21 @@ func (a *Addon) Name() string {
return a.addonName
}
// IsEnabled checks if an Addon is enabled for the current profile
func (a *Addon) IsEnabled() (bool, error) {
c, err := config.Load(viper.GetString(config.MachineProfile))
if err == nil {
if status, ok := c.Addons[a.Name()]; ok {
return status, nil
}
// IsEnabled checks if an Addon is enabled for the given profile
func (a *Addon) IsEnabled(profile string) (bool, error) {
c, err := config.Load(profile)
if err != nil {
return false, errors.Wrap(err, "load")
}
// Is this addon explicitly listed in their configuration?
status, ok := c.Addons[a.Name()]
glog.V(1).Infof("IsEnabled %q = %v (listed in config=%v)", a.Name(), status, ok)
if ok {
return status, nil
}
// Return the default unconfigured state of the addon
return a.enabled, nil
}

View File

@ -20,7 +20,6 @@ package bsutil
import (
"path"
"github.com/pkg/errors"
"k8s.io/minikube/pkg/minikube/assets"
"k8s.io/minikube/pkg/minikube/config"
"k8s.io/minikube/pkg/minikube/vmpath"
@ -52,33 +51,3 @@ func ConfigFileAssets(cfg config.KubernetesConfig, kubeadm []byte, kubelet []byt
}
return fs
}
// AddAddons adds addons to list of files
func AddAddons(files *[]assets.CopyableFile, data interface{}) error {
// add addons to file list
// custom addons
if err := assets.AddMinikubeDirAssets(files); err != nil {
return errors.Wrap(err, "adding minikube dir assets")
}
// bundled addons
for _, addonBundle := range assets.Addons {
if isEnabled, err := addonBundle.IsEnabled(); err == nil && isEnabled {
for _, addon := range addonBundle.Assets {
if addon.IsTemplate() {
addonFile, err := addon.Evaluate(data)
if err != nil {
return errors.Wrapf(err, "evaluate bundled addon %s asset", addon.GetAssetName())
}
*files = append(*files, addonFile)
} else {
*files = append(*files, addon)
}
}
} else if err != nil {
return nil
}
}
return nil
}

View File

@ -120,7 +120,7 @@ func TestGenerateKubeadmYAMLDNS(t *testing.T) {
t.Run(tname, func(t *testing.T) {
cfg := tc.cfg
cfg.Nodes = []config.Node{
config.Node{
{
IP: "1.1.1.1",
Name: "mk",
ControlPlane: true,
@ -179,7 +179,7 @@ func TestGenerateKubeadmYAML(t *testing.T) {
{"options", "docker", false, config.MachineConfig{KubernetesConfig: config.KubernetesConfig{ExtraOptions: extraOpts}}},
{"crio-options-gates", "crio", false, config.MachineConfig{KubernetesConfig: config.KubernetesConfig{ExtraOptions: extraOpts, FeatureGates: "a=b"}}},
{"unknown-component", "docker", true, config.MachineConfig{KubernetesConfig: config.KubernetesConfig{ExtraOptions: config.ExtraOptionSlice{config.ExtraOption{Component: "not-a-real-component", Key: "killswitch", Value: "true"}}}}},
{"containerd-api-port", "containerd", false, config.MachineConfig{Nodes: []config.Node{config.Node{Port: 12345}}}},
{"containerd-api-port", "containerd", false, config.MachineConfig{Nodes: []config.Node{{Port: 12345}}}},
{"containerd-pod-network-cidr", "containerd", false, config.MachineConfig{KubernetesConfig: config.KubernetesConfig{ExtraOptions: extraOptsPodCidr}}},
{"image-repository", "docker", false, config.MachineConfig{KubernetesConfig: config.KubernetesConfig{ImageRepository: "test/repo"}}},
}
@ -199,7 +199,7 @@ func TestGenerateKubeadmYAML(t *testing.T) {
cfg.Nodes[0].ControlPlane = true
} else {
cfg.Nodes = []config.Node{
config.Node{
{
IP: "1.1.1.1",
Name: "mk",
ControlPlane: true,

View File

@ -42,7 +42,7 @@ func TestGenerateKubeletConfig(t *testing.T) {
ContainerRuntime: "docker",
},
Nodes: []config.Node{
config.Node{
{
IP: "192.168.1.100",
Name: "minikube",
ControlPlane: true,
@ -67,7 +67,7 @@ ExecStart=/var/lib/minikube/binaries/v1.11.10/kubelet --allow-privileged=true --
ContainerRuntime: "cri-o",
},
Nodes: []config.Node{
config.Node{
{
IP: "192.168.1.100",
Name: "minikube",
ControlPlane: true,
@ -92,7 +92,7 @@ ExecStart=/var/lib/minikube/binaries/v1.17.2/kubelet --authorization-mode=Webhoo
ContainerRuntime: "containerd",
},
Nodes: []config.Node{
config.Node{
{
IP: "192.168.1.100",
Name: "minikube",
ControlPlane: true,
@ -124,7 +124,7 @@ ExecStart=/var/lib/minikube/binaries/v1.17.2/kubelet --authorization-mode=Webhoo
},
},
Nodes: []config.Node{
config.Node{
{
IP: "192.168.1.100",
Name: "minikube",
ControlPlane: true,
@ -150,7 +150,7 @@ ExecStart=/var/lib/minikube/binaries/v1.17.2/kubelet --authorization-mode=Webhoo
ImageRepository: "docker-proxy-image.io/google_containers",
},
Nodes: []config.Node{
config.Node{
{
IP: "192.168.1.100",
Name: "minikube",
ControlPlane: true,

View File

@ -23,6 +23,9 @@ import (
"net"
"net/http"
"os/exec"
"path"
"strconv"
"strings"
"time"
"github.com/docker/machine/libmachine/state"
@ -37,13 +40,12 @@ import (
// APIServerProcess waits for api server to be healthy returns error if it doesn't
func APIServerProcess(runner command.Runner, start time.Time, timeout time.Duration) error {
glog.Infof("waiting for apiserver process to appear ...")
err := wait.PollImmediate(time.Second*1, timeout, func() (bool, error) {
err := wait.PollImmediate(time.Millisecond*500, timeout, func() (bool, error) {
if time.Since(start) > timeout {
return false, fmt.Errorf("cluster wait timed out during process check")
}
rr, ierr := runner.RunCmd(exec.Command("sudo", "pgrep", "kube-apiserver"))
if ierr != nil {
glog.Warningf("pgrep apiserver: %v cmd: %s", ierr, rr.Command())
if _, ierr := apiServerPID(runner); ierr != nil {
return false, nil
}
return true, nil
@ -55,6 +57,16 @@ func APIServerProcess(runner command.Runner, start time.Time, timeout time.Durat
return nil
}
// apiServerPID returns our best guess to the apiserver pid
func apiServerPID(cr command.Runner) (int, error) {
rr, err := cr.RunCmd(exec.Command("sudo", "pgrep", "-xnf", "kube-apiserver.*minikube.*"))
if err != nil {
return 0, err
}
s := strings.TrimSpace(rr.Stdout.String())
return strconv.Atoi(s)
}
// SystemPods verifies essential pods for running kurnetes is running
func SystemPods(client *kubernetes.Clientset, start time.Time, timeout time.Duration) error {
glog.Info("waiting for kube-system pods to appear ...")
@ -101,12 +113,12 @@ func APIServerIsRunning(start time.Time, ip string, port int, timeout time.Durat
return false, fmt.Errorf("cluster wait timed out during healthz check")
}
status, err := APIServerStatus(net.ParseIP(ip), port)
status, err := apiServerHealthz(net.ParseIP(ip), port)
if err != nil {
glog.Warningf("status: %v", err)
return false, nil
}
if status != "Running" {
if status != state.Running {
return false, nil
}
return true, nil
@ -119,9 +131,49 @@ func APIServerIsRunning(start time.Time, ip string, port int, timeout time.Durat
return nil
}
// APIServerStatus hits the /healthz endpoint and returns libmachine style state.State
func APIServerStatus(ip net.IP, apiserverPort int) (string, error) {
url := fmt.Sprintf("https://%s/healthz", net.JoinHostPort(ip.String(), fmt.Sprint(apiserverPort)))
// APIServerStatus returns apiserver status in libmachine style state.State
func APIServerStatus(cr command.Runner, ip net.IP, port int) (state.State, error) {
glog.Infof("Checking apiserver status ...")
pid, err := apiServerPID(cr)
if err != nil {
glog.Warningf("unable to get apiserver pid: %v", err)
return state.Stopped, nil
}
// Get the freezer cgroup entry for this pid
rr, err := cr.RunCmd(exec.Command("sudo", "egrep", "^[0-9]+:freezer:", fmt.Sprintf("/proc/%d/cgroup", pid)))
if err != nil {
glog.Warningf("unable to find freezer cgroup: %v", err)
return apiServerHealthz(ip, port)
}
freezer := strings.TrimSpace(rr.Stdout.String())
glog.Infof("apiserver freezer: %q", freezer)
fparts := strings.Split(freezer, ":")
if len(fparts) != 3 {
glog.Warningf("unable to parse freezer - found %d parts: %s", len(fparts), freezer)
return apiServerHealthz(ip, port)
}
rr, err = cr.RunCmd(exec.Command("sudo", "cat", path.Join("/sys/fs/cgroup/freezer", fparts[2], "freezer.state")))
if err != nil {
glog.Errorf("unable to get freezer state: %s", rr.Stderr.String())
return apiServerHealthz(ip, port)
}
fs := strings.TrimSpace(rr.Stdout.String())
glog.Infof("freezer state: %q", fs)
if fs == "FREEZING" || fs == "FROZEN" {
return state.Paused, nil
}
return apiServerHealthz(ip, port)
}
// apiServerHealthz hits the /healthz endpoint and returns libmachine style state.State
func apiServerHealthz(ip net.IP, port int) (state.State, error) {
url := fmt.Sprintf("https://%s/healthz", net.JoinHostPort(ip.String(), fmt.Sprint(port)))
glog.Infof("Checking apiserver healthz at %s ...", url)
// To avoid: x509: certificate signed by unknown authority
tr := &http.Transport{
Proxy: nil, // To avoid connectiv issue if http(s)_proxy is set.
@ -131,11 +183,31 @@ func APIServerStatus(ip net.IP, apiserverPort int) (string, error) {
resp, err := client.Get(url)
// Connection refused, usually.
if err != nil {
return state.Stopped.String(), nil
return state.Stopped, nil
}
if resp.StatusCode != http.StatusOK {
glog.Warningf("%s response: %v %+v", url, err, resp)
return state.Error.String(), nil
return state.Error, nil
}
return state.Running.String(), nil
return state.Running, nil
}
func KubeletStatus(cr command.Runner) (state.State, error) {
glog.Infof("Checking kubelet status ...")
rr, err := cr.RunCmd(exec.Command("sudo", "systemctl", "is-active", "kubelet"))
if err != nil {
// Do not return now, as we still have parsing to do!
glog.Warningf("%s returned error: %v", rr.Command(), err)
}
s := strings.TrimSpace(rr.Stdout.String())
glog.Infof("kubelet is-active: %s", s)
switch s {
case "active":
return state.Running, nil
case "inactive":
return state.Stopped, nil
case "activating":
return state.Starting, nil
}
return state.Error, nil
}

View File

@ -341,7 +341,7 @@ func configureCACerts(cr command.Runner, caCerts map[string]string) error {
for _, caCertFile := range caCerts {
dstFilename := path.Base(caCertFile)
certStorePath := path.Join(SSLCertStoreDir, dstFilename)
cmd := fmt.Sprintf("test -f %s || ln -s %s %s", caCertFile, certStorePath, caCertFile)
cmd := fmt.Sprintf("test -f %s || ln -fs %s %s", caCertFile, certStorePath, caCertFile)
if _, err := cr.RunCmd(exec.Command("sudo", "/bin/bash", "-c", cmd)); err != nil {
return errors.Wrapf(err, "create symlink for %s", caCertFile)
}
@ -352,7 +352,8 @@ func configureCACerts(cr command.Runner, caCerts map[string]string) error {
}
subjectHashLink := path.Join(SSLCertStoreDir, fmt.Sprintf("%s.0", subjectHash))
cmd := fmt.Sprintf("test -f %s || ln -s %s %s", subjectHashLink, certStorePath, subjectHashLink)
// NOTE: This symlink may exist, but point to a missing file
cmd := fmt.Sprintf("test -L %s || ln -fs %s %s", subjectHashLink, certStorePath, subjectHashLink)
if _, err := cr.RunCmd(exec.Command("sudo", "/bin/bash", "-c", cmd)); err != nil {
return errors.Wrapf(err, "create symlink for %s", caCertFile)
}

View File

@ -52,8 +52,8 @@ func TestSetupCerts(t *testing.T) {
}
expected := map[string]string{
`sudo /bin/bash -c "test -f /usr/share/ca-certificates/mycert.pem || ln -s /etc/ssl/certs/mycert.pem /usr/share/ca-certificates/mycert.pem"`: "-",
`sudo /bin/bash -c "test -f /usr/share/ca-certificates/minikubeCA.pem || ln -s /etc/ssl/certs/minikubeCA.pem /usr/share/ca-certificates/minikubeCA.pem"`: "-",
`sudo /bin/bash -c "test -f /usr/share/ca-certificates/mycert.pem || ln -fs /etc/ssl/certs/mycert.pem /usr/share/ca-certificates/mycert.pem"`: "-",
`sudo /bin/bash -c "test -f /usr/share/ca-certificates/minikubeCA.pem || ln -fs /etc/ssl/certs/minikubeCA.pem /usr/share/ca-certificates/minikubeCA.pem"`: "-",
}
f := command.NewFakeCommandRunner()
f.SetCommandToOutput(expected)

View File

@ -74,7 +74,7 @@ func coreDNS(v semver.Version, mirror string) string {
case 11:
cv = "1.1.3"
}
return path.Join(kubernetesRepo(mirror), "coredns"+archTag(false)+cv)
return path.Join(kubernetesRepo(mirror), "coredns"+":"+cv)
}
// etcd returns the image used for etcd

View File

@ -41,7 +41,6 @@ import (
"k8s.io/minikube/pkg/drivers/kic"
"k8s.io/minikube/pkg/drivers/kic/oci"
"k8s.io/minikube/pkg/kapi"
"k8s.io/minikube/pkg/minikube/assets"
"k8s.io/minikube/pkg/minikube/bootstrapper"
"k8s.io/minikube/pkg/minikube/bootstrapper/bsutil"
"k8s.io/minikube/pkg/minikube/bootstrapper/bsutil/kverify"
@ -99,42 +98,12 @@ func (k *Bootstrapper) GetKubeletStatus() (string, error) {
}
// GetAPIServerStatus returns the api-server status
func (k *Bootstrapper) GetAPIServerStatus(ip net.IP, apiserverPort int) (string, error) {
// sudo, in case hidepid is set
rr, err := k.c.RunCmd(exec.Command("sudo", "pgrep", "kube-apiserver"))
func (k *Bootstrapper) GetAPIServerStatus(ip net.IP, port int) (string, error) {
s, err := kverify.APIServerStatus(k.c, ip, port)
if err != nil {
return state.Stopped.String(), nil
return state.Error.String(), err
}
pid := strings.TrimSpace(rr.Stdout.String())
// Get the freezer cgroup entry for this pid
rr, err = k.c.RunCmd(exec.Command("sudo", "egrep", "^[0-9]+:freezer:", path.Join("/proc", pid, "cgroup")))
if err != nil {
glog.Warningf("unable to find freezer cgroup: %v", err)
return kverify.APIServerStatus(ip, apiserverPort)
}
freezer := strings.TrimSpace(rr.Stdout.String())
glog.Infof("apiserver freezer: %q", freezer)
fparts := strings.Split(freezer, ":")
if len(fparts) != 3 {
glog.Warningf("unable to parse freezer - found %d parts: %s", len(fparts), freezer)
return kverify.APIServerStatus(ip, apiserverPort)
}
rr, err = k.c.RunCmd(exec.Command("sudo", "cat", path.Join("/sys/fs/cgroup/freezer", fparts[2], "freezer.state")))
if err != nil {
glog.Errorf("unable to get freezer state: %s", rr.Stderr.String())
return kverify.APIServerStatus(ip, apiserverPort)
}
fs := strings.TrimSpace(rr.Stdout.String())
glog.Infof("freezer state: %q", fs)
if fs == "FREEZING" || fs == "FROZEN" {
return state.Paused.String(), nil
}
return kverify.APIServerStatus(ip, apiserverPort)
return s.String(), nil
}
// LogCommands returns a map of log type to a command which will display that log.
@ -372,7 +341,16 @@ func (k *Bootstrapper) restartCluster(cfg config.MachineConfig) error {
}
for _, n := range cfg.Nodes {
client, err := k.client(n.IP, n.Port)
ip := n.IP
port := n.Port
if driver.IsKIC(cfg.VMDriver) {
ip = kic.DefaultBindIPV4
port, err = oci.HostPortBinding(cfg.VMDriver, cfg.Name, port)
if err != nil {
return errors.Wrapf(err, "get host-bind port %d for container %s", port, cfg.Name)
}
}
client, err := k.client(ip, port)
if err != nil {
return errors.Wrap(err, "getting k8s client")
}
@ -484,10 +462,6 @@ func (k *Bootstrapper) UpdateCluster(cfg config.MachineConfig) error {
}
files := bsutil.ConfigFileAssets(cfg.KubernetesConfig, kubeadmCfg, kubeletCfg, kubeletService, cniFile)
if err := bsutil.AddAddons(&files, assets.GenerateTemplateData(cfg.KubernetesConfig)); err != nil {
return errors.Wrap(err, "adding addons")
}
// Combine mkdir request into a single call to reduce load
dirs := []string{}
for _, f := range files {

View File

@ -17,70 +17,11 @@ limitations under the License.
package cluster
import (
"encoding/json"
"flag"
"fmt"
"io/ioutil"
"math"
"net"
"os/exec"
"path"
"path/filepath"
"regexp"
"strconv"
"strings"
"time"
"github.com/docker/machine/libmachine"
"github.com/docker/machine/libmachine/drivers"
"github.com/docker/machine/libmachine/engine"
"github.com/docker/machine/libmachine/host"
"github.com/docker/machine/libmachine/mcnerror"
"github.com/docker/machine/libmachine/provision"
"github.com/docker/machine/libmachine/ssh"
"github.com/docker/machine/libmachine/state"
"github.com/golang/glog"
"github.com/juju/mutex"
"github.com/pkg/errors"
"github.com/shirou/gopsutil/cpu"
"github.com/shirou/gopsutil/disk"
"github.com/shirou/gopsutil/mem"
"github.com/spf13/viper"
"k8s.io/minikube/pkg/minikube/command"
"k8s.io/minikube/pkg/minikube/config"
"k8s.io/minikube/pkg/minikube/constants"
"k8s.io/minikube/pkg/minikube/driver"
"k8s.io/minikube/pkg/minikube/exit"
"k8s.io/minikube/pkg/minikube/localpath"
"k8s.io/minikube/pkg/minikube/out"
"k8s.io/minikube/pkg/minikube/registry"
"k8s.io/minikube/pkg/minikube/sshutil"
"k8s.io/minikube/pkg/minikube/vmpath"
"k8s.io/minikube/pkg/util/lock"
"k8s.io/minikube/pkg/util/retry"
)
// hostRunner is a minimal host.Host based interface for running commands
type hostRunner interface {
RunSSHCommand(string) (string, error)
}
var (
// The maximum the guest VM clock is allowed to be ahead and behind. This value is intentionally
// large to allow for inaccurate methodology, but still small enough so that certificates are likely valid.
maxClockDesyncSeconds = 2.1
// requiredDirectories are directories to create on the host during setup
requiredDirectories = []string{
vmpath.GuestAddonsDir,
vmpath.GuestManifestsDir,
vmpath.GuestEphemeralDir,
vmpath.GuestPersistentDir,
vmpath.GuestCertsDir,
path.Join(vmpath.GuestPersistentDir, "images"),
path.Join(vmpath.GuestPersistentDir, "binaries"),
}
)
// This init function is used to set the logtostderr variable to false so that INFO level log info does not clutter the CLI
@ -94,611 +35,3 @@ func init() {
// Setting the default client to native gives much better performance.
ssh.SetDefaultClient(ssh.Native)
}
// CacheISO downloads and caches ISO.
func CacheISO(cfg config.MachineConfig) error {
if driver.BareMetal(cfg.VMDriver) {
return nil
}
return cfg.Downloader.CacheMinikubeISOFromURL(cfg.MinikubeISO)
}
// StartHost starts a host VM.
func StartHost(api libmachine.API, cfg config.MachineConfig) (*host.Host, error) {
// Prevent machine-driver boot races, as well as our own certificate race
releaser, err := acquireMachinesLock(cfg.Name)
if err != nil {
return nil, errors.Wrap(err, "boot lock")
}
start := time.Now()
defer func() {
glog.Infof("releasing machines lock for %q, held for %s", cfg.Name, time.Since(start))
releaser.Release()
}()
exists, err := api.Exists(cfg.Name)
if err != nil {
return nil, errors.Wrapf(err, "exists: %s", cfg.Name)
}
if !exists {
glog.Infoln("Machine does not exist... provisioning new machine")
glog.Infof("Provisioning machine with config: %+v", cfg)
return createHost(api, cfg)
}
glog.Infoln("Skipping create...Using existing machine configuration")
h, err := api.Load(cfg.Name)
if err != nil {
return nil, errors.Wrap(err, "Error loading existing host. Please try running [minikube delete], then run [minikube start] again.")
}
if exists && cfg.Name == constants.DefaultMachineName {
out.T(out.Tip, "Tip: Use 'minikube start -p <name>' to create a new cluster, or 'minikube delete' to delete this one.")
}
s, err := h.Driver.GetState()
glog.Infoln("Machine state: ", s)
if err != nil {
return nil, errors.Wrap(err, "Error getting state for host")
}
if s == state.Running {
out.T(out.Running, `Using the running {{.driver_name}} "{{.profile_name}}" VM ...`, out.V{"driver_name": cfg.VMDriver, "profile_name": cfg.Name})
} else {
out.T(out.Restarting, `Starting existing {{.driver_name}} VM for "{{.profile_name}}" ...`, out.V{"driver_name": cfg.VMDriver, "profile_name": cfg.Name})
if err := h.Driver.Start(); err != nil {
return nil, errors.Wrap(err, "start")
}
if err := api.Save(h); err != nil {
return nil, errors.Wrap(err, "save")
}
}
e := engineOptions(cfg)
glog.Infof("engine options: %+v", e)
out.T(out.Waiting, "Waiting for the host to be provisioned ...")
err = configureHost(h, e)
if err != nil {
return nil, err
}
return h, nil
}
// acquireMachinesLock protects against code that is not parallel-safe (libmachine, cert setup)
func acquireMachinesLock(name string) (mutex.Releaser, error) {
spec := lock.PathMutexSpec(filepath.Join(localpath.MiniPath(), "machines"))
// NOTE: Provisioning generally completes within 60 seconds
spec.Timeout = 10 * time.Minute
glog.Infof("acquiring machines lock for %s: %+v", name, spec)
start := time.Now()
r, err := mutex.Acquire(spec)
if err == nil {
glog.Infof("acquired machines lock for %q in %s", name, time.Since(start))
}
return r, err
}
// configureHost handles any post-powerup configuration required
func configureHost(h *host.Host, e *engine.Options) error {
start := time.Now()
glog.Infof("configureHost: %+v", h.Driver)
defer func() {
glog.Infof("configureHost completed within %s", time.Since(start))
}()
if len(e.Env) > 0 {
h.HostOptions.EngineOptions.Env = e.Env
glog.Infof("Detecting provisioner ...")
provisioner, err := provision.DetectProvisioner(h.Driver)
if err != nil {
return errors.Wrap(err, "detecting provisioner")
}
glog.Infof("Provisioning with %s: %+v", provisioner.String(), *h.HostOptions)
if err := provisioner.Provision(*h.HostOptions.SwarmOptions, *h.HostOptions.AuthOptions, *h.HostOptions.EngineOptions); err != nil {
return errors.Wrap(err, "provision")
}
}
if driver.BareMetal(h.Driver.DriverName()) {
glog.Infof("%s is a local driver, skipping auth/time setup", h.Driver.DriverName())
return nil
}
glog.Infof("Configuring auth for driver %s ...", h.Driver.DriverName())
if err := h.ConfigureAuth(); err != nil {
return &retry.RetriableError{Err: errors.Wrap(err, "Error configuring auth on host")}
}
return ensureSyncedGuestClock(h)
}
// ensureGuestClockSync ensures that the guest system clock is relatively in-sync
func ensureSyncedGuestClock(h hostRunner) error {
d, err := guestClockDelta(h, time.Now())
if err != nil {
glog.Warningf("Unable to measure system clock delta: %v", err)
return nil
}
if math.Abs(d.Seconds()) < maxClockDesyncSeconds {
glog.Infof("guest clock delta is within tolerance: %s", d)
return nil
}
if err := adjustGuestClock(h, time.Now()); err != nil {
return errors.Wrap(err, "adjusting system clock")
}
return nil
}
// guestClockDelta returns the approximate difference between the host and guest system clock
// NOTE: This does not currently take into account ssh latency.
func guestClockDelta(h hostRunner, local time.Time) (time.Duration, error) {
out, err := h.RunSSHCommand("date +%s.%N")
if err != nil {
return 0, errors.Wrap(err, "get clock")
}
glog.Infof("guest clock: %s", out)
ns := strings.Split(strings.TrimSpace(out), ".")
secs, err := strconv.ParseInt(strings.TrimSpace(ns[0]), 10, 64)
if err != nil {
return 0, errors.Wrap(err, "atoi")
}
nsecs, err := strconv.ParseInt(strings.TrimSpace(ns[1]), 10, 64)
if err != nil {
return 0, errors.Wrap(err, "atoi")
}
// NOTE: In a synced state, remote is a few hundred ms ahead of local
remote := time.Unix(secs, nsecs)
d := remote.Sub(local)
glog.Infof("Guest: %s Remote: %s (delta=%s)", remote, local, d)
return d, nil
}
// adjustSystemClock adjusts the guest system clock to be nearer to the host system clock
func adjustGuestClock(h hostRunner, t time.Time) error {
out, err := h.RunSSHCommand(fmt.Sprintf("sudo date -s @%d", t.Unix()))
glog.Infof("clock set: %s (err=%v)", out, err)
return err
}
// trySSHPowerOff runs the poweroff command on the guest VM to speed up deletion
func trySSHPowerOff(h *host.Host) error {
s, err := h.Driver.GetState()
if err != nil {
glog.Warningf("unable to get state: %v", err)
return err
}
if s != state.Running {
glog.Infof("host is in state %s", s)
return nil
}
out.T(out.Shutdown, `Powering off "{{.profile_name}}" via SSH ...`, out.V{"profile_name": h.Name})
out, err := h.RunSSHCommand("sudo poweroff")
// poweroff always results in an error, since the host disconnects.
glog.Infof("poweroff result: out=%s, err=%v", out, err)
return nil
}
// StopHost stops the host VM, saving state to disk.
func StopHost(api libmachine.API) error {
machineName := viper.GetString(config.MachineProfile)
host, err := api.Load(machineName)
if err != nil {
return errors.Wrapf(err, "load")
}
out.T(out.Stopping, `Stopping "{{.profile_name}}" in {{.driver_name}} ...`, out.V{"profile_name": machineName, "driver_name": host.DriverName})
if host.DriverName == driver.HyperV {
glog.Infof("As there are issues with stopping Hyper-V VMs using API, trying to shut down using SSH")
if err := trySSHPowerOff(host); err != nil {
return errors.Wrap(err, "ssh power off")
}
}
if err := host.Stop(); err != nil {
alreadyInStateError, ok := err.(mcnerror.ErrHostAlreadyInState)
if ok && alreadyInStateError.State == state.Stopped {
return nil
}
return &retry.RetriableError{Err: errors.Wrapf(err, "Stop: %s", machineName)}
}
return nil
}
// DeleteHost deletes the host VM.
func DeleteHost(api libmachine.API, machineName string) error {
host, err := api.Load(machineName)
if err != nil {
return errors.Wrap(err, "load")
}
// Get the status of the host. Ensure that it exists before proceeding ahead.
status, err := GetHostStatus(api, machineName)
if err != nil {
// Warn, but proceed
out.WarningT("Unable to get the status of the {{.name}} cluster.", out.V{"name": machineName})
}
if status == state.None.String() {
return mcnerror.ErrHostDoesNotExist{Name: host.Name}
}
// This is slow if SSH is not responding, but HyperV hangs otherwise, See issue #2914
if host.Driver.DriverName() == driver.HyperV {
if err := trySSHPowerOff(host); err != nil {
glog.Infof("Unable to power off minikube because the host was not found.")
}
out.T(out.DeletingHost, "Successfully powered off Hyper-V. minikube driver -- {{.driver}}", out.V{"driver": host.Driver.DriverName()})
}
out.T(out.DeletingHost, `Deleting "{{.profile_name}}" in {{.driver_name}} ...`, out.V{"profile_name": machineName, "driver_name": host.DriverName})
if err := host.Driver.Remove(); err != nil {
return errors.Wrap(err, "host remove")
}
if err := api.Remove(machineName); err != nil {
return errors.Wrap(err, "api remove")
}
return nil
}
// GetHostStatus gets the status of the host VM.
func GetHostStatus(api libmachine.API, machineName string) (string, error) {
exists, err := api.Exists(machineName)
if err != nil {
return "", errors.Wrapf(err, "%s exists", machineName)
}
if !exists {
return state.None.String(), nil
}
host, err := api.Load(machineName)
if err != nil {
return "", errors.Wrapf(err, "load")
}
s, err := host.Driver.GetState()
if err != nil {
return "", errors.Wrap(err, "state")
}
return s.String(), nil
}
// GetHostDriverIP gets the ip address of the current minikube cluster
func GetHostDriverIP(api libmachine.API, machineName string) (net.IP, error) {
host, err := CheckIfHostExistsAndLoad(api, machineName)
if err != nil {
return nil, err
}
ipStr, err := host.Driver.GetIP()
if err != nil {
return nil, errors.Wrap(err, "getting IP")
}
ip := net.ParseIP(ipStr)
if ip == nil {
return nil, fmt.Errorf("parsing IP: %s", ipStr)
}
return ip, nil
}
func engineOptions(cfg config.MachineConfig) *engine.Options {
o := engine.Options{
Env: cfg.DockerEnv,
InsecureRegistry: append([]string{constants.DefaultServiceCIDR}, cfg.InsecureRegistry...),
RegistryMirror: cfg.RegistryMirror,
ArbitraryFlags: cfg.DockerOpt,
InstallURL: drivers.DefaultEngineInstallURL,
}
return &o
}
type hostInfo struct {
Memory int
CPUs int
DiskSize int
}
func megs(bytes uint64) int {
return int(bytes / 1024 / 1024)
}
func getHostInfo() (*hostInfo, error) {
i, err := cpu.Info()
if err != nil {
glog.Warningf("Unable to get CPU info: %v", err)
return nil, err
}
v, err := mem.VirtualMemory()
if err != nil {
glog.Warningf("Unable to get mem info: %v", err)
return nil, err
}
d, err := disk.Usage("/")
if err != nil {
glog.Warningf("Unable to get disk info: %v", err)
return nil, err
}
var info hostInfo
info.CPUs = len(i)
info.Memory = megs(v.Total)
info.DiskSize = megs(d.Total)
return &info, nil
}
// showLocalOsRelease shows systemd information about the current linux distribution, on the local host
func showLocalOsRelease() {
osReleaseOut, err := ioutil.ReadFile("/etc/os-release")
if err != nil {
glog.Errorf("ReadFile: %v", err)
return
}
osReleaseInfo, err := provision.NewOsRelease(osReleaseOut)
if err != nil {
glog.Errorf("NewOsRelease: %v", err)
return
}
out.T(out.Provisioner, "OS release is {{.pretty_name}}", out.V{"pretty_name": osReleaseInfo.PrettyName})
}
// showRemoteOsRelease shows systemd information about the current linux distribution, on the remote VM
func showRemoteOsRelease(driver drivers.Driver) {
provisioner, err := provision.DetectProvisioner(driver)
if err != nil {
glog.Errorf("DetectProvisioner: %v", err)
return
}
osReleaseInfo, err := provisioner.GetOsReleaseInfo()
if err != nil {
glog.Errorf("GetOsReleaseInfo: %v", err)
return
}
glog.Infof("Provisioned with %s", osReleaseInfo.PrettyName)
}
// showHostInfo shows host information
func showHostInfo(cfg config.MachineConfig) {
if driver.BareMetal(cfg.VMDriver) {
info, err := getHostInfo()
if err == nil {
out.T(out.StartingNone, "Running on localhost (CPUs={{.number_of_cpus}}, Memory={{.memory_size}}MB, Disk={{.disk_size}}MB) ...", out.V{"number_of_cpus": info.CPUs, "memory_size": info.Memory, "disk_size": info.DiskSize})
}
} else if driver.IsKIC(cfg.VMDriver) {
info, err := getHostInfo() // TODO medyagh: get docker-machine info for non linux
if err == nil {
out.T(out.StartingVM, "Creating Kubernetes in {{.driver_name}} container with (CPUs={{.number_of_cpus}}), Memory={{.memory_size}}MB ({{.host_memory_size}}MB available) ...", out.V{"driver_name": cfg.VMDriver, "number_of_cpus": cfg.CPUs, "number_of_host_cpus": info.CPUs, "memory_size": cfg.Memory, "host_memory_size": info.Memory})
}
} else {
out.T(out.StartingVM, "Creating {{.driver_name}} VM (CPUs={{.number_of_cpus}}, Memory={{.memory_size}}MB, Disk={{.disk_size}}MB) ...", out.V{"driver_name": cfg.VMDriver, "number_of_cpus": cfg.CPUs, "memory_size": cfg.Memory, "disk_size": cfg.DiskSize})
}
}
func createHost(api libmachine.API, cfg config.MachineConfig) (*host.Host, error) {
if cfg.VMDriver == driver.VMwareFusion && viper.GetBool(config.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://minikube.sigs.k8s.io/docs/reference/drivers/vmware/ for more information.
To disable this message, run [minikube config set ShowDriverDeprecationNotification false]`)
}
showHostInfo(cfg)
def := registry.Driver(cfg.VMDriver)
if def.Empty() {
return nil, fmt.Errorf("unsupported/missing driver: %s", cfg.VMDriver)
}
dd := def.Config(cfg)
data, err := json.Marshal(dd)
if err != nil {
return nil, errors.Wrap(err, "marshal")
}
h, err := api.NewHost(cfg.VMDriver, data)
if err != nil {
return nil, errors.Wrap(err, "new host")
}
h.HostOptions.AuthOptions.CertDir = localpath.MiniPath()
h.HostOptions.AuthOptions.StorePath = localpath.MiniPath()
h.HostOptions.EngineOptions = engineOptions(cfg)
if err := api.Create(h); err != nil {
// Wait for all the logs to reach the client
time.Sleep(2 * time.Second)
return nil, errors.Wrap(err, "create")
}
if err := createRequiredDirectories(h); err != nil {
return h, errors.Wrap(err, "required directories")
}
if driver.BareMetal(cfg.VMDriver) {
showLocalOsRelease()
} else if !driver.BareMetal(cfg.VMDriver) && !driver.IsKIC(cfg.VMDriver) {
showRemoteOsRelease(h.Driver)
// Ensure that even new VM's have proper time synchronization up front
// It's 2019, and I can't believe I am still dealing with time desync as a problem.
if err := ensureSyncedGuestClock(h); err != nil {
return h, err
}
} // TODO:medyagh add show-os release for kic
if err := api.Save(h); err != nil {
return nil, errors.Wrap(err, "save")
}
return h, nil
}
// GetHostDockerEnv gets the necessary docker env variables to allow the use of docker through minikube's vm
func GetHostDockerEnv(api libmachine.API) (map[string]string, error) {
host, err := CheckIfHostExistsAndLoad(api, viper.GetString(config.MachineProfile))
if err != nil {
return nil, errors.Wrap(err, "Error checking that api exists and loading it")
}
ip, err := host.Driver.GetIP()
if err != nil {
return nil, errors.Wrap(err, "Error getting ip from host")
}
tcpPrefix := "tcp://"
port := "2376"
envMap := map[string]string{
"DOCKER_TLS_VERIFY": "1",
"DOCKER_HOST": tcpPrefix + net.JoinHostPort(ip, port),
"DOCKER_CERT_PATH": localpath.MakeMiniPath("certs"),
}
return envMap, nil
}
// GetVMHostIP gets the ip address to be used for mapping host -> VM and VM -> host
func GetVMHostIP(host *host.Host) (net.IP, error) {
switch host.DriverName {
case driver.KVM2:
return net.ParseIP("192.168.39.1"), nil
case driver.HyperV:
re := regexp.MustCompile(`"VSwitch": "(.*?)",`)
// TODO(aprindle) Change this to deserialize the driver instead
hypervVirtualSwitch := re.FindStringSubmatch(string(host.RawDriver))[1]
ip, err := getIPForInterface(fmt.Sprintf("vEthernet (%s)", hypervVirtualSwitch))
if err != nil {
return []byte{}, errors.Wrap(err, fmt.Sprintf("ip for interface (%s)", hypervVirtualSwitch))
}
return ip, nil
case driver.VirtualBox:
out, err := exec.Command(driver.VBoxManagePath(), "showvminfo", host.Name, "--machinereadable").Output()
if err != nil {
return []byte{}, errors.Wrap(err, "vboxmanage")
}
re := regexp.MustCompile(`hostonlyadapter2="(.*?)"`)
iface := re.FindStringSubmatch(string(out))[1]
ip, err := getIPForInterface(iface)
if err != nil {
return []byte{}, errors.Wrap(err, "Error getting VM/Host IP address")
}
return ip, nil
case driver.HyperKit:
return net.ParseIP("192.168.64.1"), nil
case driver.VMware:
vmIPString, err := host.Driver.GetIP()
if err != nil {
return []byte{}, errors.Wrap(err, "Error getting VM IP address")
}
vmIP := net.ParseIP(vmIPString).To4()
if vmIP == nil {
return []byte{}, errors.Wrap(err, "Error converting VM IP address to IPv4 address")
}
return net.IPv4(vmIP[0], vmIP[1], vmIP[2], byte(1)), nil
default:
return []byte{}, errors.New("Error, attempted to get host ip address for unsupported driver")
}
}
// Based on code from http://stackoverflow.com/questions/23529663/how-to-get-all-addresses-and-masks-from-local-interfaces-in-go
func getIPForInterface(name string) (net.IP, error) {
i, _ := net.InterfaceByName(name)
addrs, _ := i.Addrs()
for _, a := range addrs {
if ipnet, ok := a.(*net.IPNet); ok {
if ip := ipnet.IP.To4(); ip != nil {
return ip, nil
}
}
}
return nil, errors.Errorf("Error finding IPV4 address for %s", name)
}
// CheckIfHostExistsAndLoad checks if a host exists, and loads it if it does
func CheckIfHostExistsAndLoad(api libmachine.API, machineName string) (*host.Host, error) {
exists, err := api.Exists(machineName)
if err != nil {
return nil, errors.Wrapf(err, "Error checking that machine exists: %s", machineName)
}
if !exists {
return nil, errors.Errorf("Machine does not exist for api.Exists(%s)", machineName)
}
host, err := api.Load(machineName)
if err != nil {
return nil, errors.Wrapf(err, "Error loading store for: %s", machineName)
}
return host, nil
}
// CreateSSHShell creates a new SSH shell / client
func CreateSSHShell(api libmachine.API, args []string) error {
machineName := viper.GetString(config.MachineProfile)
host, err := CheckIfHostExistsAndLoad(api, machineName)
if err != nil {
return errors.Wrap(err, "host exists and load")
}
currentState, err := host.Driver.GetState()
if err != nil {
return errors.Wrap(err, "state")
}
if currentState != state.Running {
return errors.Errorf("%q is not running", machineName)
}
client, err := host.CreateSSHClient()
if err != nil {
return errors.Wrap(err, "Creating ssh client")
}
return client.Shell(args...)
}
// IsMinikubeRunning checks that minikube has a status available and that
// the status is `Running`
func IsMinikubeRunning(api libmachine.API) bool {
s, err := GetHostStatus(api, viper.GetString(config.MachineProfile))
if err != nil {
return false
}
if s != state.Running.String() {
return false
}
return true
}
// createRequiredDirectories creates directories expected by minikube to exist
func createRequiredDirectories(h *host.Host) error {
if h.DriverName == driver.Mock {
glog.Infof("skipping createRequiredDirectories")
return nil
}
glog.Infof("creating required directories: %v", requiredDirectories)
r, err := commandRunner(h)
if err != nil {
return errors.Wrap(err, "command runner")
}
args := append([]string{"mkdir", "-p"}, requiredDirectories...)
if _, err := r.RunCmd(exec.Command("sudo", args...)); err != nil {
return errors.Wrapf(err, "sudo mkdir (%s)", h.DriverName)
}
return nil
}
// commandRunner returns best available command runner for this host
func commandRunner(h *host.Host) (command.Runner, error) {
if h.DriverName == driver.Mock {
glog.Errorf("commandRunner: returning unconfigured FakeCommandRunner, commands will fail!")
return &command.FakeCommandRunner{}, nil
}
if driver.BareMetal(h.Driver.DriverName()) {
return &command.ExecRunner{}, nil
}
if h.Driver.DriverName() == driver.Docker {
return command.NewKICRunner(h.Name, "docker"), nil
}
client, err := sshutil.NewSSHClient(h.Driver)
if err != nil {
return nil, errors.Wrap(err, "getting ssh client for bootstrapper")
}
return command.NewSSHRunner(client), nil
}

View File

@ -0,0 +1,76 @@
/*
Copyright 2020 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 cluster
import (
"os/exec"
"github.com/docker/machine/libmachine"
"github.com/docker/machine/libmachine/mcnerror"
"github.com/docker/machine/libmachine/state"
"github.com/golang/glog"
"github.com/pkg/errors"
"k8s.io/minikube/pkg/drivers/kic/oci"
"k8s.io/minikube/pkg/minikube/driver"
"k8s.io/minikube/pkg/minikube/out"
)
// deleteOrphanedKIC attempts to delete an orphaned docker instance
func deleteOrphanedKIC(name string) {
cmd := exec.Command(oci.Docker, "rm", "-f", "-v", name)
err := cmd.Run()
if err == nil {
glog.Infof("Found stale kic container and successfully cleaned it up!")
}
}
// DeleteHost deletes the host VM.
func DeleteHost(api libmachine.API, machineName string) error {
host, err := api.Load(machineName)
if err != nil && host == nil {
deleteOrphanedKIC(machineName)
// keep going even if minikube does not know about the host
}
// Get the status of the host. Ensure that it exists before proceeding ahead.
status, err := GetHostStatus(api, machineName)
if err != nil {
// Warn, but proceed
out.WarningT("Unable to get the status of the {{.name}} cluster.", out.V{"name": machineName})
}
if status == state.None.String() {
return mcnerror.ErrHostDoesNotExist{Name: machineName}
}
// This is slow if SSH is not responding, but HyperV hangs otherwise, See issue #2914
if host.Driver.DriverName() == driver.HyperV {
if err := trySSHPowerOff(host); err != nil {
glog.Infof("Unable to power off minikube because the host was not found.")
}
out.T(out.DeletingHost, "Successfully powered off Hyper-V. minikube driver -- {{.driver}}", out.V{"driver": host.Driver.DriverName()})
}
out.T(out.DeletingHost, `Deleting "{{.profile_name}}" in {{.driver_name}} ...`, out.V{"profile_name": machineName, "driver_name": host.DriverName})
if err := host.Driver.Remove(); err != nil {
return errors.Wrap(err, "host remove")
}
if err := api.Remove(machineName); err != nil {
return errors.Wrap(err, "api remove")
}
return nil
}

View File

@ -0,0 +1,66 @@
/*
Copyright 2020 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 cluster
import (
"fmt"
"net"
"github.com/docker/machine/libmachine"
"github.com/pkg/errors"
"github.com/spf13/viper"
"k8s.io/minikube/pkg/drivers/kic"
"k8s.io/minikube/pkg/drivers/kic/oci"
"k8s.io/minikube/pkg/minikube/config"
"k8s.io/minikube/pkg/minikube/constants"
"k8s.io/minikube/pkg/minikube/driver"
"k8s.io/minikube/pkg/minikube/localpath"
)
// GetHostDockerEnv gets the necessary docker env variables to allow the use of docker through minikube's vm
func GetHostDockerEnv(api libmachine.API) (map[string]string, error) {
pName := viper.GetString(config.MachineProfile)
host, err := CheckIfHostExistsAndLoad(api, pName)
if err != nil {
return nil, errors.Wrap(err, "Error checking that api exists and loading it")
}
ip := kic.DefaultBindIPV4
if !driver.IsKIC(host.Driver.DriverName()) { // kic externally accessible ip is different that node ip
ip, err = host.Driver.GetIP()
if err != nil {
return nil, errors.Wrap(err, "Error getting ip from host")
}
}
tcpPrefix := "tcp://"
port := constants.DockerDaemonPort
if driver.IsKIC(host.Driver.DriverName()) { // for kic we need to find out what port docker allocated during creation
port, err = oci.HostPortBinding(host.Driver.DriverName(), pName, constants.DockerDaemonPort)
if err != nil {
return nil, errors.Wrapf(err, "get hostbind port for %d", constants.DockerDaemonPort)
}
}
envMap := map[string]string{
"DOCKER_TLS_VERIFY": "1",
"DOCKER_HOST": tcpPrefix + net.JoinHostPort(ip, fmt.Sprint(port)),
"DOCKER_CERT_PATH": localpath.MakeMiniPath("certs"),
}
return envMap, nil
}

155
pkg/minikube/cluster/fix.go Normal file
View File

@ -0,0 +1,155 @@
/*
Copyright 2020 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 cluster
import (
"fmt"
"math"
"strconv"
"strings"
"time"
"github.com/docker/machine/libmachine"
"github.com/docker/machine/libmachine/host"
"github.com/docker/machine/libmachine/provision"
"github.com/docker/machine/libmachine/state"
"github.com/golang/glog"
"github.com/pkg/errors"
"k8s.io/minikube/pkg/minikube/config"
"k8s.io/minikube/pkg/minikube/driver"
"k8s.io/minikube/pkg/minikube/out"
"k8s.io/minikube/pkg/util/retry"
)
// hostRunner is a minimal host.Host based interface for running commands
type hostRunner interface {
RunSSHCommand(string) (string, error)
}
const (
// The maximum the guest VM clock is allowed to be ahead and behind. This value is intentionally
// large to allow for inaccurate methodology, but still small enough so that certificates are likely valid.
maxClockDesyncSeconds = 2.1
)
// fixHost fixes up a previously configured VM so that it is ready to run Kubernetes
func fixHost(api libmachine.API, mc config.MachineConfig) (*host.Host, error) {
out.T(out.Waiting, "Reconfiguring existing host ...")
start := time.Now()
glog.Infof("fixHost starting: %s", mc.Name)
defer func() {
glog.Infof("fixHost completed within %s", time.Since(start))
}()
h, err := api.Load(mc.Name)
if err != nil {
return h, errors.Wrap(err, "Error loading existing host. Please try running [minikube delete], then run [minikube start] again.")
}
s, err := h.Driver.GetState()
if err != nil {
return h, errors.Wrap(err, "Error getting state for host")
}
if s == state.Running {
out.T(out.Running, `Using the running {{.driver_name}} "{{.profile_name}}" VM ...`, out.V{"driver_name": mc.VMDriver, "profile_name": mc.Name})
} else {
out.T(out.Restarting, `Starting existing {{.driver_name}} VM for "{{.profile_name}}" ...`, out.V{"driver_name": mc.VMDriver, "profile_name": mc.Name})
if err := h.Driver.Start(); err != nil {
return h, errors.Wrap(err, "driver start")
}
if err := api.Save(h); err != nil {
return h, errors.Wrap(err, "save")
}
}
e := engineOptions(mc)
if len(e.Env) > 0 {
h.HostOptions.EngineOptions.Env = e.Env
glog.Infof("Detecting provisioner ...")
provisioner, err := provision.DetectProvisioner(h.Driver)
if err != nil {
return h, errors.Wrap(err, "detecting provisioner")
}
if err := provisioner.Provision(*h.HostOptions.SwarmOptions, *h.HostOptions.AuthOptions, *h.HostOptions.EngineOptions); err != nil {
return h, errors.Wrap(err, "provision")
}
}
if h.DriverName == driver.Mock {
return h, nil
}
if err := postStartSetup(h, mc); err != nil {
return h, errors.Wrap(err, "post-start")
}
glog.Infof("Configuring auth for driver %s ...", h.Driver.DriverName())
if err := h.ConfigureAuth(); err != nil {
return h, &retry.RetriableError{Err: errors.Wrap(err, "Error configuring auth on host")}
}
return h, ensureSyncedGuestClock(h)
}
// ensureGuestClockSync ensures that the guest system clock is relatively in-sync
func ensureSyncedGuestClock(h hostRunner) error {
d, err := guestClockDelta(h, time.Now())
if err != nil {
glog.Warningf("Unable to measure system clock delta: %v", err)
return nil
}
if math.Abs(d.Seconds()) < maxClockDesyncSeconds {
glog.Infof("guest clock delta is within tolerance: %s", d)
return nil
}
if err := adjustGuestClock(h, time.Now()); err != nil {
return errors.Wrap(err, "adjusting system clock")
}
return nil
}
// guestClockDelta returns the approximate difference between the host and guest system clock
// NOTE: This does not currently take into account ssh latency.
func guestClockDelta(h hostRunner, local time.Time) (time.Duration, error) {
out, err := h.RunSSHCommand("date +%s.%N")
if err != nil {
return 0, errors.Wrap(err, "get clock")
}
glog.Infof("guest clock: %s", out)
ns := strings.Split(strings.TrimSpace(out), ".")
secs, err := strconv.ParseInt(strings.TrimSpace(ns[0]), 10, 64)
if err != nil {
return 0, errors.Wrap(err, "atoi")
}
nsecs, err := strconv.ParseInt(strings.TrimSpace(ns[1]), 10, 64)
if err != nil {
return 0, errors.Wrap(err, "atoi")
}
// NOTE: In a synced state, remote is a few hundred ms ahead of local
remote := time.Unix(secs, nsecs)
d := remote.Sub(local)
glog.Infof("Guest: %s Remote: %s (delta=%s)", remote, local, d)
return d, nil
}
// adjustSystemClock adjusts the guest system clock to be nearer to the host system clock
func adjustGuestClock(h hostRunner, t time.Time) error {
out, err := h.RunSSHCommand(fmt.Sprintf("sudo date -s @%d", t.Unix()))
glog.Infof("clock set: %s (err=%v)", out, err)
return err
}

View File

@ -0,0 +1,116 @@
/*
Copyright 2020 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 cluster
import (
"io/ioutil"
"github.com/docker/machine/libmachine/drivers"
"github.com/docker/machine/libmachine/provision"
"github.com/golang/glog"
"github.com/shirou/gopsutil/cpu"
"github.com/shirou/gopsutil/disk"
"github.com/shirou/gopsutil/mem"
"k8s.io/minikube/pkg/minikube/config"
"k8s.io/minikube/pkg/minikube/driver"
"k8s.io/minikube/pkg/minikube/out"
)
type hostInfo struct {
Memory int
CPUs int
DiskSize int
}
func megs(bytes uint64) int {
return int(bytes / 1024 / 1024)
}
func getHostInfo() (*hostInfo, error) {
i, err := cpu.Info()
if err != nil {
glog.Warningf("Unable to get CPU info: %v", err)
return nil, err
}
v, err := mem.VirtualMemory()
if err != nil {
glog.Warningf("Unable to get mem info: %v", err)
return nil, err
}
d, err := disk.Usage("/")
if err != nil {
glog.Warningf("Unable to get disk info: %v", err)
return nil, err
}
var info hostInfo
info.CPUs = len(i)
info.Memory = megs(v.Total)
info.DiskSize = megs(d.Total)
return &info, nil
}
// showLocalOsRelease shows systemd information about the current linux distribution, on the local host
func showLocalOsRelease() {
osReleaseOut, err := ioutil.ReadFile("/etc/os-release")
if err != nil {
glog.Errorf("ReadFile: %v", err)
return
}
osReleaseInfo, err := provision.NewOsRelease(osReleaseOut)
if err != nil {
glog.Errorf("NewOsRelease: %v", err)
return
}
out.T(out.Provisioner, "OS release is {{.pretty_name}}", out.V{"pretty_name": osReleaseInfo.PrettyName})
}
// showRemoteOsRelease shows systemd information about the current linux distribution, on the remote VM
func showRemoteOsRelease(driver drivers.Driver) {
provisioner, err := provision.DetectProvisioner(driver)
if err != nil {
glog.Errorf("DetectProvisioner: %v", err)
return
}
osReleaseInfo, err := provisioner.GetOsReleaseInfo()
if err != nil {
glog.Errorf("GetOsReleaseInfo: %v", err)
return
}
glog.Infof("Provisioned with %s", osReleaseInfo.PrettyName)
}
// showHostInfo shows host information
func showHostInfo(cfg config.MachineConfig) {
if driver.BareMetal(cfg.VMDriver) {
info, err := getHostInfo()
if err == nil {
out.T(out.StartingNone, "Running on localhost (CPUs={{.number_of_cpus}}, Memory={{.memory_size}}MB, Disk={{.disk_size}}MB) ...", out.V{"number_of_cpus": info.CPUs, "memory_size": info.Memory, "disk_size": info.DiskSize})
}
} else if driver.IsKIC(cfg.VMDriver) {
info, err := getHostInfo() // TODO medyagh: get docker-machine info for non linux
if err == nil {
out.T(out.StartingVM, "Creating Kubernetes in {{.driver_name}} container with (CPUs={{.number_of_cpus}}), Memory={{.memory_size}}MB ({{.host_memory_size}}MB available) ...", out.V{"driver_name": cfg.VMDriver, "number_of_cpus": cfg.CPUs, "number_of_host_cpus": info.CPUs, "memory_size": cfg.Memory, "host_memory_size": info.Memory})
}
} else {
out.T(out.StartingVM, "Creating {{.driver_name}} VM (CPUs={{.number_of_cpus}}, Memory={{.memory_size}}MB, Disk={{.disk_size}}MB) ...", out.V{"driver_name": cfg.VMDriver, "number_of_cpus": cfg.CPUs, "memory_size": cfg.Memory, "disk_size": cfg.DiskSize})
}
}

108
pkg/minikube/cluster/ip.go Normal file
View File

@ -0,0 +1,108 @@
/*
Copyright 2020 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 cluster
import (
"fmt"
"net"
"os/exec"
"regexp"
"github.com/docker/machine/libmachine"
"github.com/docker/machine/libmachine/host"
"github.com/pkg/errors"
"k8s.io/minikube/pkg/drivers/kic"
"k8s.io/minikube/pkg/minikube/driver"
)
// GetVMHostIP gets the ip address to be used for mapping host -> VM and VM -> host
func GetVMHostIP(host *host.Host) (net.IP, error) {
switch host.DriverName {
case driver.KVM2:
return net.ParseIP("192.168.39.1"), nil
case driver.HyperV:
re := regexp.MustCompile(`"VSwitch": "(.*?)",`)
// TODO(aprindle) Change this to deserialize the driver instead
hypervVirtualSwitch := re.FindStringSubmatch(string(host.RawDriver))[1]
ip, err := getIPForInterface(fmt.Sprintf("vEthernet (%s)", hypervVirtualSwitch))
if err != nil {
return []byte{}, errors.Wrap(err, fmt.Sprintf("ip for interface (%s)", hypervVirtualSwitch))
}
return ip, nil
case driver.VirtualBox:
out, err := exec.Command(driver.VBoxManagePath(), "showvminfo", host.Name, "--machinereadable").Output()
if err != nil {
return []byte{}, errors.Wrap(err, "vboxmanage")
}
re := regexp.MustCompile(`hostonlyadapter2="(.*?)"`)
iface := re.FindStringSubmatch(string(out))[1]
ip, err := getIPForInterface(iface)
if err != nil {
return []byte{}, errors.Wrap(err, "Error getting VM/Host IP address")
}
return ip, nil
case driver.HyperKit:
return net.ParseIP("192.168.64.1"), nil
case driver.VMware:
vmIPString, err := host.Driver.GetIP()
if err != nil {
return []byte{}, errors.Wrap(err, "Error getting VM IP address")
}
vmIP := net.ParseIP(vmIPString).To4()
if vmIP == nil {
return []byte{}, errors.Wrap(err, "Error converting VM IP address to IPv4 address")
}
return net.IPv4(vmIP[0], vmIP[1], vmIP[2], byte(1)), nil
default:
return []byte{}, errors.New("Error, attempted to get host ip address for unsupported driver")
}
}
// GetHostDriverIP gets the ip address of the current minikube cluster
func GetHostDriverIP(api libmachine.API, machineName string) (net.IP, error) {
host, err := CheckIfHostExistsAndLoad(api, machineName)
if err != nil {
return nil, err
}
ipStr, err := host.Driver.GetIP()
if err != nil {
return nil, errors.Wrap(err, "getting IP")
}
if driver.IsKIC(host.DriverName) {
ipStr = kic.DefaultBindIPV4
}
ip := net.ParseIP(ipStr)
if ip == nil {
return nil, fmt.Errorf("parsing IP: %s", ipStr)
}
return ip, nil
}
// Based on code from http://stackoverflow.com/questions/23529663/how-to-get-all-addresses-and-masks-from-local-interfaces-in-go
func getIPForInterface(name string) (net.IP, error) {
i, _ := net.InterfaceByName(name)
addrs, _ := i.Addrs()
for _, a := range addrs {
if ipnet, ok := a.(*net.IPNet); ok {
if ip := ipnet.IP.To4(); ip != nil {
return ip, nil
}
}
}
return nil, errors.Errorf("Error finding IPV4 address for %s", name)
}

View File

@ -0,0 +1,30 @@
/*
Copyright 2020 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 cluster
import (
"k8s.io/minikube/pkg/minikube/config"
"k8s.io/minikube/pkg/minikube/driver"
)
// CacheISO downloads and caches ISO.
func CacheISO(cfg config.MachineConfig) error {
if driver.BareMetal(cfg.VMDriver) {
return nil
}
return cfg.Downloader.CacheMinikubeISOFromURL(cfg.MinikubeISO)
}

View File

@ -0,0 +1,49 @@
/*
Copyright 2020 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 cluster
import (
"github.com/docker/machine/libmachine"
"github.com/docker/machine/libmachine/state"
"github.com/pkg/errors"
"github.com/spf13/viper"
"k8s.io/minikube/pkg/minikube/config"
)
// CreateSSHShell creates a new SSH shell / client
func CreateSSHShell(api libmachine.API, args []string) error {
machineName := viper.GetString(config.MachineProfile)
host, err := CheckIfHostExistsAndLoad(api, machineName)
if err != nil {
return errors.Wrap(err, "host exists and load")
}
currentState, err := host.Driver.GetState()
if err != nil {
return errors.Wrap(err, "state")
}
if currentState != state.Running {
return errors.Errorf("%q is not running", machineName)
}
client, err := host.CreateSSHClient()
if err != nil {
return errors.Wrap(err, "Creating ssh client")
}
return client.Shell(args...)
}

View File

@ -0,0 +1,202 @@
/*
Copyright 2020 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 cluster
import (
"encoding/json"
"fmt"
"os/exec"
"path"
"path/filepath"
"time"
"github.com/docker/machine/libmachine"
"github.com/docker/machine/libmachine/drivers"
"github.com/docker/machine/libmachine/engine"
"github.com/docker/machine/libmachine/host"
"github.com/golang/glog"
"github.com/juju/mutex"
"github.com/pkg/errors"
"github.com/spf13/viper"
"k8s.io/minikube/pkg/minikube/command"
"k8s.io/minikube/pkg/minikube/config"
"k8s.io/minikube/pkg/minikube/constants"
"k8s.io/minikube/pkg/minikube/driver"
"k8s.io/minikube/pkg/minikube/localpath"
"k8s.io/minikube/pkg/minikube/out"
"k8s.io/minikube/pkg/minikube/registry"
"k8s.io/minikube/pkg/minikube/sshutil"
"k8s.io/minikube/pkg/minikube/vmpath"
"k8s.io/minikube/pkg/util/lock"
)
var (
// requiredDirectories are directories to create on the host during setup
requiredDirectories = []string{
vmpath.GuestAddonsDir,
vmpath.GuestManifestsDir,
vmpath.GuestEphemeralDir,
vmpath.GuestPersistentDir,
vmpath.GuestCertsDir,
path.Join(vmpath.GuestPersistentDir, "images"),
path.Join(vmpath.GuestPersistentDir, "binaries"),
}
)
// StartHost starts a host VM.
func StartHost(api libmachine.API, cfg config.MachineConfig) (*host.Host, error) {
// Prevent machine-driver boot races, as well as our own certificate race
releaser, err := acquireMachinesLock(cfg.Name)
if err != nil {
return nil, errors.Wrap(err, "boot lock")
}
start := time.Now()
defer func() {
glog.Infof("releasing machines lock for %q, held for %s", cfg.Name, time.Since(start))
releaser.Release()
}()
exists, err := api.Exists(cfg.Name)
if err != nil {
return nil, errors.Wrapf(err, "exists: %s", cfg.Name)
}
if !exists {
glog.Infof("Provisioning new machine with config: %+v", cfg)
return createHost(api, cfg)
}
glog.Infoln("Skipping create...Using existing machine configuration")
return fixHost(api, cfg)
}
func engineOptions(cfg config.MachineConfig) *engine.Options {
o := engine.Options{
Env: cfg.DockerEnv,
InsecureRegistry: append([]string{constants.DefaultServiceCIDR}, cfg.InsecureRegistry...),
RegistryMirror: cfg.RegistryMirror,
ArbitraryFlags: cfg.DockerOpt,
InstallURL: drivers.DefaultEngineInstallURL,
}
return &o
}
func createHost(api libmachine.API, cfg config.MachineConfig) (*host.Host, error) {
if cfg.VMDriver == driver.VMwareFusion && viper.GetBool(config.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://minikube.sigs.k8s.io/docs/reference/drivers/vmware/ for more information.
To disable this message, run [minikube config set ShowDriverDeprecationNotification false]`)
}
showHostInfo(cfg)
def := registry.Driver(cfg.VMDriver)
if def.Empty() {
return nil, fmt.Errorf("unsupported/missing driver: %s", cfg.VMDriver)
}
dd := def.Config(cfg)
data, err := json.Marshal(dd)
if err != nil {
return nil, errors.Wrap(err, "marshal")
}
h, err := api.NewHost(cfg.VMDriver, data)
if err != nil {
return nil, errors.Wrap(err, "new host")
}
h.HostOptions.AuthOptions.CertDir = localpath.MiniPath()
h.HostOptions.AuthOptions.StorePath = localpath.MiniPath()
h.HostOptions.EngineOptions = engineOptions(cfg)
if err := api.Create(h); err != nil {
// Wait for all the logs to reach the client
time.Sleep(2 * time.Second)
return nil, errors.Wrap(err, "create")
}
if err := postStartSetup(h, cfg); err != nil {
return h, errors.Wrap(err, "post-start")
}
if err := api.Save(h); err != nil {
return nil, errors.Wrap(err, "save")
}
return h, nil
}
// postStart are functions shared between startHost and fixHost
func postStartSetup(h *host.Host, mc config.MachineConfig) error {
if h.DriverName == driver.Mock {
glog.Infof("mock driver: skipping postStart")
return nil
}
glog.Infof("creating required directories: %v", requiredDirectories)
r, err := commandRunner(h)
if err != nil {
return errors.Wrap(err, "command runner")
}
args := append([]string{"mkdir", "-p"}, requiredDirectories...)
if _, err := r.RunCmd(exec.Command("sudo", args...)); err != nil {
return errors.Wrapf(err, "sudo mkdir (%s)", h.DriverName)
}
if driver.BareMetal(mc.VMDriver) {
showLocalOsRelease()
}
if !driver.BareMetal(mc.VMDriver) && !driver.IsKIC(mc.VMDriver) {
showRemoteOsRelease(h.Driver)
if err := ensureSyncedGuestClock(h); err != nil {
return err
}
}
return nil
}
// commandRunner returns best available command runner for this host
func commandRunner(h *host.Host) (command.Runner, error) {
if h.DriverName == driver.Mock {
glog.Errorf("commandRunner: returning unconfigured FakeCommandRunner, commands will fail!")
return &command.FakeCommandRunner{}, nil
}
if driver.BareMetal(h.Driver.DriverName()) {
return &command.ExecRunner{}, nil
}
if h.Driver.DriverName() == driver.Docker {
return command.NewKICRunner(h.Name, "docker"), nil
}
client, err := sshutil.NewSSHClient(h.Driver)
if err != nil {
return nil, errors.Wrap(err, "getting ssh client for bootstrapper")
}
return command.NewSSHRunner(client), nil
}
// acquireMachinesLock protects against code that is not parallel-safe (libmachine, cert setup)
func acquireMachinesLock(name string) (mutex.Releaser, error) {
spec := lock.PathMutexSpec(filepath.Join(localpath.MiniPath(), "machines"))
// NOTE: Provisioning generally completes within 60 seconds
spec.Timeout = 15 * time.Minute
glog.Infof("acquiring machines lock for %s: %+v", name, spec)
start := time.Now()
r, err := mutex.Acquire(spec)
if err == nil {
glog.Infof("acquired machines lock for %q in %s", name, time.Since(start))
}
return r, err
}

View File

@ -0,0 +1,79 @@
/*
Copyright 2020 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 cluster
import (
"github.com/docker/machine/libmachine"
"github.com/docker/machine/libmachine/host"
"github.com/docker/machine/libmachine/state"
"github.com/golang/glog"
"github.com/pkg/errors"
)
// GetHostStatus gets the status of the host VM.
func GetHostStatus(api libmachine.API, machineName string) (string, error) {
exists, err := api.Exists(machineName)
if err != nil {
return "", errors.Wrapf(err, "%s exists", machineName)
}
if !exists {
return state.None.String(), nil
}
host, err := api.Load(machineName)
if err != nil {
return "", errors.Wrapf(err, "load")
}
s, err := host.Driver.GetState()
if err != nil {
return "", errors.Wrap(err, "state")
}
return s.String(), nil
}
// IsHostRunning asserts that this profile's primary host is in state "Running"
func IsHostRunning(api libmachine.API, name string) bool {
s, err := GetHostStatus(api, name)
if err != nil {
glog.Warningf("host status for %q returned error: %v", name, err)
return false
}
if s != state.Running.String() {
glog.Warningf("%q host status: %s", name, s)
return false
}
return true
}
// CheckIfHostExistsAndLoad checks if a host exists, and loads it if it does
func CheckIfHostExistsAndLoad(api libmachine.API, machineName string) (*host.Host, error) {
glog.Infof("Checking if %q exists ...", machineName)
exists, err := api.Exists(machineName)
if err != nil {
return nil, errors.Wrapf(err, "Error checking that machine exists: %s", machineName)
}
if !exists {
return nil, errors.Errorf("machine %q does not exist", machineName)
}
host, err := api.Load(machineName)
if err != nil {
return nil, errors.Wrapf(err, "loading machine %q", machineName)
}
return host, nil
}

View File

@ -0,0 +1,76 @@
/*
Copyright 2020 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 cluster
import (
"github.com/docker/machine/libmachine"
"github.com/docker/machine/libmachine/host"
"github.com/docker/machine/libmachine/mcnerror"
"github.com/docker/machine/libmachine/state"
"github.com/golang/glog"
"github.com/pkg/errors"
"github.com/spf13/viper"
"k8s.io/minikube/pkg/minikube/config"
"k8s.io/minikube/pkg/minikube/driver"
"k8s.io/minikube/pkg/minikube/out"
"k8s.io/minikube/pkg/util/retry"
)
// StopHost stops the host VM, saving state to disk.
func StopHost(api libmachine.API) error {
machineName := viper.GetString(config.MachineProfile)
host, err := api.Load(machineName)
if err != nil {
return errors.Wrapf(err, "load")
}
out.T(out.Stopping, `Stopping "{{.profile_name}}" in {{.driver_name}} ...`, out.V{"profile_name": machineName, "driver_name": host.DriverName})
if host.DriverName == driver.HyperV {
glog.Infof("As there are issues with stopping Hyper-V VMs using API, trying to shut down using SSH")
if err := trySSHPowerOff(host); err != nil {
return errors.Wrap(err, "ssh power off")
}
}
if err := host.Stop(); err != nil {
alreadyInStateError, ok := err.(mcnerror.ErrHostAlreadyInState)
if ok && alreadyInStateError.State == state.Stopped {
return nil
}
return &retry.RetriableError{Err: errors.Wrapf(err, "Stop: %s", machineName)}
}
return nil
}
// trySSHPowerOff runs the poweroff command on the guest VM to speed up deletion
func trySSHPowerOff(h *host.Host) error {
s, err := h.Driver.GetState()
if err != nil {
glog.Warningf("unable to get state: %v", err)
return err
}
if s != state.Running {
glog.Infof("host is in state %s", s)
return nil
}
out.T(out.Shutdown, `Powering off "{{.profile_name}}" via SSH ...`, out.V{"profile_name": h.Name})
out, err := h.RunSSHCommand("sudo poweroff")
// poweroff always results in an error, since the host disconnects.
glog.Infof("poweroff result: out=%s, err=%v", out, err)
return nil
}

View File

@ -115,13 +115,12 @@ func (k *kicRunner) RunCmd(cmd *exec.Cmd) (*RunResult, error) {
if elapsed > (1 * time.Second) {
glog.Infof("Done: %v: (%s)", oc.Args, elapsed)
}
} else {
if exitError, ok := err.(*exec.ExitError); ok {
rr.ExitCode = exitError.ExitCode()
}
err = fmt.Errorf("%s: %v\nstdout:\n%s\nstderr:\n%s", rr.Command(), err, rr.Stdout.String(), rr.Stderr.String())
return rr, nil
}
return rr, err
if exitError, ok := err.(*exec.ExitError); ok {
rr.ExitCode = exitError.ExitCode()
}
return rr, fmt.Errorf("%s: %v\nstdout:\n%s\nstderr:\n%s", rr.Command(), err, rr.Stdout.String(), rr.Stderr.String())
}

View File

@ -18,12 +18,13 @@ package config
import (
"encoding/json"
"errors"
"fmt"
"io"
"io/ioutil"
"os"
"github.com/pkg/errors"
"k8s.io/minikube/pkg/minikube/localpath"
)
@ -53,6 +54,22 @@ var (
ErrKeyNotFound = errors.New("specified key could not be found in config")
)
type ErrNotExist struct {
s string
}
func (e *ErrNotExist) Error() string {
return e.s
}
// IsNotExist returns whether the error means a nonexistent configuration
func IsNotExist(err error) bool {
if _, ok := err.(*ErrNotExist); ok {
return true
}
return false
}
// MinikubeConfig represents minikube config
type MinikubeConfig map[string]interface{}
@ -148,17 +165,20 @@ func (c *simpleConfigLoader) LoadConfigFromFile(profileName string, miniHome ...
// Move to profile package
path := profileFilePath(profileName, miniHome...)
if _, err := os.Stat(path); os.IsNotExist(err) {
return nil, err
if _, err := os.Stat(path); err != nil {
if os.IsNotExist(err) {
return nil, &ErrNotExist{fmt.Sprintf("cluster %q does not exist", profileName)}
}
return nil, errors.Wrap(err, "stat")
}
data, err := ioutil.ReadFile(path)
if err != nil {
return nil, err
return nil, errors.Wrap(err, "read")
}
if err := json.Unmarshal(data, &cc); err != nil {
return nil, err
return nil, errors.Wrap(err, "unmarshal")
}
return &cc, nil
}

View File

@ -25,6 +25,7 @@ import (
"strings"
"github.com/golang/glog"
"k8s.io/minikube/pkg/drivers/kic/oci"
"k8s.io/minikube/pkg/minikube/localpath"
"k8s.io/minikube/pkg/util/lock"
)
@ -146,10 +147,18 @@ func DeleteProfile(profile string, miniHome ...string) error {
// invalidPs are the profiles that have a directory or config file but not usable
// invalidPs would be suggested to be deleted
func ListProfiles(miniHome ...string) (validPs []*Profile, inValidPs []*Profile, err error) {
// try to get profiles list based on left over evidences such as directory
pDirs, err := profileDirs(miniHome...)
if err != nil {
return nil, nil, err
}
// try to get profiles list based on all contrainers created by docker driver
cs, err := oci.ListOwnedContainers(oci.Docker)
if err == nil {
pDirs = append(pDirs, cs...)
}
pDirs = removeDupes(pDirs)
for _, n := range pDirs {
p, err := LoadProfile(n, miniHome...)
if err != nil {
@ -165,6 +174,26 @@ func ListProfiles(miniHome ...string) (validPs []*Profile, inValidPs []*Profile,
return validPs, inValidPs, nil
}
// removeDupes removes duplicates
func removeDupes(profiles []string) []string {
// Use map to record duplicates as we find them.
seen := map[string]bool{}
result := []string{}
for n := range profiles {
if seen[profiles[n]] {
// Do not add duplicate.
} else {
// Record this element as an encountered element.
seen[profiles[n]] = true
// Append to result slice.
result = append(result, profiles[n])
}
}
// Return the new slice.
return result
}
// LoadProfile loads type Profile based on its name
func LoadProfile(name string, miniHome ...string) (*Profile, error) {
cfg, err := DefaultLoader.LoadConfigFromFile(name, miniHome...)

View File

@ -27,6 +27,8 @@ import (
)
const (
// DockerDaemonPort is the port Docker daemon listening inside a minikube node (vm or container).
DockerDaemonPort = 2376
// SSHPort is the SSH serviceport on the node vm and container
SSHPort = 22
// APIServerPort is the default API server port

View File

@ -167,11 +167,14 @@ func disableOthers(me Manager, cr CommandRunner) error {
// enableIPForwarding configures IP forwarding, which is handled normally by Docker
// Context: https://github.com/kubernetes/kubeadm/issues/1062
func enableIPForwarding(cr CommandRunner) error {
c := exec.Command("sudo", "modprobe", "br_netfilter")
if _, err := cr.RunCmd(c); err != nil {
return errors.Wrap(err, "br_netfilter")
c := exec.Command("sudo", "sysctl", "net.netfilter.nf_conntrack_count")
if rr, err := cr.RunCmd(c); err != nil {
glog.Infof("couldn't verify netfilter by %q which might be okay. error: %v", rr.Command(), err)
c = exec.Command("sudo", "modprobe", "br_netfilter")
if _, err := cr.RunCmd(c); err != nil {
return errors.Wrapf(err, "br_netfilter")
}
}
c = exec.Command("sudo", "sh", "-c", "echo 1 > /proc/sys/net/ipv4/ip_forward")
if _, err := cr.RunCmd(c); err != nil {
return errors.Wrapf(err, "ip_forward")

View File

@ -108,7 +108,6 @@ func FlagDefaults(name string) FlagHints {
fh.CacheImages = true
// only for kic, till other run-times are available we auto-set containerd.
if name == Docker {
fh.ContainerRuntime = "containerd"
fh.ExtraOptions = append(fh.ExtraOptions, fmt.Sprintf("kubeadm.pod-network-cidr=%s", kic.DefaultPodCIDR))
}
return fh

View File

@ -36,6 +36,7 @@ import (
"github.com/docker/machine/libmachine/host"
"github.com/docker/machine/libmachine/mcnutils"
"github.com/docker/machine/libmachine/persist"
lib_provision "github.com/docker/machine/libmachine/provision"
"github.com/docker/machine/libmachine/ssh"
"github.com/docker/machine/libmachine/state"
"github.com/docker/machine/libmachine/swarm"
@ -207,10 +208,15 @@ func (api *LocalClient) Create(h *host.Host) error {
{
"provisioning",
func() error {
if driver.BareMetal(h.Driver.DriverName()) || driver.IsKIC(h.Driver.DriverName()) {
if driver.BareMetal(h.Driver.DriverName()) {
return nil
}
pv := provision.NewBuildrootProvisioner(h.Driver)
var pv lib_provision.Provisioner
if driver.IsKIC(h.Driver.DriverName()) {
pv = provision.NewUbuntuProvisioner(h.Driver)
} else {
pv = provision.NewBuildrootProvisioner(h.Driver)
}
return pv.Provision(*h.HostOptions.SwarmOptions, *h.HostOptions.AuthOptions, *h.HostOptions.EngineOptions)
},
},

View File

@ -72,7 +72,7 @@ var styles = map[StyleEnum]style{
Option: {Prefix: " ▪ ", LowPrefix: lowIndent}, // Indented bullet
Command: {Prefix: " ▪ ", LowPrefix: lowIndent}, // Indented bullet
LogEntry: {Prefix: " "}, // Indent
Crushed: {Prefix: "💔 "},
Deleted: {Prefix: "💀 "},
URL: {Prefix: "👉 ", LowPrefix: lowIndent},
Documentation: {Prefix: "📘 "},
Issues: {Prefix: "⁉️ "},
@ -116,6 +116,8 @@ var styles = map[StyleEnum]style{
MountOptions: {Prefix: "💾 "},
Fileserver: {Prefix: "🚀 ", OmitNewline: true},
DryRun: {Prefix: "🏜️ "},
AddonEnable: {Prefix: "🌟 "},
AddonDisable: {Prefix: "🌑 "},
}
// Add a prefix to a string

View File

@ -45,7 +45,7 @@ const (
Option
Command
LogEntry
Crushed
Deleted
URL
Documentation
Issues
@ -87,4 +87,6 @@ const (
Pause
Unpause
DryRun
AddonEnable
AddonDisable
)

View File

@ -17,8 +17,10 @@ limitations under the License.
package docker
import (
"context"
"fmt"
"os/exec"
"time"
"github.com/docker/machine/libmachine/drivers"
"k8s.io/minikube/pkg/drivers/kic"
@ -59,8 +61,11 @@ func status() registry.State {
if err != nil {
return registry.State{Error: err, Installed: false, Healthy: false, Fix: "Docker is required.", Doc: "https://minikube.sigs.k8s.io/docs/reference/drivers/kic/"}
}
// Allow no more than 2 seconds for querying state
ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second)
defer cancel()
err = exec.Command("docker", "info").Run()
err = exec.CommandContext(ctx, "docker", "info").Run()
if err != nil {
return registry.State{Error: err, Installed: true, Healthy: false, Fix: "Docker is not running. Try: restarting docker desktop."}
}

View File

@ -19,6 +19,7 @@ limitations under the License.
package hyperkit
import (
"context"
"fmt"
"os/exec"
"strings"
@ -87,7 +88,11 @@ func status() registry.State {
return registry.State{Error: err, Fix: "Run 'brew install hyperkit'", Doc: docURL}
}
cmd := exec.Command(path, "-v")
// Allow no more than 2 seconds for querying state
ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second)
defer cancel()
cmd := exec.CommandContext(ctx, path, "-v")
out, err := cmd.CombinedOutput()
if err != nil {
return registry.State{Installed: true, Error: fmt.Errorf("%s failed:\n%s", strings.Join(cmd.Args, " "), out), Fix: "Run 'brew install hyperkit'", Doc: docURL}

View File

@ -19,9 +19,11 @@ limitations under the License.
package hyperv
import (
"context"
"fmt"
"os/exec"
"strings"
"time"
"github.com/docker/machine/drivers/hyperv"
"github.com/docker/machine/libmachine/drivers"
@ -66,7 +68,11 @@ func status() registry.State {
return registry.State{Error: err}
}
cmd := exec.Command(path, "Get-WindowsOptionalFeature", "-FeatureName", "Microsoft-Hyper-V-All", "-Online")
// Allow no more than 2 seconds for querying state
ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second)
defer cancel()
cmd := exec.CommandContext(ctx, path, "Get-WindowsOptionalFeature", "-FeatureName", "Microsoft-Hyper-V-All", "-Online")
out, err := cmd.CombinedOutput()
if err != nil {
return registry.State{Installed: false, Error: fmt.Errorf("%s failed:\n%s", strings.Join(cmd.Args, " "), out), Fix: "Start PowerShell as Administrator, and run: 'Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All'", Doc: docURL}

View File

@ -19,11 +19,13 @@ limitations under the License.
package kvm2
import (
"context"
"fmt"
"os"
"os/exec"
"path/filepath"
"strings"
"time"
"github.com/docker/machine/libmachine/drivers"
@ -97,13 +99,17 @@ func defaultURI() string {
}
func status() registry.State {
// Allow no more than 2 seconds for querying state
ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second)
defer cancel()
path, err := exec.LookPath("virsh")
if err != nil {
return registry.State{Error: err, Fix: "Install libvirt", Doc: docURL}
}
// On Ubuntu 19.10 (libvirt 5.4), this fails if LIBVIRT_DEFAULT_URI is unset
cmd := exec.Command(path, "domcapabilities", "--virttype", "kvm")
cmd := exec.CommandContext(ctx, path, "domcapabilities", "--virttype", "kvm")
cmd.Env = append(os.Environ(), fmt.Sprintf("LIBVIRT_DEFAULT_URI=%s", defaultURI()))
out, err := cmd.CombinedOutput()
@ -116,7 +122,7 @@ func status() registry.State {
}
}
cmd = exec.Command("virsh", "list")
cmd = exec.CommandContext(ctx, "virsh", "list")
cmd.Env = append(os.Environ(), fmt.Sprintf("LIBVIRT_DEFAULT_URI=%s", defaultURI()))
out, err = cmd.CombinedOutput()
if err != nil {

View File

@ -17,9 +17,11 @@ limitations under the License.
package virtualbox
import (
"context"
"fmt"
"os/exec"
"strings"
"time"
"github.com/docker/machine/drivers/virtualbox"
"github.com/docker/machine/libmachine/drivers"
@ -75,7 +77,11 @@ func status() registry.State {
}
}
cmd := exec.Command(path, "list", "hostinfo")
// Allow no more than 2 seconds for querying state
ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second)
defer cancel()
cmd := exec.CommandContext(ctx, path, "list", "hostinfo")
out, err := cmd.CombinedOutput()
if err != nil {
return registry.State{

View File

@ -331,10 +331,11 @@ func CreateSecret(namespace, name string, dataValues map[string]string, labels m
if err != nil {
return &retry.RetriableError{Err: err}
}
secrets := client.Secrets(namespace)
secret, err := secrets.Get(name, meta.GetOptions{})
if err != nil {
return &retry.RetriableError{Err: err}
glog.Infof("Failed to retrieve existing secret: %v", err)
}
// Delete existing secret

View File

@ -40,10 +40,14 @@ func TestAPIError(t *testing.T) {
machineAPI, configLoader, machineName,
}
s, r, err := inspector.getStateAndRoute()
_, _, err := inspector.getStateAndRoute()
if err == nil {
t.Errorf("expected error, got nil")
}
if err == nil || !strings.Contains(err.Error(), "Machine does not exist") {
t.Errorf("cluster inspector should propagate errors from API, getStateAndRoute() returned \"%v, %v\", %v", s, r, err)
// Make sure we properly propagate errors upward
if !strings.Contains(err.Error(), "exist") {
t.Errorf("getStateAndRoute error=%q, expected *exist*", err)
}
}

View File

@ -19,29 +19,18 @@ package provision
import (
"bytes"
"fmt"
"os/exec"
"path"
"path/filepath"
"strings"
"text/template"
"time"
"github.com/docker/machine/libmachine/auth"
"github.com/docker/machine/libmachine/cert"
"github.com/docker/machine/libmachine/drivers"
"github.com/docker/machine/libmachine/engine"
"github.com/docker/machine/libmachine/log"
"github.com/docker/machine/libmachine/mcnutils"
"github.com/docker/machine/libmachine/provision"
"github.com/docker/machine/libmachine/provision/pkgaction"
"github.com/docker/machine/libmachine/provision/serviceaction"
"github.com/docker/machine/libmachine/swarm"
"github.com/pkg/errors"
"k8s.io/minikube/pkg/minikube/assets"
"k8s.io/minikube/pkg/minikube/command"
"k8s.io/minikube/pkg/minikube/config"
"k8s.io/minikube/pkg/minikube/sshutil"
"k8s.io/minikube/pkg/util"
"k8s.io/minikube/pkg/util/retry"
)
@ -50,15 +39,6 @@ type BuildrootProvisioner struct {
provision.SystemdProvisioner
}
// for escaping systemd template specifiers (e.g. '%i'), which are not supported by minikube
var systemdSpecifierEscaper = strings.NewReplacer("%", "%%")
func init() {
provision.Register("Buildroot", &provision.RegisteredProvisioner{
New: NewBuildrootProvisioner,
})
}
// NewBuildrootProvisioner creates a new BuildrootProvisioner
func NewBuildrootProvisioner(d drivers.Driver) provision.Provisioner {
return &BuildrootProvisioner{
@ -75,17 +55,6 @@ func (p *BuildrootProvisioner) CompatibleWithHost() bool {
return p.OsReleaseInfo.ID == "buildroot"
}
// escapeSystemdDirectives escapes special characters in the input variables used to create the
// systemd unit file, which would otherwise be interpreted as systemd directives. An example
// are template specifiers (e.g. '%i') which are predefined variables that get evaluated dynamically
// (see systemd man pages for more info). This is not supported by minikube, thus needs to be escaped.
func escapeSystemdDirectives(engineConfigContext *provision.EngineConfigContext) {
// escape '%' in Environment option so that it does not evaluate into a template specifier
engineConfigContext.EngineOptions.Env = util.ReplaceChars(engineConfigContext.EngineOptions.Env, systemdSpecifierEscaper)
// input might contain whitespaces, wrap it in quotes
engineConfigContext.EngineOptions.Env = util.ConcatStrings(engineConfigContext.EngineOptions.Env, "\"", "\"")
}
// GenerateDockerOptions generates the *provision.DockerOptions for this provisioner
func (p *BuildrootProvisioner) GenerateDockerOptions(dockerPort int) (*provision.DockerOptions, error) {
var engineCfg bytes.Buffer
@ -192,14 +161,6 @@ WantedBy=multi-user.target
return dockerCfg, nil
}
func rootFileSystemType(p *BuildrootProvisioner) (string, error) {
fs, err := p.SSHCommand("df --output=fstype / | tail -n 1")
if err != nil {
return "", err
}
return strings.TrimSpace(fs), nil
}
// Package installs a package
func (p *BuildrootProvisioner) Package(name string, action pkgaction.PackageAction) error {
return nil
@ -235,176 +196,10 @@ func (p *BuildrootProvisioner) Provision(swarmOptions swarm.Options, authOptions
}
log.Debugf("setting minikube options for container-runtime")
if err := setContainerRuntimeOptions(p); err != nil {
if err := setContainerRuntimeOptions(p.Driver.GetMachineName(), p); err != nil {
log.Debugf("Error setting container-runtime options during provisioning %v", err)
return err
}
return nil
}
func setRemoteAuthOptions(p provision.Provisioner) auth.Options {
dockerDir := p.GetDockerOptionsDir()
authOptions := p.GetAuthOptions()
// due to windows clients, we cannot use filepath.Join as the paths
// will be mucked on the linux hosts
authOptions.CaCertRemotePath = path.Join(dockerDir, "ca.pem")
authOptions.ServerCertRemotePath = path.Join(dockerDir, "server.pem")
authOptions.ServerKeyRemotePath = path.Join(dockerDir, "server-key.pem")
return authOptions
}
func setContainerRuntimeOptions(p *BuildrootProvisioner) error {
c, err := config.Load(p.Driver.GetMachineName())
if err != nil {
return errors.Wrap(err, "getting cluster config")
}
switch c.KubernetesConfig.ContainerRuntime {
case "crio", "cri-o":
return p.setCrioOptions()
case "containerd":
return nil
default:
_, err := p.GenerateDockerOptions(engine.DefaultPort)
return err
}
}
func (p *BuildrootProvisioner) setCrioOptions() error {
// pass through --insecure-registry
var (
crioOptsTmpl = `
CRIO_MINIKUBE_OPTIONS='{{ range .EngineOptions.InsecureRegistry }}--insecure-registry {{.}} {{ end }}'
`
crioOptsPath = "/etc/sysconfig/crio.minikube"
)
t, err := template.New("crioOpts").Parse(crioOptsTmpl)
if err != nil {
return err
}
var crioOptsBuf bytes.Buffer
if err := t.Execute(&crioOptsBuf, p); err != nil {
return err
}
if _, err = p.SSHCommand(fmt.Sprintf("sudo mkdir -p %s && printf %%s \"%s\" | sudo tee %s", path.Dir(crioOptsPath), crioOptsBuf.String(), crioOptsPath)); err != nil {
return err
}
return nil
}
func configureAuth(p *BuildrootProvisioner) error {
log.Infof("configureAuth start")
start := time.Now()
defer func() {
log.Infof("configureAuth took %s", time.Since(start))
}()
driver := p.GetDriver()
machineName := driver.GetMachineName()
authOptions := p.GetAuthOptions()
org := mcnutils.GetUsername() + "." + machineName
bits := 2048
ip, err := driver.GetIP()
if err != nil {
return errors.Wrap(err, "error getting ip during provisioning")
}
if err := copyHostCerts(authOptions); err != nil {
return err
}
// The Host IP is always added to the certificate's SANs list
hosts := append(authOptions.ServerCertSANs, ip, "localhost")
log.Debugf("generating server cert: %s ca-key=%s private-key=%s org=%s san=%s",
authOptions.ServerCertPath,
authOptions.CaCertPath,
authOptions.CaPrivateKeyPath,
org,
hosts,
)
err = cert.GenerateCert(&cert.Options{
Hosts: hosts,
CertFile: authOptions.ServerCertPath,
KeyFile: authOptions.ServerKeyPath,
CAFile: authOptions.CaCertPath,
CAKeyFile: authOptions.CaPrivateKeyPath,
Org: org,
Bits: bits,
})
if err != nil {
return fmt.Errorf("error generating server cert: %v", err)
}
return copyRemoteCerts(authOptions, driver)
}
func copyHostCerts(authOptions auth.Options) error {
log.Infof("copyHostCerts")
execRunner := &command.ExecRunner{}
hostCerts := map[string]string{
authOptions.CaCertPath: path.Join(authOptions.StorePath, "ca.pem"),
authOptions.ClientCertPath: path.Join(authOptions.StorePath, "cert.pem"),
authOptions.ClientKeyPath: path.Join(authOptions.StorePath, "key.pem"),
}
if _, err := execRunner.RunCmd(exec.Command("mkdir", "-p", authOptions.StorePath)); err != nil {
return err
}
for src, dst := range hostCerts {
f, err := assets.NewFileAsset(src, path.Dir(dst), filepath.Base(dst), "0777")
if err != nil {
return errors.Wrapf(err, "open cert file: %s", src)
}
if err := execRunner.Copy(f); err != nil {
return errors.Wrapf(err, "transferring file: %+v", f)
}
}
return nil
}
func copyRemoteCerts(authOptions auth.Options, driver drivers.Driver) error {
log.Infof("copyRemoteCerts")
remoteCerts := map[string]string{
authOptions.CaCertPath: authOptions.CaCertRemotePath,
authOptions.ServerCertPath: authOptions.ServerCertRemotePath,
authOptions.ServerKeyPath: authOptions.ServerKeyRemotePath,
}
sshClient, err := sshutil.NewSSHClient(driver)
if err != nil {
return errors.Wrap(err, "provisioning: error getting ssh client")
}
sshRunner := command.NewSSHRunner(sshClient)
dirs := []string{}
for _, dst := range remoteCerts {
dirs = append(dirs, path.Dir(dst))
}
args := append([]string{"mkdir", "-p"}, dirs...)
if _, err = sshRunner.RunCmd(exec.Command("sudo", args...)); err != nil {
return err
}
for src, dst := range remoteCerts {
f, err := assets.NewFileAsset(src, path.Dir(dst), filepath.Base(dst), "0640")
if err != nil {
return errors.Wrapf(err, "error copying %s to %s", src, dst)
}
if err := sshRunner.Copy(f); err != nil {
return errors.Wrapf(err, "transferring file to machine %v", f)
}
}
return nil
}

252
pkg/provision/provision.go Normal file
View File

@ -0,0 +1,252 @@
/*
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 provision
import (
"bytes"
"fmt"
"os/exec"
"path"
"path/filepath"
"strings"
"text/template"
"time"
"github.com/docker/machine/libmachine/auth"
"github.com/docker/machine/libmachine/cert"
"github.com/docker/machine/libmachine/drivers"
"github.com/docker/machine/libmachine/engine"
"github.com/docker/machine/libmachine/log"
"github.com/docker/machine/libmachine/mcnutils"
"github.com/docker/machine/libmachine/provision"
"github.com/docker/machine/libmachine/swarm"
"github.com/pkg/errors"
"k8s.io/minikube/pkg/minikube/assets"
"k8s.io/minikube/pkg/minikube/command"
"k8s.io/minikube/pkg/minikube/config"
"k8s.io/minikube/pkg/minikube/sshutil"
"k8s.io/minikube/pkg/util"
)
// generic interface for minikube provisioner
type miniProvisioner interface {
String() string
CompatibleWithHost() bool
GenerateDockerOptions(int) (*provision.DockerOptions, error)
Provision(swarmOptions swarm.Options, authOptions auth.Options, engineOptions engine.Options) error
GetDriver() drivers.Driver
GetAuthOptions() auth.Options
SSHCommand(string) (string, error)
}
// for escaping systemd template specifiers (e.g. '%i'), which are not supported by minikube
var systemdSpecifierEscaper = strings.NewReplacer("%", "%%")
func init() {
provision.Register("Buildroot", &provision.RegisteredProvisioner{
New: NewBuildrootProvisioner,
})
provision.Register("Ubuntu", &provision.RegisteredProvisioner{
New: NewUbuntuProvisioner,
})
}
func configureAuth(p miniProvisioner) error {
log.Infof("configureAuth start")
start := time.Now()
defer func() {
log.Infof("configureAuth took %s", time.Since(start))
}()
driver := p.GetDriver()
machineName := driver.GetMachineName()
authOptions := p.GetAuthOptions()
org := mcnutils.GetUsername() + "." + machineName
bits := 2048
ip, err := driver.GetIP()
if err != nil {
return errors.Wrap(err, "error getting ip during provisioning")
}
if err := copyHostCerts(authOptions); err != nil {
return err
}
// The Host IP is always added to the certificate's SANs list
hosts := append(authOptions.ServerCertSANs, ip, "localhost", "127.0.0.1")
log.Debugf("generating server cert: %s ca-key=%s private-key=%s org=%s san=%s",
authOptions.ServerCertPath,
authOptions.CaCertPath,
authOptions.CaPrivateKeyPath,
org,
hosts,
)
err = cert.GenerateCert(&cert.Options{
Hosts: hosts,
CertFile: authOptions.ServerCertPath,
KeyFile: authOptions.ServerKeyPath,
CAFile: authOptions.CaCertPath,
CAKeyFile: authOptions.CaPrivateKeyPath,
Org: org,
Bits: bits,
})
if err != nil {
return fmt.Errorf("error generating server cert: %v", err)
}
return copyRemoteCerts(authOptions, driver)
}
func copyHostCerts(authOptions auth.Options) error {
log.Infof("copyHostCerts")
execRunner := &command.ExecRunner{}
hostCerts := map[string]string{
authOptions.CaCertPath: path.Join(authOptions.StorePath, "ca.pem"),
authOptions.ClientCertPath: path.Join(authOptions.StorePath, "cert.pem"),
authOptions.ClientKeyPath: path.Join(authOptions.StorePath, "key.pem"),
}
if _, err := execRunner.RunCmd(exec.Command("mkdir", "-p", authOptions.StorePath)); err != nil {
return err
}
for src, dst := range hostCerts {
f, err := assets.NewFileAsset(src, path.Dir(dst), filepath.Base(dst), "0777")
if err != nil {
return errors.Wrapf(err, "open cert file: %s", src)
}
if err := execRunner.Copy(f); err != nil {
return errors.Wrapf(err, "transferring file: %+v", f)
}
}
return nil
}
func copyRemoteCerts(authOptions auth.Options, driver drivers.Driver) error {
log.Infof("copyRemoteCerts")
remoteCerts := map[string]string{
authOptions.CaCertPath: authOptions.CaCertRemotePath,
authOptions.ServerCertPath: authOptions.ServerCertRemotePath,
authOptions.ServerKeyPath: authOptions.ServerKeyRemotePath,
}
sshClient, err := sshutil.NewSSHClient(driver)
if err != nil {
return errors.Wrap(err, "provisioning: error getting ssh client")
}
sshRunner := command.NewSSHRunner(sshClient)
dirs := []string{}
for _, dst := range remoteCerts {
dirs = append(dirs, path.Dir(dst))
}
args := append([]string{"mkdir", "-p"}, dirs...)
if _, err = sshRunner.RunCmd(exec.Command("sudo", args...)); err != nil {
return err
}
for src, dst := range remoteCerts {
f, err := assets.NewFileAsset(src, path.Dir(dst), filepath.Base(dst), "0640")
if err != nil {
return errors.Wrapf(err, "error copying %s to %s", src, dst)
}
if err := sshRunner.Copy(f); err != nil {
return errors.Wrapf(err, "transferring file to machine %v", f)
}
}
return nil
}
func setRemoteAuthOptions(p provision.Provisioner) auth.Options {
dockerDir := p.GetDockerOptionsDir()
authOptions := p.GetAuthOptions()
// due to windows clients, we cannot use filepath.Join as the paths
// will be mucked on the linux hosts
authOptions.CaCertRemotePath = path.Join(dockerDir, "ca.pem")
authOptions.ServerCertRemotePath = path.Join(dockerDir, "server.pem")
authOptions.ServerKeyRemotePath = path.Join(dockerDir, "server-key.pem")
return authOptions
}
func setContainerRuntimeOptions(name string, p miniProvisioner) error {
c, err := config.Load(name)
if err != nil {
return errors.Wrap(err, "getting cluster config")
}
switch c.KubernetesConfig.ContainerRuntime {
case "crio", "cri-o":
return setCrioOptions(p)
case "containerd":
return nil
default:
_, err := p.GenerateDockerOptions(engine.DefaultPort)
return err
}
}
func setCrioOptions(p provision.SSHCommander) error {
// pass through --insecure-registry
var (
crioOptsTmpl = `
CRIO_MINIKUBE_OPTIONS='{{ range .EngineOptions.InsecureRegistry }}--insecure-registry {{.}} {{ end }}'
`
crioOptsPath = "/etc/sysconfig/crio.minikube"
)
t, err := template.New("crioOpts").Parse(crioOptsTmpl)
if err != nil {
return err
}
var crioOptsBuf bytes.Buffer
if err := t.Execute(&crioOptsBuf, p); err != nil {
return err
}
if _, err = p.SSHCommand(fmt.Sprintf("sudo mkdir -p %s && printf %%s \"%s\" | sudo tee %s", path.Dir(crioOptsPath), crioOptsBuf.String(), crioOptsPath)); err != nil {
return err
}
return nil
}
func rootFileSystemType(p provision.SSHCommander) (string, error) {
fs, err := p.SSHCommand("df --output=fstype / | tail -n 1")
if err != nil {
return "", err
}
return strings.TrimSpace(fs), nil
}
// escapeSystemdDirectives escapes special characters in the input variables used to create the
// systemd unit file, which would otherwise be interpreted as systemd directives. An example
// are template specifiers (e.g. '%i') which are predefined variables that get evaluated dynamically
// (see systemd man pages for more info). This is not supported by minikube, thus needs to be escaped.
func escapeSystemdDirectives(engineConfigContext *provision.EngineConfigContext) {
// escape '%' in Environment option so that it does not evaluate into a template specifier
engineConfigContext.EngineOptions.Env = util.ReplaceChars(engineConfigContext.EngineOptions.Env, systemdSpecifierEscaper)
// input might contain whitespaces, wrap it in quotes
engineConfigContext.EngineOptions.Env = util.ConcatStrings(engineConfigContext.EngineOptions.Env, "\"", "\"")
}

209
pkg/provision/ubuntu.go Normal file
View File

@ -0,0 +1,209 @@
/*
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 provision
import (
"bytes"
"fmt"
"path"
"text/template"
"time"
"github.com/docker/machine/libmachine/auth"
"github.com/docker/machine/libmachine/drivers"
"github.com/docker/machine/libmachine/engine"
"github.com/docker/machine/libmachine/log"
"github.com/docker/machine/libmachine/provision"
"github.com/docker/machine/libmachine/provision/pkgaction"
"github.com/docker/machine/libmachine/provision/serviceaction"
"github.com/docker/machine/libmachine/swarm"
"k8s.io/minikube/pkg/util/retry"
)
// UbuntuProvisioner provisions the ubuntu
type UbuntuProvisioner struct {
BuildrootProvisioner
}
// NewUbuntuProvisioner creates a new UbuntuProvisioner
func NewUbuntuProvisioner(d drivers.Driver) provision.Provisioner {
return &UbuntuProvisioner{
BuildrootProvisioner{
provision.NewSystemdProvisioner("ubuntu", d),
},
}
}
func (p *UbuntuProvisioner) String() string {
return "ubuntu"
}
// CompatibleWithHost checks if provisioner is compatible with host
func (p *UbuntuProvisioner) CompatibleWithHost() bool {
return p.OsReleaseInfo.ID == "ubuntu"
}
// GenerateDockerOptions generates the *provision.DockerOptions for this provisioner
func (p *UbuntuProvisioner) GenerateDockerOptions(dockerPort int) (*provision.DockerOptions, error) {
var engineCfg bytes.Buffer
drvLabel := fmt.Sprintf("provider=%s", p.Driver.DriverName())
p.EngineOptions.Labels = append(p.EngineOptions.Labels, drvLabel)
noPivot := true
// Using pivot_root is not supported on fstype rootfs
if fstype, err := rootFileSystemType(p); err == nil {
log.Debugf("root file system type: %s", fstype)
noPivot = fstype == "rootfs"
}
engineConfigTmpl := `[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
BindsTo=containerd.service
After=network-online.target firewalld.service containerd.service
Wants=network-online.target
Requires=docker.socket
[Service]
Type=notify
`
if noPivot {
log.Warn("Using fundamentally insecure --no-pivot option")
engineConfigTmpl += `
# DOCKER_RAMDISK disables pivot_root in Docker, using MS_MOVE instead.
Environment=DOCKER_RAMDISK=yes
`
}
engineConfigTmpl += `
{{range .EngineOptions.Env}}Environment={{.}}
{{end}}
# This file is a systemd drop-in unit that inherits from the base dockerd configuration.
# The base configuration already specifies an 'ExecStart=...' command. The first directive
# here is to clear out that command inherited from the base configuration. Without this,
# the command from the base configuration and the command specified here are treated as
# a sequence of commands, which is not the desired behavior, nor is it valid -- systemd
# will catch this invalid input and refuse to start the service with an error like:
# Service has more than one ExecStart= setting, which is only allowed for Type=oneshot services.
# NOTE: default-ulimit=nofile is set to an arbitrary number for consistency with other
# container runtimes. If left unlimited, it may result in OOM issues with MySQL.
ExecStart=
ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:{{.DockerPort}} -H unix:///var/run/docker.sock --default-ulimit=nofile=1048576:1048576 --tlsverify --tlscacert {{.AuthOptions.CaCertRemotePath}} --tlscert {{.AuthOptions.ServerCertRemotePath}} --tlskey {{.AuthOptions.ServerKeyRemotePath}} {{ range .EngineOptions.Labels }}--label {{.}} {{ end }}{{ range .EngineOptions.InsecureRegistry }}--insecure-registry {{.}} {{ end }}{{ range .EngineOptions.RegistryMirror }}--registry-mirror {{.}} {{ end }}{{ range .EngineOptions.ArbitraryFlags }}--{{.}} {{ end }}
ExecReload=/bin/kill -s HUP $MAINPID
# Having non-zero Limit*s causes performance problems due to accounting overhead
# in the kernel. We recommend using cgroups to do container-local accounting.
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
# Uncomment TasksMax if your systemd version supports it.
# Only systemd 226 and above support this version.
TasksMax=infinity
TimeoutStartSec=0
# set delegate yes so that systemd does not reset the cgroups of docker containers
Delegate=yes
# kill only the docker process, not all processes in the cgroup
KillMode=process
[Install]
WantedBy=multi-user.target
`
t, err := template.New("engineConfig").Parse(engineConfigTmpl)
if err != nil {
return nil, err
}
engineConfigContext := provision.EngineConfigContext{
DockerPort: dockerPort,
AuthOptions: p.AuthOptions,
EngineOptions: p.EngineOptions,
}
escapeSystemdDirectives(&engineConfigContext)
if err := t.Execute(&engineCfg, engineConfigContext); err != nil {
return nil, err
}
dockerCfg := &provision.DockerOptions{
EngineOptions: engineCfg.String(),
EngineOptionsPath: "/lib/systemd/system/docker.service",
}
log.Info("Setting Docker configuration on the remote daemon...")
if _, err = p.SSHCommand(fmt.Sprintf("sudo mkdir -p %s && printf %%s \"%s\" | sudo tee %s", path.Dir(dockerCfg.EngineOptionsPath), dockerCfg.EngineOptions, dockerCfg.EngineOptionsPath)); err != nil {
return nil, err
}
if err := p.Service("docker", serviceaction.Enable); err != nil {
return nil, err
}
if err := p.Service("docker", serviceaction.Restart); err != nil {
return nil, err
}
return dockerCfg, nil
}
// Package installs a package
func (p *UbuntuProvisioner) Package(name string, action pkgaction.PackageAction) error {
return nil
}
// Provision does the provisioning
func (p *UbuntuProvisioner) Provision(swarmOptions swarm.Options, authOptions auth.Options, engineOptions engine.Options) error {
p.SwarmOptions = swarmOptions
p.AuthOptions = authOptions
p.EngineOptions = engineOptions
log.Infof("provisioning hostname %q", p.Driver.GetMachineName())
if err := p.SetHostname(p.Driver.GetMachineName()); err != nil {
return err
}
p.AuthOptions = setRemoteAuthOptions(p)
log.Debugf("set auth options %+v", p.AuthOptions)
log.Debugf("setting up certificates")
configAuth := func() error {
if err := configureAuth(p); err != nil {
log.Warnf("configureAuth failed: %v", err)
return &retry.RetriableError{Err: err}
}
return nil
}
err := retry.Expo(configAuth, time.Second, 2*time.Minute)
if err != nil {
log.Debugf("Error configuring auth during provisioning %v", err)
return err
}
log.Debugf("setting minikube options for container-runtime")
if err := setContainerRuntimeOptions(p.Driver.GetMachineName(), p); err != nil {
log.Debugf("Error setting container-runtime options during provisioning %v", err)
return err
}
return nil
}

View File

@ -33,6 +33,7 @@ import (
"testing"
"time"
"github.com/docker/machine/libmachine/state"
"github.com/shirou/gopsutil/process"
core "k8s.io/api/core/v1"
meta "k8s.io/apimachinery/pkg/apis/meta/v1"
@ -177,31 +178,49 @@ func CleanupWithLogs(t *testing.T, profile string, cancel context.CancelFunc) {
t.Logf("*** %s FAILED at %s", t.Name(), time.Now())
if *postMortemLogs {
t.Logf(">>> %s FAILED: start of post-mortem logs >>>", t.Name())
rr, rerr := Run(t, exec.Command("kubectl", "--context", profile, "get", "po", "-A", "--show-labels"))
if rerr != nil {
t.Logf("%s: %v", rr.Command(), rerr)
}
t.Logf("(dbg) %s:\n%s", rr.Command(), rr.Stdout)
rr, err := Run(t, exec.Command("kubectl", "--context", profile, "describe", "node"))
if err != nil {
t.Logf("%s: %v", rr.Command(), err)
} else {
t.Logf("(dbg) %s:\n%s", rr.Command(), rr.Stdout)
}
rr, err = Run(t, exec.Command(Target(), "-p", profile, "logs", "--problems"))
if err != nil {
t.Logf("failed logs error: %v", err)
}
t.Logf("%s logs: %s", t.Name(), rr.Stdout)
t.Logf("<<< %s FAILED: end of post-mortem logs <<<", t.Name())
clusterLogs(t, profile)
}
Cleanup(t, profile, cancel)
}
// clusterLogs shows logs for debugging a failed cluster
func clusterLogs(t *testing.T, profile string) {
st := Status(context.Background(), t, Target(), profile, "Host")
if st != state.Running.String() {
t.Logf("%q host is not running, skipping log retrieval (state=%q)", profile, st)
return
}
t.Logf("<<< %s FAILED: start of post-mortem logs <<<", t.Name())
rr, err := Run(t, exec.Command(Target(), "-p", profile, "logs", "--problems"))
if err != nil {
t.Logf("failed logs error: %v", err)
return
}
t.Logf("%s logs: %s", t.Name(), rr.Stdout)
st = Status(context.Background(), t, Target(), profile, "APIServer")
if st != state.Running.String() {
t.Logf("%q apiserver is not running, skipping kubectl commands (state=%q)", profile, st)
return
}
rr, rerr := Run(t, exec.Command("kubectl", "--context", profile, "get", "po", "-A", "--show-labels"))
if rerr != nil {
t.Logf("%s: %v", rr.Command(), rerr)
return
}
t.Logf("(dbg) %s:\n%s", rr.Command(), rr.Stdout)
rr, err = Run(t, exec.Command("kubectl", "--context", profile, "describe", "node"))
if err != nil {
t.Logf("%s: %v", rr.Command(), err)
} else {
t.Logf("(dbg) %s:\n%s", rr.Command(), rr.Stdout)
}
t.Logf("<<< %s FAILED: end of post-mortem logs <<<", t.Name())
}
// podStatusMsg returns a human-readable pod status, for generating debug status
func podStatusMsg(pod core.Pod) string {
var sb strings.Builder
@ -300,8 +319,26 @@ func PodWait(ctx context.Context, t *testing.T, profile string, ns string, selec
return names, fmt.Errorf("%s: %v", fmt.Sprintf("%s within %s", selector, timeout), err)
}
// Status returns a minikube component status as a string
func Status(ctx context.Context, t *testing.T, path string, profile string, key string) string {
t.Helper()
// Reminder of useful keys: "Host", "Kubelet", "APIServer"
rr, err := Run(t, exec.CommandContext(ctx, path, "status", fmt.Sprintf("--format={{.%s}}", key), "-p", profile))
if err != nil {
t.Logf("status error: %v (may be ok)", err)
}
return strings.TrimSpace(rr.Stdout.String())
}
// showPodLogs logs debug info for pods
func showPodLogs(ctx context.Context, t *testing.T, profile string, ns string, names []string) {
t.Helper()
st := Status(context.Background(), t, Target(), profile, "APIServer")
if st != state.Running.String() {
t.Logf("%q apiserver is not running, skipping kubectl commands (state=%q)", profile, st)
return
}
t.Logf("%s: showing logs for failed pods as of %s", t.Name(), time.Now())
for _, name := range names {

View File

@ -36,16 +36,6 @@ import (
"k8s.io/minikube/pkg/minikube/constants"
)
// status returns a minikube component status as a string
func status(ctx context.Context, t *testing.T, path string, profile string, key string) string {
t.Helper()
rr, err := Run(t, exec.CommandContext(ctx, path, "status", fmt.Sprintf("--format={{.%s}}", key), "-p", profile))
if err != nil {
t.Logf("status error: %v (may be ok)", err)
}
return strings.TrimSpace(rr.Stdout.String())
}
func TestStartStop(t *testing.T) {
MaybeParallel(t)
@ -115,9 +105,18 @@ func TestStartStop(t *testing.T) {
t.Errorf("%s failed: %v", rr.Args, err)
}
got := status(ctx, t, Target(), profile, "Host")
if got != state.Stopped.String() {
t.Errorf("status = %q; want = %q", got, state.Stopped)
// The none driver never really stops
if !NoneDriver() {
got := Status(ctx, t, Target(), profile, "Host")
if got != state.Stopped.String() {
t.Errorf("post-stop host status = %q; want = %q", got, state.Stopped)
}
}
// Enable an addon to assert it comes up afterwards
rr, err = Run(t, exec.CommandContext(ctx, Target(), "addons", "enable", "dashboard", "-p", profile))
if err != nil {
t.Errorf("%s failed: %v", rr.Args, err)
}
rr, err = Run(t, exec.CommandContext(ctx, Target(), startArgs...))
@ -128,13 +127,18 @@ func TestStartStop(t *testing.T) {
if strings.Contains(tc.name, "cni") {
t.Logf("WARNING: cni mode requires additional setup before pods can schedule :(")
} else if _, err := PodWait(ctx, t, profile, "default", "integration-test=busybox", 4*time.Minute); err != nil {
t.Fatalf("wait: %v", err)
} else {
if _, err := PodWait(ctx, t, profile, "default", "integration-test=busybox", 4*time.Minute); err != nil {
t.Fatalf("post-stop-start pod wait: %v", err)
}
if _, err := PodWait(ctx, t, profile, "kubernetes-dashboard", "k8s-app=kubernetes-dashboard", 4*time.Minute); err != nil {
t.Fatalf("post-stop-start addon wait: %v", err)
}
}
got = status(ctx, t, Target(), profile, "Host")
got := Status(ctx, t, Target(), profile, "Host")
if got != state.Running.String() {
t.Errorf("host status = %q; want = %q", got, state.Running)
t.Errorf("post-start host status = %q; want = %q", got, state.Running)
}
if !NoneDriver() {
@ -235,14 +239,14 @@ func testPause(ctx context.Context, t *testing.T, profile string) {
t.Fatalf("%s failed: %v", rr.Args, err)
}
got := status(ctx, t, Target(), profile, "APIServer")
got := Status(ctx, t, Target(), profile, "APIServer")
if got != state.Paused.String() {
t.Errorf("apiserver status = %q; want = %q", got, state.Paused)
t.Errorf("post-pause apiserver status = %q; want = %q", got, state.Paused)
}
got = status(ctx, t, Target(), profile, "Kubelet")
got = Status(ctx, t, Target(), profile, "Kubelet")
if got != state.Stopped.String() {
t.Errorf("kubelet status = %q; want = %q", got, state.Stopped)
t.Errorf("post-pause kubelet status = %q; want = %q", got, state.Stopped)
}
rr, err = Run(t, exec.CommandContext(ctx, Target(), "unpause", "-p", profile, "--alsologtostderr", "-v=1"))
@ -250,14 +254,14 @@ func testPause(ctx context.Context, t *testing.T, profile string) {
t.Fatalf("%s failed: %v", rr.Args, err)
}
got = status(ctx, t, Target(), profile, "APIServer")
got = Status(ctx, t, Target(), profile, "APIServer")
if got != state.Running.String() {
t.Errorf("apiserver status = %q; want = %q", got, state.Running)
t.Errorf("post-unpause apiserver status = %q; want = %q", got, state.Running)
}
got = status(ctx, t, Target(), profile, "Kubelet")
got = Status(ctx, t, Target(), profile, "Kubelet")
if got != state.Running.String() {
t.Errorf("kubelet status = %q; want = %q", got, state.Running)
t.Errorf("post-unpause kubelet status = %q; want = %q", got, state.Running)
}
}

View File

@ -1,15 +1,17 @@
{
"\"{{.minikube_addon}}\" was successfully disabled": "",
"\"{{.name}}\" cluster does not exist. Proceeding ahead with cleanup.": "",
"\"The '{{.minikube_addon}}' addon is disabled": "",
"\"{{.name}}\" profile does not exist": "",
"\"{{.name}}\" profile does not exist, trying anyways.": "",
"\"{{.profile_name}}\" VM does not exist, nothing to stop": "",
"\"{{.profile_name}}\" host does not exist, unable to show an IP": "",
"\"{{.profile_name}}\" stopped.": "",
"'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": "",
"'{{.driver}}' driver reported an issue: {{.error}}": "",
"- {{.profile}}": "",
"A VPN or firewall is interfering with HTTP access to the minikube VM. Alternatively, try a different VM driver: https://minikube.sigs.k8s.io/docs/start/": "",
"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 blocking Docker 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": "",
@ -32,21 +34,33 @@
"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": "",
"Another hypervisor, such as VirtualBox, is conflicting with KVM. Please stop the other hypervisor, or use --vm-driver to switch to it.": "",
"Automatically selected the {{.experimental}}'{{.driver}}' driver": "",
"Automatically selected the {{.experimental}}'{{.driver}}' driver (alternates: {{.alternates}})": "",
"Available Commands": "",
"Basic Commands:": "",
"Block until the apiserver is servicing API requests": "",
"Cannot find directory {{.path}} for mount": "",
"Cannot use both --output and --format options": "",
"Check output of 'journalctl -xeu kubelet', try passing --extra-config=kubelet.cgroup-driver=systemd to minikube start": "",
"Check that SELinux is disabled, and that the provided apiserver flags are valid": "",
"Check that minikube is running and that you have specified the correct namespace (-n flag) if required.": "",
"Check that the provided apiserver flags are valid": "",
"Check that your --kubernetes-version has a leading 'v'. For example: 'v1.1.14'": "",
"Check that your apiserver flags are valid, or run 'minikube delete'": "",
"Check your firewall rules for interference, and run 'virt-host-validate' to check for KVM configuration issues. If you are running minikube within a VM, consider using --vm-driver=none": "",
"Configuration and Management Commands:": "",
"Configure a default route on this Linux host, or use another --vm-driver that does not require it": "",
"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 local host environment ...": "",
"Confirm that you have a working internet connection and that your VM has not run out of resources by using: 'minikube logs'": "",
"Confirm that you have supplied the correct value to --hyperv-virtual-switch using the 'Get-VMSwitch' command": "",
"Could not get profile flag": "",
"Could not process error from failed deletion": "",
"Could not process errors from failed deletion": "",
"Country code of the image mirror to be used. Leave empty to use the global one. For Chinese mainland users, set it to cn.": "Ländercode des zu verwendenden Image Mirror. Lassen Sie dieses Feld leer, um den globalen zu verwenden. Nutzer vom chinesischen Festland stellen cn ein.",
"Created a new profile : {{.profile_name}}": "",
"Creating Kubernetes in {{.driver_name}} container with (CPUs={{.number_of_cpus}}), Memory={{.memory_size}}MB ({{.host_memory_size}}MB available) ...": "",
"Creating a new profile failed": "",
"Creating mount {{.name}} ...": "Bereitstellung {{.name}} wird erstellt...",
"Creating {{.driver_name}} VM (CPUs={{.number_of_cpus}}, Memory={{.memory_size}}MB, Disk={{.disk_size}}MB) ...": "",
@ -82,26 +96,29 @@
"ERROR creating `registry-creds-ecr` secret: {{.error}}": "",
"ERROR creating `registry-creds-gcr` secret: {{.error}}": "",
"Either systemctl is not installed, or Docker is broken. Run 'sudo systemctl start docker' and 'journalctl -u docker'": "",
"Enable addons. see `minikube addons list` for a list of valid addon names.": "",
"Enable experimental NVIDIA GPU support in minikube": "Experimentellen NVIDIA GPU-Support in minikube aktivieren",
"Enable host resolver for NAT DNS requests (virtualbox driver only)": "Host Resolver für NAT DNS-Anfragen aktivieren (nur Virtualbox-Treiber)",
"Enable istio needs {{.minMem}} MB of memory and {{.minCpus}} CPUs.": "",
"Enable proxy for NAT DNS requests (virtualbox driver only)": "Proxy für NAT-DNS-Anforderungen aktivieren (nur Virtualbox-Treiber)",
"Enable the default CNI plugin (/etc/cni/net.d/k8s.conf). Used in conjunction with \\\"--network-plugin=cni\\": "Standard-CNI-Plugin-in (/etc/cni/net.d/k8s.conf) aktivieren. Wird in Verbindung mit \"--network-plugin = cni\" verwendet",
"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 '{{.name}}' returned an error: {{.error}}": "",
"Enabling addons: {{.addons}}": "",
"Enabling dashboard ...": "",
"Ensure that CRI-O is installed and healthy: Run 'sudo systemctl start crio' and 'journalctl -u crio'. Alternatively, use --container-runtime=docker": "",
"Ensure that Docker is installed and healthy: Run 'sudo systemctl start docker' and 'journalctl -u docker'. Alternatively, select another value for --vm-driver": "",
"Ensure that the user listed in /etc/libvirt/qemu.conf has access to your home directory": "",
"Ensure that your value for HTTPS_PROXY points to an HTTPS proxy rather than an HTTP proxy": "",
"Environment variables to pass to the Docker daemon. (format: key=value)": "Umgebungsvariablen, die an den Docker-Daemon übergeben werden. (Format: Schlüssel = Wert)",
"Error checking driver version: {{.error}}": "Fehler beim Prüfen der Treiberversion: {{.error}}",
"Error creating list template": "",
"Error creating minikube directory": "",
"Error creating status template": "",
"Error creating view template": "",
"Error executing list template": "",
"Error executing status template": "",
"Error executing template": "",
"Error executing view template": "",
"Error finding port for mount": "",
"Error getting IP": "",
"Error getting bootstrapper": "",
"Error getting client": "",
"Error getting client: {{.error}}": "",
"Error getting cluster": "",
@ -110,7 +127,7 @@
"Error getting host": "",
"Error getting host status": "",
"Error getting machine logs": "",
"Error getting machine status": "",
"Error getting profiles to delete": "",
"Error getting service status": "",
"Error getting service with namespace: {{.namespace}} and labels {{.labelName}}:{{.addonName}}: {{.error}}": "",
"Error getting the host IP address to use from within the VM": "",
@ -124,7 +141,6 @@
"Error parsing minikube version: {{.error}}": "Fehler beim Parsen der minikube-Version: {{.error}}",
"Error parsing vmDriver version: {{.error}}": "Fehler beim Parsen der vmDriver-Version: {{.error}}",
"Error reading {{.path}}: {{.error}}": "",
"Error restarting cluster": "",
"Error setting shell variables": "",
"Error starting cluster": "",
"Error starting mount": "",
@ -136,12 +152,12 @@
"Error: [{{.id}}] {{.error}}": "",
"Examples": "",
"Exiting": "Wird beendet",
"Exiting due to driver incompatibility": "",
"Exiting.": "",
"Failed runtime": "",
"Failed to cache ISO": "",
"Failed to cache and load images": "",
"Failed to cache binaries": "",
"Failed to cache images": "",
"Failed to cache images to tar": "",
"Failed to change permissions for {{.minikube_dir_path}}: {{.error}}": "Fehler beim Ändern der Berechtigungen für {{.minikube_dir_path}}: {{.error}}",
"Failed to check if machine exists": "",
"Failed to check main repository and mirrors for images for images": "",
@ -160,7 +176,7 @@
"Failed to get service URL: {{.error}}": "",
"Failed to kill mount process: {{.error}}": "Fehler beim Beenden des Bereitstellungsprozesses: {{.error}}",
"Failed to list cached images": "",
"Failed to remove profile": "",
"Failed to reload cached images": "",
"Failed to save config": "",
"Failed to set NO_PROXY Env. Please use `export NO_PROXY=$NO_PROXY,{{.ip}}": "NO_PROXY Env konnte nicht festgelegt werden. Benutzen Sie `export NO_PROXY = $ NO_PROXY, {{. Ip}}",
"Failed to set NO_PROXY Env. Please use `export NO_PROXY=$NO_PROXY,{{.ip}}`.": "",
@ -185,14 +201,19 @@
"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": "",
"Getting machine config failed": "",
"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 (kvm2 driver only)": "Hypervisor-Signatur vor dem Gast in minikube verbergen (nur kvm2-Treiber)",
"Hyperkit is broken. Upgrade to the latest hyperkit version and/or Docker for Desktop. Alternatively, you may choose an alternate --vm-driver": "",
"Hyperkit networking is broken. Upgrade to the latest hyperkit version and/or Docker for Desktop. Alternatively, you may choose an alternate --vm-driver": "",
"If set, automatically updates drivers to the latest version. Defaults to true.": "",
"If set, pause all namespaces": "",
"If set, unpause all namespaces": "",
"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.": "Wenn true, speichern Sie Docker-Images für den aktuellen Bootstrapper zwischen und laden Sie sie auf den Computer. Immer falsch mit --vm-driver = none.",
"If true, only download and cache files for later use - don't install or start anything.": "Wenn true, laden Sie nur Dateien für die spätere Verwendung herunter und speichern Sie sie installieren oder starten Sie nichts.",
@ -206,6 +227,7 @@
"Invalid size passed in argument: {{.error}}": "",
"IsEnabled failed": "",
"Kill the mount process spawned by minikube start": "",
"Kubernetes {{.new}} is now available. If you would like to upgrade, specify: --kubernetes-version={{.new}}": "",
"Kubernetes {{.version}} is not supported by this release of minikube": "",
"Launching Kubernetes ...": "Kubernetes wird gestartet...",
"Launching proxy ...": "",
@ -230,9 +252,13 @@
"Mounting host path {{.sourcePath}} into VM as {{.destinationPath}} ...": "",
"Mounts the specified directory into minikube": "",
"Mounts the specified directory into minikube.": "",
"Multiple errors deleting profiles": "",
"Multiple minikube profiles were found -": "",
"NIC Type used for host only network. One of Am79C970A, Am79C973, 82540EM, 82543GC, 82545EM, or virtio (virtualbox driver only)": "",
"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`.": "",
"Node may be unable to resolve external DNS records": "",
"None of the known repositories in your location are accessible. Using {{.image_repository_name}} as fallback.": "Keines der bekannten Repositories an Ihrem Standort ist zugänglich. {{.image_repository_name}} wird als Fallback verwendet.",
"None of the known repositories is accessible. Consider specifying an alternative image repository with --image-repository flag": "Keines der bekannten Repositories ist zugänglich. Erwägen Sie, ein alternatives Image-Repository mit der Kennzeichnung --image-repository anzugeben",
"Not passing {{.name}}={{.value}} to docker env.": "",
@ -243,11 +269,15 @@
"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 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)": "",
"Outputs 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": "",
"Pause": "",
"Paused kubelet and {{.count}} containers": "",
"Paused kubelet and {{.count}} containers in: {{.namespaces}}": "",
"Permissions: {{.octalMode}} ({{.writtenMode}})": "",
"Please enter a value:": "",
"Please install the minikube hyperkit VM driver, or select an alternative --vm-driver": "",
@ -264,22 +294,24 @@
"Problems detected in {{.entry}}:": "",
"Problems detected in {{.name}}:": "",
"Profile gets or sets the current minikube profile": "",
"Profile name \"{{.profilename}}\" is minikube keyword. To delete profile use command minikube delete -p \u003cprofile name\u003e": "",
"Provide VM UUID to restore MAC address (hyperkit driver only)": "Geben Sie die VM-UUID an, um die MAC-Adresse wiederherzustellen (nur Hyperkit-Treiber)",
"Pulling images ...": "",
"Reboot to complete VirtualBox installation, and verify that VirtualBox is not blocked by your system": "",
"Reboot to complete VirtualBox installation, verify that VirtualBox is not blocked by your system, and/or use another hypervisor": "",
"Rebuild libvirt with virt-network support": "",
"Received {{.name}} signal": "",
"Reconfiguring existing host ...": "",
"Registry mirrors to pass to the Docker daemon": "Registry-Mirror, die an den Docker-Daemon übergeben werden",
"Reinstall VirtualBox and reboot. Alternatively, try the kvm2 driver: https://minikube.sigs.k8s.io/docs/reference/drivers/kvm2/": "",
"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 using {{.bootstrapper}} ...": "Kubernetes mit {{.bootstrapper}} neu starten...",
"Removed all traces of the \"{{.name}}\" cluster.": "",
"Removing {{.directory}} ...": "{{.directory}} wird entfernt...",
"Requested CPU count {{.requested_cpus}} is less than the minimum allowed of {{.minimum_cpus}}": "",
"Requested cpu count {{.requested_cpus}} is less than the minimum allowed of {{.minimum_cpus}}": "",
"Requested disk size {{.requested_size}} is less than minimum of {{.minimum_size}}": "Die angeforderte Festplattengröße {{.requested_size}} liegt unter dem Mindestwert von {{.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.": "Die angeforderte Speicherzuordnung ({{.memory}} MB) ist geringer als die Standardspeicherzuordnung von {{.default_memorysize}} MB. Beachten Sie, dass minikube möglicherweise nicht richtig funktioniert oder unerwartet abstürzt.",
"Requested memory allocation {{.requested_size}} is less than the minimum allowed of {{.minimum_size}}": "Die angeforderte Speicherzuweisung {{.requested_size}} liegt unter dem zulässigen Mindestwert von {{.minimum_size}}.",
"Retriable failure: {{.error}}": "",
"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": "",
@ -287,22 +319,27 @@
"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 'kubectl describe pod coredns -n kube-system' and check for a firewall or DNS conflict": "",
"Run 'minikube delete' to delete the stale VM": "",
"Run 'minikube delete' to delete the stale VM, or and ensure that minikube is running as the same user you are issuing this command with": "",
"Run kubectl": "",
"Run minikube from the C: drive.": "",
"Run the kubernetes client, download it if necessary. Remember -- after kubectl!\n\nExamples:\nminikube kubectl -- --help\nminikube kubectl -- get pods --namespace kube-system": "",
"Run the minikube command as an Administrator": "",
"Run: 'chmod 600 $HOME/.kube/config'": "",
"Running on localhost (CPUs={{.number_of_cpus}}, Memory={{.memory_size}}MB, Disk={{.disk_size}}MB) ...": "",
"Selecting {{.experimental}}'{{.driver}}' driver from existing profile (alternates: {{.alternates}})": "",
"Selecting {{.experimental}}'{{.driver}}' driver from user configuration (alternates: {{.alternates}})": "",
"Set failed": "",
"Set flag to delete all profiles": "",
"Set this flag to delete the '.minikube' folder from your user directory.": "",
"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 a list of global command-line options (applies to all commands).": "",
"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 was set.": "",
"Sorry that minikube crashed. If this was unexpected, we would love to hear from you:": "",
"Sorry, Kubernetes {{.version}} is not supported by this release of minikube": "",
"Sorry, completion support is not yet implemented for {{.name}}": "",
"Sorry, the kubeadm.{{.parameter_name}} parameter is currently not supported by --extra-config": "Leider wird der Parameter kubeadm.{{.parameter_name}} momentan von --extra-config nicht unterstützt.",
@ -319,16 +356,23 @@
"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 deleted all profiles": "",
"Successfully mounted {{.sourcePath}} to {{.destinationPath}}": "",
"Successfully powered off Hyper-V. minikube driver -- {{.driver}}": "",
"Successfully purged minikube directory located at - [{{.minikubeDirectory}}]": "",
"Suggestion: {{.advice}}": "",
"Suggestion: {{.fix}}": "",
"Target directory {{.path}} must be an absolute path": "",
"The \"{{.driver_name}}\" driver requires root privileges. Please run minikube using 'sudo minikube --vm-driver={{.driver_name}}": "Der Treiber \"{{.driver_name}}\" benötigt Root-Rechte. Führen Sie minikube aus mit 'sudo minikube --vm-driver = {{. Driver_name}}.",
"The \"{{.driver_name}}\" driver requires root privileges. Please run minikube using 'sudo minikube --vm-driver={{.driver_name}}'.": "",
"The \"{{.driver_name}}\" driver should not be used with root privileges.": "",
"The \"{{.name}}\" cluster has been deleted.": "Der Cluster \"{{.name}}\" wurde gelöscht.",
"The \"{{.name}}\" cluster has been deleted.__1": "Der Cluster \"{{.name}}\" wurde gelöscht.",
"The 'none' driver does not respect the --cpus flag": "",
"The 'none' driver does not respect the --memory flag": "",
"The 'none' driver does not support multiple profiles: https://minikube.sigs.k8s.io/docs/reference/drivers/none/": "",
"The 'none' driver provides limited isolation and may reduce system security and reliability.": "Der Treiber \"Keine\" bietet eine eingeschränkte Isolation und beeinträchtigt möglicherweise Sicherheit und Zuverlässigkeit des Systems.",
"The '{{.addonName}}' addon is enabled": "",
"The '{{.driver}}' driver requires elevated permissions. The following commands will be executed:\\n\\n{{ .example }}\\n": "",
"The CIDR to be used for service cluster IPs.": "Die CIDR, die für Service-Cluster-IPs verwendet werden soll.",
"The CIDR to be used for the minikube VM (virtualbox driver only)": "Die CIDR, die für die minikube-VM verwendet werden soll (nur Virtualbox-Treiber)",
@ -351,14 +395,18 @@
"The docker host is currently not running": "",
"The docker service is currently not active": "",
"The driver '{{.driver}}' is not supported on {{.os}}": "Der Treiber '{{.driver}}' wird auf {{.os}} nicht unterstützt",
"The driver {{.experimental}} '{{.driver}}' is not supported on {{.os}}": "",
"The existing \"{{.profile_name}}\" VM that was created using the \"{{.old_driver}}\" driver, and is incompatible with the \"{{.driver}}\" driver.": "",
"The hyperv virtual switch name. Defaults to first found. (hyperv driver only)": "Der Name des virtuellen Hyperv-Switch. Standardmäßig zuerst gefunden. (nur Hyperv-Treiber)",
"The hypervisor does not appear to be configured properly. Run 'minikube start --alsologtostderr -v=1' and inspect the error code": "",
"The initial time interval for each check that wait performs in seconds": "",
"The kubernetes version that the minikube VM will use (ex: v1.2.3)": "Die von der minikube-VM verwendete Kubernetes-Version (Beispiel: v1.2.3)",
"The machine-driver specified is failing to start. Try running 'docker-machine-driver-\u003ctype\u003e version'": "",
"The minikube VM is offline. Please run 'minikube start' to start it again.": "",
"The name of the network plugin": "Der Name des Netzwerk-Plugins",
"The name of the network plugin.": "",
"The number of bytes to use for 9p packet payload": "",
"The output format. One of 'json', 'table'": "",
"The path on the file system where the docs in markdown need to be saved": "",
"The service namespace": "",
"The services namespace": "",
@ -367,7 +415,6 @@
"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://minikube.sigs.k8s.io/docs/reference/drivers/vmware/ for more information.\n\t\t\tTo disable this message, run [minikube config set ShowDriverDeprecationNotification false]": "",
"The {{.driver_name}} driver should not be used with root privileges.": "Der Treiber {{.driver_name}} sollte nicht mit Root-Rechten verwendet werden.",
"There appears to be another hypervisor conflicting with KVM. Please stop the other hypervisor, or use --vm-driver to switch to it.": "",
"There's a new version for '{{.driver_executable}}'. Please consider upgrading. {{.documentation_url}}": "Es gibt eine neue Version für '{{.driver_executable}}'. Bitte erwägen Sie ein Upgrade. {{.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}}": "",
@ -376,38 +423,45 @@
"This will start the mount daemon and automatically mount files into minikube": "Dadurch wird der Mount-Daemon gestartet und die Dateien werden automatisch in minikube geladen",
"This will start the mount daemon and automatically mount files into minikube.": "",
"Tip: To remove this root owned cluster, run: sudo {{.cmd}} delete": "Tipp: Um diesen Root-Cluster zu entfernen, führen Sie Folgendes aus: sudo {{.cmd}} delete",
"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}}": "Verwenden Sie zum Herstellen einer Verbindung zu diesem Cluster: kubectl --context = {{.name}}",
"To connect to this cluster, use: kubectl --context={{.name}}__1": "Verwenden Sie zum Herstellen einer Verbindung zu diesem Cluster: kubectl --context = {{.name}}",
"To connect to this cluster, use: kubectl --context={{.profile_name}}": "",
"To disable this notice, run: 'minikube config set WantUpdateNotification false'\\n": "",
"To proceed, either:\n 1) Delete the existing VM using: '{{.command}} delete'\n or\n 2) Restart with the existing driver: '{{.command}} start --vm-driver={{.old_driver}}'": "",
"To proceed, either:\n\n 1) Delete the existing \"{{.profile_name}}\" cluster using: '{{.command}} delete'\n\n * or *\n\n 2) Start the existing \"{{.profile_name}}\" cluster using: '{{.command}} start --vm-driver={{.old_driver}}'": "",
"To see addons list for other profiles use: `minikube addons -p name list`": "",
"To start minikube with HyperV Powershell must be in your PATH`": "",
"To use kubectl or minikube commands as your own user, you may need to relocate them. For example, to overwrite your own settings, run:": "Möglicherweise müssen Sie Kubectl- oder minikube-Befehle verschieben, um sie als eigenen Nutzer zu verwenden. Um beispielsweise Ihre eigenen Einstellungen zu überschreiben, führen Sie aus:",
"Troubleshooting Commands:": "",
"Trying to delete invalid profile {{.profile}}": "",
"Unable to bind flags": "",
"Unable to determine a default driver to use. Try specifying --vm-driver, or see https://minikube.sigs.k8s.io/docs/start/": "",
"Unable to enable dashboard": "",
"Unable to fetch latest version info": "",
"Unable to generate docs": "",
"Unable to generate the documentation. Please ensure that the path specified is a directory, exists \u0026 you have permission to write to it.": "",
"Unable to get VM IP address": "",
"Unable to get addon status for {{.name}}: {{.error}}": "",
"Unable to get bootstrapper: {{.error}}": "Bootstrapper kann nicht abgerufen werden: {{.error}}",
"Unable to get current user": "",
"Unable to get runtime": "",
"Unable to get the status of the cluster.": "",
"Unable to get the status of the {{.name}} cluster.": "",
"Unable to kill mount process: {{.error}}": "",
"Unable to load cached images from config file.": "Zwischengespeicherte Bilder können nicht aus der Konfigurationsdatei geladen werden.",
"Unable to load cached images: {{.error}}": "",
"Unable to load config: {{.error}}": "Konfig kann nicht geladen werden: {{.error}}",
"Unable to parse \"{{.kubernetes_version}}\": {{.error}}": "\"{{.Kubernetes_version}}\" kann nicht geparst werden: {{.error}}",
"Unable to parse default Kubernetes version from constants: {{.error}}": "",
"Unable to parse oldest Kubernetes version from constants: {{.error}}": "",
"Unable to pull images, which may be OK: {{.error}}": "Bilder können nicht abgerufen werden, was möglicherweise kein Problem darstellt: {{.error}}",
"Unable to remove machine directory: %v": "",
"Unable to start VM": "",
"Unable to start VM. Please investigate and run 'minikube delete' if possible": "",
"Unable to stop VM": "",
"Unable to update {{.driver}} driver: {{.error}}": "",
"Unable to verify SSH connectivity: {{.error}}. Will retry...": "",
"Uninstalling Kubernetes {{.kubernetes_version}} using {{.bootstrapper_name}} ...": "Kubernetes {{.kubernetes_version}} wird mit {{.bootstrapper_name}} deinstalliert...",
"Unmounting {{.path}} ...": "",
"Unpaused kubelet and {{.count}} containers": "",
"Unpaused kubelet and {{.count}} containers in: {{.namespaces}}": "",
"Unset the KUBECONFIG environment variable, or verify that it does not point to an empty or otherwise invalid path": "",
"Unset variables instead of setting them": "",
"Update server returned an empty list": "",
@ -416,15 +470,20 @@
"Usage": "",
"Usage: minikube completion SHELL": "",
"Usage: minikube delete": "",
"Usage: minikube delete --all --purge": "",
"Use \"{{.CommandPath}} [command] --help\" for more information about a command.": "",
"Use 'kubect get po -A' to find the correct and namespace name": "",
"Use -A to specify all namespaces": "",
"Use VirtualBox to remove the conflicting VM and/or network interfaces": "",
"Use native Golang SSH client (default true). Set to 'false' to use the command line 'ssh' command when accessing the docker machine. Useful for the machine drivers when they will not start with 'Waiting for SSH'.": "",
"User ID: {{.userID}}": "",
"Userspace file server is shutdown": "",
"Userspace file server:": "",
"Using image repository {{.name}}": "Verwenden des Image-Repositorys {{.name}}",
"Using the '{{.runtime}}' runtime with the 'none' driver is an untested configuration!": "",
"Using the running {{.driver_name}} \"{{.profile_name}}\" VM ...": "",
"VM driver is one of: %v": "VM-Treiber ist einer von: %v",
"VM is unable to access {{.repository}}, you may need to configure a proxy or set --image-repository": "",
"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 ...": "",
@ -434,12 +493,12 @@
"VirtualBox cannot create a network, probably because it conflicts with an existing network that minikube no longer knows about. Try running 'minikube delete'": "",
"VirtualBox is broken. Disable real-time anti-virus software, reboot, and reinstall VirtualBox if the problem continues.": "",
"VirtualBox is broken. Reinstall VirtualBox, reboot, and run 'minikube delete'.": "",
"VirtualBox is unable to find its network interface. Try upgrading to the latest release and rebooting.": "",
"Virtualization support is disabled on your computer. If you are running minikube within a VM, try '--vm-driver=none'. Otherwise, consult your systems BIOS manual for how to enable virtualization.": "",
"Wait failed": "",
"Wait failed: {{.error}}": "",
"Wait until Kubernetes core services are healthy before exiting": "Warten Sie vor dem Beenden, bis die Kerndienste von Kubernetes fehlerfrei arbeiten",
"Wait until Kubernetes core services are healthy before exiting.": "",
"Waiting for the host to be provisioned ...": "",
"Waiting for:": "",
"Waiting for cluster to come online ...": "",
"Where to root the NFS Shares, defaults to /nfsshares (hyperkit driver only)": "Als Root für die NFS-Freigaben wird standardmäßig /nfsshares verwendet (nur Hyperkit-Treiber)",
"You appear to be using a proxy, but your NO_PROXY environment does not include the minikube IP ({{.ip_address}}). Please see {{.documentation_url}} for more details": "Sie scheinen einen Proxy zu verwenden, aber Ihre NO_PROXY-Umgebung enthält keine minikube-IP ({{.ip_address}}). Weitere Informationen finden Sie unter {{.documentation_url}}",
"You can delete them using the following command(s):": "",
@ -452,50 +511,62 @@
"Your minikube vm is not running, try minikube start.": "",
"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\"": "",
"addons modifies minikube addons files using subcommands like \"minikube addons enable dashboard\"": "",
"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": "",
"dry-run mode. Validates configuration, but does not mutate system state": "",
"dry-run validation complete!": "",
"enable failed": "",
"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}}": "",
"if true, will embed the certs in kubeconfig.": "",
"kubeadm detected a TCP port conflict with another process: probably another local Kubernetes installation. Run lsof -p\u003cport\u003e to find the process and kill it": "",
"kubectl and minikube configuration will be stored in {{.home_folder}}": "Konfiguration von Kubectl und minikube wird in {{.home_folder}} gespeichert",
"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": "",
"max time to wait per Kubernetes core services to be healthy.": "",
"minikube is not running, so the service cannot be accessed": "",
"minikube addons list --output OUTPUT. json, list": "",
"minikube is exiting due to an error. If the above message is not useful, open an issue:": "",
"minikube is unable to access the Google Container Registry. You may need to configure it to use a HTTP proxy.": "",
"minikube is unable to connect to the VM: {{.error}}\n\nThis is likely due to one of two reasons:\n\n- VPN or firewall interference\n- {{.hypervisor}} network configuration issue\n\nSuggested workarounds:\n\n- Disable your local VPN or firewall software\n- Configure your local VPN or firewall to allow access to {{.ip}}\n- Restart or reinstall {{.hypervisor}}\n- Use an alternative --vm-driver": "",
"minikube profile was successfully set to {{.profile_name}}": "",
"minikube status --output OUTPUT. json, text": "",
"minikube {{.version}} is available! Download it: {{.url}}": "",
"mkcmp is used to compare performance of two minikube binaries": "",
"mount argument \"{{.value}}\" must be in form: \u003csource directory\u003e:\u003ctarget directory\u003e": "",
"mount failed": "",
"namespaces to pause": "",
"namespaces to unpause": "",
"not enough arguments ({{.ArgCount}}).\\nusage: minikube config set PROPERTY_NAME PROPERTY_VALUE": "",
"pause containers": "",
"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`": "",
"reload cached images.": "",
"reloads images previously added using the 'cache add' subcommand": "",
"service {{.namespace_name}}/{{.service_name}} has no node port": "",
"stat failed": "",
"status json failure": "",
"status text failure": "",
"toom any arguments ({{.ArgCount}}).\\nusage: minikube config set PROPERTY_NAME PROPERTY_VALUE": "",
"tunnel creates a route to services deployed with type LoadBalancer and sets their Ingress to their ClusterIP": "",
"tunnel creates a route to services deployed with type LoadBalancer and sets their Ingress to their ClusterIP. for a detailed example see https://minikube.sigs.k8s.io/docs/tasks/loadbalancer": "",
"tunnel makes services of type LoadBalancer accessible on localhost": "",
"unable to bind flags": "",
"unable to delete minikube config folder": "",
"unable to set logtostderr": "",
"unpause Kubernetes": "",
"unset failed": "",
"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}}": "",
"unsupported or missing driver: {{.name}}": "",
"update config": "",
"usage: minikube addons configure ADDON_NAME": "",
"usage: minikube addons disable ADDON_NAME": "",
@ -503,9 +574,12 @@
"usage: minikube addons list": "",
"usage: minikube addons open ADDON_NAME": "",
"usage: minikube config unset PROPERTY_NAME": "",
"usage: minikube delete": "",
"usage: minikube delete --all": "",
"usage: minikube profile [MINIKUBE_PROFILE_NAME]": "",
"zsh completion failed": "",
"{{.addonName}} was successfully enabled": "",
"{{.driver}} does not appear to be installed": "",
"{{.driver}} does not appear to be installed, but is specified by an existing profile. Please run 'minikube delete' or install {{.driver}}": "",
"{{.extra_option_component_name}}.{{.key}}={{.value}}": "",
"{{.machine}} IP has been updated to point at {{.ip}}": "",
"{{.machine}} IP was already correctly configured for {{.ip}}": "",
@ -513,6 +587,7 @@
"{{.name}} has no available configuration options": "",
"{{.name}} was successfully configured": "",
"{{.name}}\" profile does not exist": "Profil \"{{.name}}\" existiert nicht",
"{{.path}} is version {{.client_version}}, and is incompatible with Kubernetes {{.cluster_version}}. You will need to update {{.path}} or use 'minikube kubectl' to connect with this cluster": "",
"{{.prefix}}minikube {{.version}} on {{.platform}}": "{{.prefix}}minikube {{.version}} auf {{.platform}}",
"{{.type}} is not yet a supported filesystem. We will try anyways!": "",
"{{.url}} is not accessible: {{.error}}": ""

View File

@ -1,15 +1,17 @@
{
"\"{{.minikube_addon}}\" was successfully disabled": "",
"\"{{.name}}\" cluster does not exist. Proceeding ahead with cleanup.": "",
"\"The '{{.minikube_addon}}' addon is disabled": "",
"\"{{.name}}\" profile does not exist": "El perfil \"{{.name}}\" no existe",
"\"{{.name}}\" profile does not exist, trying anyways.": "",
"\"{{.profile_name}}\" VM does not exist, nothing to stop": "",
"\"{{.profile_name}}\" host does not exist, unable to show an IP": "",
"\"{{.profile_name}}\" stopped.": "",
"'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": "",
"'{{.driver}}' driver reported an issue: {{.error}}": "",
"- {{.profile}}": "",
"A VPN or firewall is interfering with HTTP access to the minikube VM. Alternatively, try a different VM driver: https://minikube.sigs.k8s.io/docs/start/": "",
"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 blocking Docker 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": "",
@ -32,21 +34,33 @@
"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": "",
"Another hypervisor, such as VirtualBox, is conflicting with KVM. Please stop the other hypervisor, or use --vm-driver to switch to it.": "",
"Automatically selected the {{.experimental}}'{{.driver}}' driver": "",
"Automatically selected the {{.experimental}}'{{.driver}}' driver (alternates: {{.alternates}})": "",
"Available Commands": "",
"Basic Commands:": "",
"Block until the apiserver is servicing API requests": "",
"Cannot find directory {{.path}} for mount": "",
"Cannot use both --output and --format options": "",
"Check output of 'journalctl -xeu kubelet', try passing --extra-config=kubelet.cgroup-driver=systemd to minikube start": "",
"Check that SELinux is disabled, and that the provided apiserver flags are valid": "",
"Check that minikube is running and that you have specified the correct namespace (-n flag) if required.": "",
"Check that the provided apiserver flags are valid": "",
"Check that your --kubernetes-version has a leading 'v'. For example: 'v1.1.14'": "",
"Check that your apiserver flags are valid, or run 'minikube delete'": "",
"Check your firewall rules for interference, and run 'virt-host-validate' to check for KVM configuration issues. If you are running minikube within a VM, consider using --vm-driver=none": "",
"Configuration and Management Commands:": "",
"Configure a default route on this Linux host, or use another --vm-driver that does not require it": "",
"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 local host environment ...": "",
"Confirm that you have a working internet connection and that your VM has not run out of resources by using: 'minikube logs'": "",
"Confirm that you have supplied the correct value to --hyperv-virtual-switch using the 'Get-VMSwitch' command": "",
"Could not get profile flag": "",
"Could not process error from failed deletion": "",
"Could not process errors from failed deletion": "",
"Country code of the image mirror to be used. Leave empty to use the global one. For Chinese mainland users, set it to cn.": "Código de país de la réplica de imagen que quieras utilizar. Déjalo en blanco para usar el valor global. Los usuarios de China continental deben definirlo como cn.",
"Created a new profile : {{.profile_name}}": "",
"Creating Kubernetes in {{.driver_name}} container with (CPUs={{.number_of_cpus}}), Memory={{.memory_size}}MB ({{.host_memory_size}}MB available) ...": "",
"Creating a new profile failed": "",
"Creating mount {{.name}} ...": "Creando la activación {{.name}}...",
"Creating {{.driver_name}} VM (CPUs={{.number_of_cpus}}, Memory={{.memory_size}}MB, Disk={{.disk_size}}MB) ...": "",
@ -82,26 +96,29 @@
"ERROR creating `registry-creds-ecr` secret: {{.error}}": "",
"ERROR creating `registry-creds-gcr` secret: {{.error}}": "",
"Either systemctl is not installed, or Docker is broken. Run 'sudo systemctl start docker' and 'journalctl -u docker'": "",
"Enable addons. see `minikube addons list` for a list of valid addon names.": "",
"Enable experimental NVIDIA GPU support in minikube": "Permite habilitar la compatibilidad experimental con GPUs NVIDIA en minikube",
"Enable host resolver for NAT DNS requests (virtualbox driver only)": "Permite habilitar la resolución del host en las solicitudes DNS con traducción de direcciones de red (NAT) aplicada (solo con el controlador de Virtualbox)",
"Enable istio needs {{.minMem}} MB of memory and {{.minCpus}} CPUs.": "",
"Enable proxy for NAT DNS requests (virtualbox driver only)": "Permite habilitar el uso de proxies en las solicitudes de DNS con traducción de direcciones de red (NAT) aplicada (solo con el controlador de Virtualbox)",
"Enable the default CNI plugin (/etc/cni/net.d/k8s.conf). Used in conjunction with \\\"--network-plugin=cni\\": "Permite habilitar el complemento CNI predeterminado (/etc/cni/net.d/k8s.conf). Se utiliza junto con \"--network-plugin=cni",
"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 '{{.name}}' returned an error: {{.error}}": "",
"Enabling addons: {{.addons}}": "",
"Enabling dashboard ...": "",
"Ensure that CRI-O is installed and healthy: Run 'sudo systemctl start crio' and 'journalctl -u crio'. Alternatively, use --container-runtime=docker": "",
"Ensure that Docker is installed and healthy: Run 'sudo systemctl start docker' and 'journalctl -u docker'. Alternatively, select another value for --vm-driver": "",
"Ensure that the user listed in /etc/libvirt/qemu.conf has access to your home directory": "",
"Ensure that your value for HTTPS_PROXY points to an HTTPS proxy rather than an HTTP proxy": "",
"Environment variables to pass to the Docker daemon. (format: key=value)": "Variables de entorno que se transferirán al daemon de Docker. Formato: clave=valor",
"Error checking driver version: {{.error}}": "No se ha podido comprobar la versión del controlador: {{.error}}",
"Error creating list template": "",
"Error creating minikube directory": "",
"Error creating status template": "",
"Error creating view template": "",
"Error executing list template": "",
"Error executing status template": "",
"Error executing template": "",
"Error executing view template": "",
"Error finding port for mount": "",
"Error getting IP": "",
"Error getting bootstrapper": "",
"Error getting client": "",
"Error getting client: {{.error}}": "",
"Error getting cluster": "",
@ -110,7 +127,7 @@
"Error getting host": "",
"Error getting host status": "",
"Error getting machine logs": "",
"Error getting machine status": "",
"Error getting profiles to delete": "",
"Error getting service status": "",
"Error getting service with namespace: {{.namespace}} and labels {{.labelName}}:{{.addonName}}: {{.error}}": "",
"Error getting the host IP address to use from within the VM": "",
@ -124,7 +141,6 @@
"Error parsing minikube version: {{.error}}": "No se ha podido analizar la versión de minikube: {{.error}}",
"Error parsing vmDriver version: {{.error}}": "No se ha podido analizar la versión de vmDriver: {{.error}}",
"Error reading {{.path}}: {{.error}}": "",
"Error restarting cluster": "",
"Error setting shell variables": "",
"Error starting cluster": "",
"Error starting mount": "",
@ -136,12 +152,12 @@
"Error: [{{.id}}] {{.error}}": "",
"Examples": "",
"Exiting": "Saliendo",
"Exiting due to driver incompatibility": "",
"Exiting.": "",
"Failed runtime": "",
"Failed to cache ISO": "",
"Failed to cache and load images": "",
"Failed to cache binaries": "",
"Failed to cache images": "",
"Failed to cache images to tar": "",
"Failed to change permissions for {{.minikube_dir_path}}: {{.error}}": "No se han podido cambiar los permisos de {{.minikube_dir_path}}: {{.error}}",
"Failed to check if machine exists": "",
"Failed to check main repository and mirrors for images for images": "",
@ -160,7 +176,7 @@
"Failed to get service URL: {{.error}}": "",
"Failed to kill mount process: {{.error}}": "No se ha podido detener el proceso de activación: {{.error}}",
"Failed to list cached images": "",
"Failed to remove profile": "",
"Failed to reload cached images": "",
"Failed to save config": "",
"Failed to set NO_PROXY Env. Please use `export NO_PROXY=$NO_PROXY,{{.ip}}": "No se ha podido definir la variable de entorno NO_PROXY. Utiliza export NO_PROXY=$NO_PROXY,{{.ip}}",
"Failed to set NO_PROXY Env. Please use `export NO_PROXY=$NO_PROXY,{{.ip}}`.": "",
@ -185,14 +201,19 @@
"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": "",
"Getting machine config failed": "",
"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 (kvm2 driver only)": "Permite ocultar la firma del hipervisor al invitado en minikube (solo con el controlador de kvm2)",
"Hyperkit is broken. Upgrade to the latest hyperkit version and/or Docker for Desktop. Alternatively, you may choose an alternate --vm-driver": "",
"Hyperkit networking is broken. Upgrade to the latest hyperkit version and/or Docker for Desktop. Alternatively, you may choose an alternate --vm-driver": "",
"If set, automatically updates drivers to the latest version. Defaults to true.": "",
"If set, pause all namespaces": "",
"If set, unpause all namespaces": "",
"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.": "Si el valor es \"true\", las imágenes de Docker del programa previo actual se almacenan en caché y se cargan en la máquina. Siempre es \"false\" si se especifica --vm-driver=none.",
"If true, only download and cache files for later use - don't install or start anything.": "Si el valor es \"true\", los archivos solo se descargan y almacenan en caché (no se instala ni inicia nada).",
@ -206,6 +227,7 @@
"Invalid size passed in argument: {{.error}}": "",
"IsEnabled failed": "",
"Kill the mount process spawned by minikube start": "",
"Kubernetes {{.new}} is now available. If you would like to upgrade, specify: --kubernetes-version={{.new}}": "",
"Kubernetes {{.version}} is not supported by this release of minikube": "",
"Launching Kubernetes ...": "Iniciando Kubernetes...",
"Launching proxy ...": "",
@ -230,9 +252,13 @@
"Mounting host path {{.sourcePath}} into VM as {{.destinationPath}} ...": "",
"Mounts the specified directory into minikube": "",
"Mounts the specified directory into minikube.": "",
"Multiple errors deleting profiles": "",
"Multiple minikube profiles were found -": "",
"NIC Type used for host only network. One of Am79C970A, Am79C973, 82540EM, 82543GC, 82545EM, or virtio (virtualbox driver only)": "",
"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`.": "",
"Node may be unable to resolve external DNS records": "",
"None of the known repositories in your location are accessible. Using {{.image_repository_name}} as fallback.": "No se puede acceder a ninguno de los repositorios conocidos de tu ubicación. Se utilizará {{.image_repository_name}} como alternativa.",
"None of the known repositories is accessible. Consider specifying an alternative image repository with --image-repository flag": "No se puede acceder a ninguno de los repositorios conocidos. Plantéate indicar un repositorio de imágenes alternativo con la marca --image-repository.",
"Not passing {{.name}}={{.value}} to docker env.": "",
@ -243,11 +269,15 @@
"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 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)": "",
"Outputs 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": "",
"Pause": "",
"Paused kubelet and {{.count}} containers": "",
"Paused kubelet and {{.count}} containers in: {{.namespaces}}": "",
"Permissions: {{.octalMode}} ({{.writtenMode}})": "",
"Please enter a value:": "",
"Please install the minikube hyperkit VM driver, or select an alternative --vm-driver": "",
@ -264,22 +294,24 @@
"Problems detected in {{.entry}}:": "",
"Problems detected in {{.name}}:": "",
"Profile gets or sets the current minikube profile": "",
"Profile name \"{{.profilename}}\" is minikube keyword. To delete profile use command minikube delete -p \u003cprofile name\u003e": "",
"Provide VM UUID to restore MAC address (hyperkit driver only)": "Permite especificar un UUID de VM para restaurar la dirección MAC (solo con el controlador de hyperkit)",
"Pulling images ...": "",
"Reboot to complete VirtualBox installation, and verify that VirtualBox is not blocked by your system": "",
"Reboot to complete VirtualBox installation, verify that VirtualBox is not blocked by your system, and/or use another hypervisor": "",
"Rebuild libvirt with virt-network support": "",
"Received {{.name}} signal": "",
"Reconfiguring existing host ...": "",
"Registry mirrors to pass to the Docker daemon": "Réplicas del registro que se transferirán al daemon de Docker",
"Reinstall VirtualBox and reboot. Alternatively, try the kvm2 driver: https://minikube.sigs.k8s.io/docs/reference/drivers/kvm2/": "",
"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 using {{.bootstrapper}} ...": "Reiniciando Kubernetes con {{.bootstrapper}}...",
"Removed all traces of the \"{{.name}}\" cluster.": "",
"Removing {{.directory}} ...": "Eliminando {{.directory}}...",
"Requested CPU count {{.requested_cpus}} is less than the minimum allowed of {{.minimum_cpus}}": "",
"Requested cpu count {{.requested_cpus}} is less than the minimum allowed of {{.minimum_cpus}}": "",
"Requested disk size {{.requested_size}} is less than minimum of {{.minimum_size}}": "El tamaño de disco de {{.requested_size}} que se ha solicitado es inferior al tamaño mínimo de {{.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.": "El valor de la asignación de memoria ({{.memory}} MB) solicitada es inferior a la asignación de memoria predeterminada de {{.default_memorysize}} MB. minikube podría no funcionar correctamente o fallar de manera inesperada.",
"Requested memory allocation {{.requested_size}} is less than the minimum allowed of {{.minimum_size}}": "El valor de la asignación de memoria de {{.requested_size}} solicitada es inferior al valor mínimo de {{.minimum_size}}",
"Retriable failure: {{.error}}": "",
"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": "",
@ -287,22 +319,27 @@
"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 'kubectl describe pod coredns -n kube-system' and check for a firewall or DNS conflict": "",
"Run 'minikube delete' to delete the stale VM": "",
"Run 'minikube delete' to delete the stale VM, or and ensure that minikube is running as the same user you are issuing this command with": "",
"Run kubectl": "",
"Run minikube from the C: drive.": "",
"Run the kubernetes client, download it if necessary. Remember -- after kubectl!\n\nExamples:\nminikube kubectl -- --help\nminikube kubectl -- get pods --namespace kube-system": "",
"Run the minikube command as an Administrator": "",
"Run: 'chmod 600 $HOME/.kube/config'": "",
"Running on localhost (CPUs={{.number_of_cpus}}, Memory={{.memory_size}}MB, Disk={{.disk_size}}MB) ...": "",
"Selecting {{.experimental}}'{{.driver}}' driver from existing profile (alternates: {{.alternates}})": "",
"Selecting {{.experimental}}'{{.driver}}' driver from user configuration (alternates: {{.alternates}})": "",
"Set failed": "",
"Set flag to delete all profiles": "",
"Set this flag to delete the '.minikube' folder from your user directory.": "",
"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 a list of global command-line options (applies to all commands).": "",
"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 was set.": "",
"Sorry that minikube crashed. If this was unexpected, we would love to hear from you:": "",
"Sorry, Kubernetes {{.version}} is not supported by this release of minikube": "",
"Sorry, completion support is not yet implemented for {{.name}}": "",
"Sorry, the kubeadm.{{.parameter_name}} parameter is currently not supported by --extra-config": "De momento, --extra-config no admite el parámetro kubeadm.{{.parameter_name}}",
@ -319,16 +356,23 @@
"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 deleted all profiles": "",
"Successfully mounted {{.sourcePath}} to {{.destinationPath}}": "",
"Successfully powered off Hyper-V. minikube driver -- {{.driver}}": "",
"Successfully purged minikube directory located at - [{{.minikubeDirectory}}]": "",
"Suggestion: {{.advice}}": "",
"Suggestion: {{.fix}}": "",
"Target directory {{.path}} must be an absolute path": "",
"The \"{{.driver_name}}\" driver requires root privileges. Please run minikube using 'sudo minikube --vm-driver={{.driver_name}}": "El controlador \"{{.driver_name}}\" requiere privilegios de raíz. Ejecuta minikube mediante sudo minikube --vm-driver={{.driver_name}}",
"The \"{{.driver_name}}\" driver requires root privileges. Please run minikube using 'sudo minikube --vm-driver={{.driver_name}}'.": "",
"The \"{{.driver_name}}\" driver should not be used with root privileges.": "",
"The \"{{.name}}\" cluster has been deleted.": "Se ha eliminado el clúster \"{{.name}}\".",
"The \"{{.name}}\" cluster has been deleted.__1": "Se ha eliminado el clúster \"{{.name}}\".",
"The 'none' driver does not respect the --cpus flag": "",
"The 'none' driver does not respect the --memory flag": "",
"The 'none' driver does not support multiple profiles: https://minikube.sigs.k8s.io/docs/reference/drivers/none/": "",
"The 'none' driver provides limited isolation and may reduce system security and reliability.": "La opción de controlador \"none\" proporciona un aislamiento limitado y puede reducir la seguridad y la fiabilidad del sistema.",
"The '{{.addonName}}' addon is enabled": "",
"The '{{.driver}}' driver requires elevated permissions. The following commands will be executed:\\n\\n{{ .example }}\\n": "",
"The CIDR to be used for service cluster IPs.": "El CIDR de las IP del clúster de servicio.",
"The CIDR to be used for the minikube VM (virtualbox driver only)": "El CIDR de la VM de minikube (solo con el controlador de Virtualbox)",
@ -351,14 +395,18 @@
"The docker host is currently not running": "",
"The docker service is currently not active": "",
"The driver '{{.driver}}' is not supported on {{.os}}": "El controlador \"{{.driver}}\" no se puede utilizar en {{.os}}",
"The driver {{.experimental}} '{{.driver}}' is not supported on {{.os}}": "",
"The existing \"{{.profile_name}}\" VM that was created using the \"{{.old_driver}}\" driver, and is incompatible with the \"{{.driver}}\" driver.": "",
"The hyperv virtual switch name. Defaults to first found. (hyperv driver only)": "El nombre del conmutador virtual de hyperv. El valor predeterminado será el primer nombre que se encuentre (solo con el controlador de hyperv).",
"The hypervisor does not appear to be configured properly. Run 'minikube start --alsologtostderr -v=1' and inspect the error code": "",
"The initial time interval for each check that wait performs in seconds": "",
"The kubernetes version that the minikube VM will use (ex: v1.2.3)": "La versión de Kubernetes que utilizará la VM de minikube (p. ej.: versión 1.2.3)",
"The machine-driver specified is failing to start. Try running 'docker-machine-driver-\u003ctype\u003e version'": "",
"The minikube VM is offline. Please run 'minikube start' to start it again.": "",
"The name of the network plugin": "El nombre del complemento de red",
"The name of the network plugin.": "",
"The number of bytes to use for 9p packet payload": "",
"The output format. One of 'json', 'table'": "",
"The path on the file system where the docs in markdown need to be saved": "",
"The service namespace": "",
"The services namespace": "",
@ -367,7 +415,6 @@
"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://minikube.sigs.k8s.io/docs/reference/drivers/vmware/ for more information.\n\t\t\tTo disable this message, run [minikube config set ShowDriverDeprecationNotification false]": "",
"The {{.driver_name}} driver should not be used with root privileges.": "El controlador {{.driver_name}} no se debe utilizar con privilegios de raíz.",
"There appears to be another hypervisor conflicting with KVM. Please stop the other hypervisor, or use --vm-driver to switch to it.": "",
"There's a new version for '{{.driver_executable}}'. Please consider upgrading. {{.documentation_url}}": "Hay una nueva versión de \"{{.driver_executable}}\". Te recomendamos que realices la actualización. {{.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}}": "",
@ -376,38 +423,45 @@
"This will start the mount daemon and automatically mount files into minikube": "Se iniciará el daemon de activación y se activarán automáticamente los archivos en minikube",
"This will start the mount daemon and automatically mount files into minikube.": "",
"Tip: To remove this root owned cluster, run: sudo {{.cmd}} delete": "Para eliminar este clúster de raíz, ejecuta: sudo {{.cmd}} delete",
"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}}": "Para conectarte a este clúster, usa: kubectl --context={{.name}}",
"To connect to this cluster, use: kubectl --context={{.name}}__1": "Para conectarte a este clúster, usa: kubectl --context={{.name}}",
"To connect to this cluster, use: kubectl --context={{.profile_name}}": "",
"To disable this notice, run: 'minikube config set WantUpdateNotification false'\\n": "",
"To proceed, either:\n 1) Delete the existing VM using: '{{.command}} delete'\n or\n 2) Restart with the existing driver: '{{.command}} start --vm-driver={{.old_driver}}'": "",
"To proceed, either:\n\n 1) Delete the existing \"{{.profile_name}}\" cluster using: '{{.command}} delete'\n\n * or *\n\n 2) Start the existing \"{{.profile_name}}\" cluster using: '{{.command}} start --vm-driver={{.old_driver}}'": "",
"To see addons list for other profiles use: `minikube addons -p name list`": "",
"To start minikube with HyperV Powershell must be in your PATH`": "",
"To use kubectl or minikube commands as your own user, you may need to relocate them. For example, to overwrite your own settings, run:": "Para usar comandos de kubectl o minikube como tu propio usuario, puede que debas reubicarlos. Por ejemplo, para sobrescribir tu configuración, ejecuta:",
"Troubleshooting Commands:": "",
"Trying to delete invalid profile {{.profile}}": "",
"Unable to bind flags": "",
"Unable to determine a default driver to use. Try specifying --vm-driver, or see https://minikube.sigs.k8s.io/docs/start/": "",
"Unable to enable dashboard": "",
"Unable to fetch latest version info": "",
"Unable to generate docs": "",
"Unable to generate the documentation. Please ensure that the path specified is a directory, exists \u0026 you have permission to write to it.": "",
"Unable to get VM IP address": "",
"Unable to get addon status for {{.name}}: {{.error}}": "",
"Unable to get bootstrapper: {{.error}}": "No se ha podido obtener el programa previo: {{.error}}",
"Unable to get current user": "",
"Unable to get runtime": "",
"Unable to get the status of the cluster.": "",
"Unable to get the status of the {{.name}} cluster.": "",
"Unable to kill mount process: {{.error}}": "",
"Unable to load cached images from config file.": "No se han podido cargar las imágenes almacenadas en caché del archivo de configuración.",
"Unable to load cached images: {{.error}}": "",
"Unable to load config: {{.error}}": "No se ha podido cargar la configuración: {{.error}}",
"Unable to parse \"{{.kubernetes_version}}\": {{.error}}": "No se ha podido analizar la versión \"{{.kubernetes_version}}\": {{.error}}",
"Unable to parse default Kubernetes version from constants: {{.error}}": "",
"Unable to parse oldest Kubernetes version from constants: {{.error}}": "",
"Unable to pull images, which may be OK: {{.error}}": "No se ha podido recuperar imágenes, que podrían estar en buen estado: {{.error}}",
"Unable to remove machine directory: %v": "",
"Unable to start VM": "",
"Unable to start VM. Please investigate and run 'minikube delete' if possible": "",
"Unable to stop VM": "",
"Unable to update {{.driver}} driver: {{.error}}": "",
"Unable to verify SSH connectivity: {{.error}}. Will retry...": "",
"Uninstalling Kubernetes {{.kubernetes_version}} using {{.bootstrapper_name}} ...": "Desinstalando Kubernetes {{.kubernetes_version}} mediante {{.bootstrapper_name}}...",
"Unmounting {{.path}} ...": "",
"Unpaused kubelet and {{.count}} containers": "",
"Unpaused kubelet and {{.count}} containers in: {{.namespaces}}": "",
"Unset the KUBECONFIG environment variable, or verify that it does not point to an empty or otherwise invalid path": "",
"Unset variables instead of setting them": "",
"Update server returned an empty list": "",
@ -416,15 +470,20 @@
"Usage": "",
"Usage: minikube completion SHELL": "",
"Usage: minikube delete": "",
"Usage: minikube delete --all --purge": "",
"Use \"{{.CommandPath}} [command] --help\" for more information about a command.": "",
"Use 'kubect get po -A' to find the correct and namespace name": "",
"Use -A to specify all namespaces": "",
"Use VirtualBox to remove the conflicting VM and/or network interfaces": "",
"Use native Golang SSH client (default true). Set to 'false' to use the command line 'ssh' command when accessing the docker machine. Useful for the machine drivers when they will not start with 'Waiting for SSH'.": "",
"User ID: {{.userID}}": "",
"Userspace file server is shutdown": "",
"Userspace file server:": "",
"Using image repository {{.name}}": "Utilizando el repositorio de imágenes {{.name}}",
"Using the '{{.runtime}}' runtime with the 'none' driver is an untested configuration!": "",
"Using the running {{.driver_name}} \"{{.profile_name}}\" VM ...": "",
"VM driver is one of: %v": "El controlador de la VM es uno de los siguientes: %v",
"VM is unable to access {{.repository}}, you may need to configure a proxy or set --image-repository": "",
"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 ...": "",
@ -434,12 +493,12 @@
"VirtualBox cannot create a network, probably because it conflicts with an existing network that minikube no longer knows about. Try running 'minikube delete'": "",
"VirtualBox is broken. Disable real-time anti-virus software, reboot, and reinstall VirtualBox if the problem continues.": "",
"VirtualBox is broken. Reinstall VirtualBox, reboot, and run 'minikube delete'.": "",
"VirtualBox is unable to find its network interface. Try upgrading to the latest release and rebooting.": "",
"Virtualization support is disabled on your computer. If you are running minikube within a VM, try '--vm-driver=none'. Otherwise, consult your systems BIOS manual for how to enable virtualization.": "",
"Wait failed": "",
"Wait failed: {{.error}}": "",
"Wait until Kubernetes core services are healthy before exiting": "Espera hasta que los servicios principales de Kubernetes se encuentren en buen estado antes de salir",
"Wait until Kubernetes core services are healthy before exiting.": "",
"Waiting for the host to be provisioned ...": "",
"Waiting for:": "",
"Waiting for cluster to come online ...": "",
"Where to root the NFS Shares, defaults to /nfsshares (hyperkit driver only)": "Ruta en la raíz de los recursos compartidos de NFS. Su valor predeterminado es /nfsshares (solo con el controlador de hyperkit)",
"You appear to be using a proxy, but your NO_PROXY environment does not include the minikube IP ({{.ip_address}}). Please see {{.documentation_url}} for more details": "Parece que estás usando un proxy, pero tu entorno NO_PROXY no incluye la dirección IP de minikube ({{.ip_address}}). Consulta {{.documentation_url}} para obtener más información",
"You can delete them using the following command(s):": "",
@ -452,50 +511,62 @@
"Your minikube vm is not running, try minikube start.": "",
"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\"": "",
"addons modifies minikube addons files using subcommands like \"minikube addons enable dashboard\"": "",
"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": "",
"dry-run mode. Validates configuration, but does not mutate system state": "",
"dry-run validation complete!": "",
"enable failed": "",
"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}}": "",
"if true, will embed the certs in kubeconfig.": "",
"kubeadm detected a TCP port conflict with another process: probably another local Kubernetes installation. Run lsof -p\u003cport\u003e to find the process and kill it": "",
"kubectl and minikube configuration will be stored in {{.home_folder}}": "La configuración de kubectl y de minikube se almacenará en {{.home_folder}}",
"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": "",
"max time to wait per Kubernetes core services to be healthy.": "",
"minikube is not running, so the service cannot be accessed": "",
"minikube addons list --output OUTPUT. json, list": "",
"minikube is exiting due to an error. If the above message is not useful, open an issue:": "",
"minikube is unable to access the Google Container Registry. You may need to configure it to use a HTTP proxy.": "",
"minikube is unable to connect to the VM: {{.error}}\n\nThis is likely due to one of two reasons:\n\n- VPN or firewall interference\n- {{.hypervisor}} network configuration issue\n\nSuggested workarounds:\n\n- Disable your local VPN or firewall software\n- Configure your local VPN or firewall to allow access to {{.ip}}\n- Restart or reinstall {{.hypervisor}}\n- Use an alternative --vm-driver": "",
"minikube profile was successfully set to {{.profile_name}}": "",
"minikube status --output OUTPUT. json, text": "",
"minikube {{.version}} is available! Download it: {{.url}}": "",
"mkcmp is used to compare performance of two minikube binaries": "",
"mount argument \"{{.value}}\" must be in form: \u003csource directory\u003e:\u003ctarget directory\u003e": "",
"mount failed": "",
"namespaces to pause": "",
"namespaces to unpause": "",
"not enough arguments ({{.ArgCount}}).\\nusage: minikube config set PROPERTY_NAME PROPERTY_VALUE": "",
"pause containers": "",
"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`": "",
"reload cached images.": "",
"reloads images previously added using the 'cache add' subcommand": "",
"service {{.namespace_name}}/{{.service_name}} has no node port": "",
"stat failed": "",
"status json failure": "",
"status text failure": "",
"toom any arguments ({{.ArgCount}}).\\nusage: minikube config set PROPERTY_NAME PROPERTY_VALUE": "",
"tunnel creates a route to services deployed with type LoadBalancer and sets their Ingress to their ClusterIP": "",
"tunnel creates a route to services deployed with type LoadBalancer and sets their Ingress to their ClusterIP. for a detailed example see https://minikube.sigs.k8s.io/docs/tasks/loadbalancer": "",
"tunnel makes services of type LoadBalancer accessible on localhost": "",
"unable to bind flags": "",
"unable to delete minikube config folder": "",
"unable to set logtostderr": "",
"unpause Kubernetes": "",
"unset failed": "",
"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}}": "",
"unsupported or missing driver: {{.name}}": "",
"update config": "",
"usage: minikube addons configure ADDON_NAME": "",
"usage: minikube addons disable ADDON_NAME": "",
@ -503,15 +574,19 @@
"usage: minikube addons list": "",
"usage: minikube addons open ADDON_NAME": "",
"usage: minikube config unset PROPERTY_NAME": "",
"usage: minikube delete": "",
"usage: minikube delete --all": "",
"usage: minikube profile [MINIKUBE_PROFILE_NAME]": "",
"zsh completion failed": "",
"{{.addonName}} was successfully enabled": "",
"{{.driver}} does not appear to be installed": "",
"{{.driver}} does not appear to be installed, but is specified by an existing profile. Please run 'minikube delete' or install {{.driver}}": "",
"{{.extra_option_component_name}}.{{.key}}={{.value}}": "",
"{{.machine}} IP has been updated to point at {{.ip}}": "",
"{{.machine}} IP was already correctly configured for {{.ip}}": "",
"{{.name}} cluster does not exist": "",
"{{.name}} has no available configuration options": "",
"{{.name}} was successfully configured": "",
"{{.path}} is version {{.client_version}}, and is incompatible with Kubernetes {{.cluster_version}}. You will need to update {{.path}} or use 'minikube kubectl' to connect with this cluster": "",
"{{.prefix}}minikube {{.version}} on {{.platform}}": "{{.prefix}}minikube {{.version}} en {{.platform}}",
"{{.type}} is not yet a supported filesystem. We will try anyways!": "",
"{{.url}} is not accessible: {{.error}}": ""

View File

@ -1,15 +1,17 @@
{
"\"{{.minikube_addon}}\" was successfully disabled": "",
"\"{{.name}}\" cluster does not exist. Proceeding ahead with cleanup.": "",
"\"The '{{.minikube_addon}}' addon is disabled": "",
"\"{{.name}}\" profile does not exist": "Le profil \"{{.name}}\" n'existe pas.",
"\"{{.name}}\" profile does not exist, trying anyways.": "",
"\"{{.profile_name}}\" VM does not exist, nothing to stop": "",
"\"{{.profile_name}}\" host does not exist, unable to show an IP": "",
"\"{{.profile_name}}\" stopped.": "\"{{.profile_name}}\" est arrêté.",
"'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": "",
"'{{.driver}}' driver reported an issue: {{.error}}": "",
"- {{.profile}}": "",
"A VPN or firewall is interfering with HTTP access to the minikube VM. Alternatively, try a different VM driver: https://minikube.sigs.k8s.io/docs/start/": "",
"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 blocking Docker 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": "",
@ -32,22 +34,34 @@
"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": "",
"Another hypervisor, such as VirtualBox, is conflicting with KVM. Please stop the other hypervisor, or use --vm-driver to switch to it.": "",
"Automatically selected the {{.experimental}}'{{.driver}}' driver": "",
"Automatically selected the {{.experimental}}'{{.driver}}' driver (alternates: {{.alternates}})": "",
"Available Commands": "",
"Basic Commands:": "",
"Block until the apiserver is servicing API requests": "",
"Cannot find directory {{.path}} for mount": "",
"Cannot use both --output and --format options": "",
"Check output of 'journalctl -xeu kubelet', try passing --extra-config=kubelet.cgroup-driver=systemd to minikube start": "",
"Check that SELinux is disabled, and that the provided apiserver flags are valid": "",
"Check that minikube is running and that you have specified the correct namespace (-n flag) if required.": "",
"Check that the provided apiserver flags are valid": "",
"Check that your --kubernetes-version has a leading 'v'. For example: 'v1.1.14'": "",
"Check that your apiserver flags are valid, or run 'minikube delete'": "",
"Check your firewall rules for interference, and run 'virt-host-validate' to check for KVM configuration issues. If you are running minikube within a VM, consider using --vm-driver=none": "",
"Configuration and Management Commands:": "",
"Configure a default route on this Linux host, or use another --vm-driver that does not require it": "",
"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}}": "Configuration de l'environment pour Kubernetes {{.k8sVersion}} sur {{.runtime}} {{.runtimeVersion}}",
"Configuring local host environment ...": "",
"Confirm that you have a working internet connection and that your VM has not run out of resources by using: 'minikube logs'": "",
"Confirm that you have supplied the correct value to --hyperv-virtual-switch using the 'Get-VMSwitch' command": "",
"Could not get profile flag": "",
"Could not process error from failed deletion": "",
"Could not process errors from failed deletion": "",
"Country code of the image mirror to be used. Leave empty to use the global one. For Chinese mainland users, set it to cn.": "Code pays du miroir d'images à utiliser. Laissez ce paramètre vide pour utiliser le miroir international. Pour les utilisateurs situés en Chine continentale, définissez sa valeur sur \"cn\".",
"Created a new profile : {{.profile_name}}": "",
"Creating Kubernetes in {{.driver_name}} container with (CPUs={{.number_of_cpus}}), Memory={{.memory_size}}MB ({{.host_memory_size}}MB available) ...": "",
"Creating a new profile failed": "",
"Creating mount {{.name}} ...": "Création de l'installation {{.name}}…",
"Creating {{.driver_name}} VM (CPUs={{.number_of_cpus}}, Memory={{.memory_size}}MB, Disk={{.disk_size}}MB) ...": "Création d'une VM {{.driver_name}} (CPUs={{.number_of_cpus}}, Mémoire={{.memory_size}}MB, Disque={{.disk_size}}MB)...",
@ -82,26 +96,29 @@
"ERROR creating `registry-creds-ecr` secret: {{.error}}": "",
"ERROR creating `registry-creds-gcr` secret: {{.error}}": "",
"Either systemctl is not installed, or Docker is broken. Run 'sudo systemctl start docker' and 'journalctl -u docker'": "",
"Enable addons. see `minikube addons list` for a list of valid addon names.": "",
"Enable experimental NVIDIA GPU support in minikube": "Active l'assistance expérimentale du GPU NVIDIA dans minikube.",
"Enable host resolver for NAT DNS requests (virtualbox driver only)": "Active le résolveur d'hôte pour les requêtes DNS NAT (pilote VirtualBox uniquement).",
"Enable istio needs {{.minMem}} MB of memory and {{.minCpus}} CPUs.": "",
"Enable proxy for NAT DNS requests (virtualbox driver only)": "Active le proxy pour les requêtes DNS NAT (pilote VirtualBox uniquement).",
"Enable the default CNI plugin (/etc/cni/net.d/k8s.conf). Used in conjunction with \\\"--network-plugin=cni\\": "Active le plug-in CNI par défaut (/etc/cni/net.d/k8s.conf). Utilisé en association avec \\\"--network-plugin=cni\\\".",
"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 '{{.name}}' returned an error: {{.error}}": "",
"Enabling addons: {{.addons}}": "",
"Enabling dashboard ...": "",
"Ensure that CRI-O is installed and healthy: Run 'sudo systemctl start crio' and 'journalctl -u crio'. Alternatively, use --container-runtime=docker": "",
"Ensure that Docker is installed and healthy: Run 'sudo systemctl start docker' and 'journalctl -u docker'. Alternatively, select another value for --vm-driver": "",
"Ensure that the user listed in /etc/libvirt/qemu.conf has access to your home directory": "",
"Ensure that your value for HTTPS_PROXY points to an HTTPS proxy rather than an HTTP proxy": "",
"Environment variables to pass to the Docker daemon. (format: key=value)": "Variables d'environment à transmettre au daemon Docker (format : clé = valeur).",
"Error checking driver version: {{.error}}": "Erreur lors de la vérification de la version du driver : {{.error}}",
"Error creating list template": "",
"Error creating minikube directory": "",
"Error creating status template": "",
"Error creating view template": "",
"Error executing list template": "",
"Error executing status template": "",
"Error executing template": "",
"Error executing view template": "",
"Error finding port for mount": "",
"Error getting IP": "",
"Error getting bootstrapper": "",
"Error getting client": "",
"Error getting client: {{.error}}": "",
"Error getting cluster": "",
@ -110,7 +127,6 @@
"Error getting host": "",
"Error getting host status": "",
"Error getting machine logs": "",
"Error getting machine status": "",
"Error getting profiles to delete": "",
"Error getting service status": "",
"Error getting service with namespace: {{.namespace}} and labels {{.labelName}}:{{.addonName}}: {{.error}}": "",
@ -125,7 +141,6 @@
"Error parsing minikube version: {{.error}}": "Erreur lors de l'analyse de la version de minikube : {{.error}}",
"Error parsing vmDriver version: {{.error}}": "Erreur lors de l'analyse de la version du pilote de la VM : {{.error}}",
"Error reading {{.path}}: {{.error}}": "",
"Error restarting cluster": "",
"Error setting shell variables": "",
"Error starting cluster": "",
"Error starting mount": "",
@ -137,12 +152,12 @@
"Error: [{{.id}}] {{.error}}": "",
"Examples": "",
"Exiting": "Fermeture…",
"Exiting due to driver incompatibility": "",
"Exiting.": "",
"Failed runtime": "",
"Failed to cache ISO": "",
"Failed to cache and load images": "",
"Failed to cache binaries": "",
"Failed to cache images": "",
"Failed to cache images to tar": "",
"Failed to change permissions for {{.minikube_dir_path}}: {{.error}}": "Échec de la modification des autorisations pour {{.minikube_dir_path}} : {{.error}}",
"Failed to check if machine exists": "",
"Failed to check main repository and mirrors for images for images": "",
@ -161,7 +176,7 @@
"Failed to get service URL: {{.error}}": "",
"Failed to kill mount process: {{.error}}": "Échec de l'arrêt du processus d'installation : {{.error}}",
"Failed to list cached images": "",
"Failed to remove profile": "",
"Failed to reload cached images": "",
"Failed to save config": "",
"Failed to set NO_PROXY Env. Please use `export NO_PROXY=$NO_PROXY,{{.ip}}": "Échec de la définition de NO_PROXY Env. Veuillez utiliser `export NO_PROXY=$NO_PROXY,{{.ip}}.",
"Failed to set NO_PROXY Env. Please use `export NO_PROXY=$NO_PROXY,{{.ip}}`.": "",
@ -186,14 +201,19 @@
"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": "",
"Getting machine config failed": "",
"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 (kvm2 driver only)": "Masque la signature de l'hyperviseur de l'invité dans minikube (pilote kvm2 uniquement).",
"Hyperkit is broken. Upgrade to the latest hyperkit version and/or Docker for Desktop. Alternatively, you may choose an alternate --vm-driver": "",
"Hyperkit networking is broken. Upgrade to the latest hyperkit version and/or Docker for Desktop. Alternatively, you may choose an alternate --vm-driver": "",
"If set, automatically updates drivers to the latest version. Defaults to true.": "",
"If set, pause all namespaces": "",
"If set, unpause all namespaces": "",
"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.": "Si la valeur est \"true\", mettez les images Docker en cache pour l'amorceur actuel et chargez-les dans la machine. La valeur est toujours \"false\" avec --vm-driver=none.",
"If true, only download and cache files for later use - don't install or start anything.": "Si la valeur est \"true\", téléchargez les fichiers et mettez-les en cache uniquement pour une utilisation future. Ne lancez pas d'installation et ne commencez aucun processus.",
@ -207,6 +227,7 @@
"Invalid size passed in argument: {{.error}}": "",
"IsEnabled failed": "",
"Kill the mount process spawned by minikube start": "",
"Kubernetes {{.new}} is now available. If you would like to upgrade, specify: --kubernetes-version={{.new}}": "",
"Kubernetes {{.version}} is not supported by this release of minikube": "",
"Launching Kubernetes ...": "Lancement de Kubernetes...",
"Launching proxy ...": "",
@ -231,9 +252,13 @@
"Mounting host path {{.sourcePath}} into VM as {{.destinationPath}} ...": "",
"Mounts the specified directory into minikube": "",
"Mounts the specified directory into minikube.": "",
"Multiple errors deleting profiles": "",
"Multiple minikube profiles were found -": "",
"NIC Type used for host only network. One of Am79C970A, Am79C973, 82540EM, 82543GC, 82545EM, or virtio (virtualbox driver only)": "",
"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`.": "",
"Node may be unable to resolve external DNS records": "",
"None of the known repositories in your location are accessible. Using {{.image_repository_name}} as fallback.": "Aucun dépôt connu dans votre emplacement n'est accessible. {{.image_repository_name}} est utilisé comme dépôt de remplacement.",
"None of the known repositories is accessible. Consider specifying an alternative image repository with --image-repository flag": "Aucun dépôt connu n'est accessible. Pensez à spécifier un autre dépôt d'images à l'aide de l'indicateur \"--image-repository\".",
"Not passing {{.name}}={{.value}} to docker env.": "",
@ -244,11 +269,15 @@
"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 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)": "",
"Outputs 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": "",
"Pause": "",
"Paused kubelet and {{.count}} containers": "",
"Paused kubelet and {{.count}} containers in: {{.namespaces}}": "",
"Permissions: {{.octalMode}} ({{.writtenMode}})": "",
"Please enter a value:": "",
"Please install the minikube hyperkit VM driver, or select an alternative --vm-driver": "",
@ -265,22 +294,24 @@
"Problems detected in {{.entry}}:": "",
"Problems detected in {{.name}}:": "",
"Profile gets or sets the current minikube profile": "",
"Profile name \"{{.profilename}}\" is minikube keyword. To delete profile use command minikube delete -p \u003cprofile name\u003e": "",
"Provide VM UUID to restore MAC address (hyperkit driver only)": "Fournit l'identifiant unique universel (UUID) de la VM pour restaurer l'adresse MAC (pilote hyperkit uniquement).",
"Pulling images ...": "Extraction des images... ",
"Reboot to complete VirtualBox installation, and verify that VirtualBox is not blocked by your system": "",
"Reboot to complete VirtualBox installation, verify that VirtualBox is not blocked by your system, and/or use another hypervisor": "",
"Rebuild libvirt with virt-network support": "",
"Received {{.name}} signal": "",
"Reconfiguring existing host ...": "",
"Registry mirrors to pass to the Docker daemon": "Miroirs de dépôt à transmettre au daemon Docker.",
"Reinstall VirtualBox and reboot. Alternatively, try the kvm2 driver: https://minikube.sigs.k8s.io/docs/reference/drivers/kvm2/": "",
"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 using {{.bootstrapper}} ...": "Redémarrage de Kubernetes à l'aide de {{.bootstrapper}}…",
"Removed all traces of the \"{{.name}}\" cluster.": "",
"Removing {{.directory}} ...": "Suppression du répertoire {{.directory}}…",
"Requested CPU count {{.requested_cpus}} is less than the minimum allowed of {{.minimum_cpus}}": "",
"Requested cpu count {{.requested_cpus}} is less than the minimum allowed of {{.minimum_cpus}}": "",
"Requested disk size {{.requested_size}} is less than minimum of {{.minimum_size}}": "La taille de disque demandée ({{.requested_size}}) est inférieure à la taille minimale ({{.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.": "L'allocation de mémoire demandée ({{.memory}} Mo) est inférieure à l'allocation de mémoire par défaut ({{.default_memorysize}} Mo). Sachez que minikube pourrait ne pas fonctionner correctement ou planter de manière inattendue.",
"Requested memory allocation {{.requested_size}} is less than the minimum allowed of {{.minimum_size}}": "L'allocation de mémoire demandée ({{.requested_size}}) est inférieure au minimum autorisé ({{.minimum_size}}).",
"Retriable failure: {{.error}}": "",
"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": "",
@ -288,22 +319,27 @@
"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 'kubectl describe pod coredns -n kube-system' and check for a firewall or DNS conflict": "",
"Run 'minikube delete' to delete the stale VM": "",
"Run 'minikube delete' to delete the stale VM, or and ensure that minikube is running as the same user you are issuing this command with": "",
"Run kubectl": "",
"Run minikube from the C: drive.": "",
"Run the kubernetes client, download it if necessary. Remember -- after kubectl!\n\nExamples:\nminikube kubectl -- --help\nminikube kubectl -- get pods --namespace kube-system": "",
"Run the minikube command as an Administrator": "",
"Run: 'chmod 600 $HOME/.kube/config'": "",
"Running on localhost (CPUs={{.number_of_cpus}}, Memory={{.memory_size}}MB, Disk={{.disk_size}}MB) ...": "",
"Selecting {{.experimental}}'{{.driver}}' driver from existing profile (alternates: {{.alternates}})": "",
"Selecting {{.experimental}}'{{.driver}}' driver from user configuration (alternates: {{.alternates}})": "",
"Set failed": "",
"Set flag to delete all profiles": "",
"Set this flag to delete the '.minikube' folder from your user directory.": "",
"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 a list of global command-line options (applies to all commands).": "",
"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 was set.": "",
"Sorry that minikube crashed. If this was unexpected, we would love to hear from you:": "",
"Sorry, Kubernetes {{.version}} is not supported by this release of minikube": "",
"Sorry, completion support is not yet implemented for {{.name}}": "",
"Sorry, the kubeadm.{{.parameter_name}} parameter is currently not supported by --extra-config": "Désolé, le paramètre kubeadm.{{.parameter_name}} ne peut actuellement pas être utilisé avec \"--extra-config\".",
@ -320,15 +356,22 @@
"Stopping \"{{.profile_name}}\" in {{.driver_name}} ...": "Arrêt de \"{{.profile_name}}\" sur {{.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 deleted all profiles": "",
"Successfully mounted {{.sourcePath}} to {{.destinationPath}}": "",
"Successfully powered off Hyper-V. minikube driver -- {{.driver}}": "",
"Successfully purged minikube directory located at - [{{.minikubeDirectory}}]": "",
"Suggestion: {{.advice}}": "",
"Suggestion: {{.fix}}": "",
"Target directory {{.path}} must be an absolute path": "",
"The \"{{.driver_name}}\" driver requires root privileges. Please run minikube using 'sudo minikube --vm-driver={{.driver_name}}": "Le pilote \"{{.driver_name}}\" nécessite de disposer de droits racine. Veuillez exécuter minikube à l'aide de \"sudo minikube --vm-driver={{.driver_name}}\".",
"The \"{{.driver_name}}\" driver requires root privileges. Please run minikube using 'sudo minikube --vm-driver={{.driver_name}}'.": "",
"The \"{{.driver_name}}\" driver should not be used with root privileges.": "",
"The \"{{.name}}\" cluster has been deleted.": "Le cluster \"{{.name}}\" a été supprimé.",
"The 'none' driver does not respect the --cpus flag": "",
"The 'none' driver does not respect the --memory flag": "",
"The 'none' driver does not support multiple profiles: https://minikube.sigs.k8s.io/docs/reference/drivers/none/": "",
"The 'none' driver provides limited isolation and may reduce system security and reliability.": "L'isolation fournie par le pilote \"none\" (aucun) est limitée, ce qui peut diminuer la sécurité et la fiabilité du système.",
"The '{{.addonName}}' addon is enabled": "",
"The '{{.driver}}' driver requires elevated permissions. The following commands will be executed:\\n\\n{{ .example }}\\n": "",
"The CIDR to be used for service cluster IPs.": "Méthode CIDR à exploiter pour les adresses IP des clusters du service.",
"The CIDR to be used for the minikube VM (virtualbox driver only)": "Méthode CIDR à exploiter pour la VM minikube (pilote virtualbox uniquement).",
@ -351,14 +394,18 @@
"The docker host is currently not running": "",
"The docker service is currently not active": "",
"The driver '{{.driver}}' is not supported on {{.os}}": "Le pilote \"{{.driver}}\" n'est pas compatible avec {{.os}}.",
"The driver {{.experimental}} '{{.driver}}' is not supported on {{.os}}": "",
"The existing \"{{.profile_name}}\" VM that was created using the \"{{.old_driver}}\" driver, and is incompatible with the \"{{.driver}}\" driver.": "",
"The hyperv virtual switch name. Defaults to first found. (hyperv driver only)": "Nom du commutateur virtuel hyperv. La valeur par défaut affiche le premier commutateur trouvé (pilote hyperv uniquement).",
"The hypervisor does not appear to be configured properly. Run 'minikube start --alsologtostderr -v=1' and inspect the error code": "",
"The initial time interval for each check that wait performs in seconds": "",
"The kubernetes version that the minikube VM will use (ex: v1.2.3)": "Version de Kubernetes qu'utilisera la VM minikube (exemple : v1.2.3).",
"The machine-driver specified is failing to start. Try running 'docker-machine-driver-\u003ctype\u003e version'": "",
"The minikube VM is offline. Please run 'minikube start' to start it again.": "",
"The name of the network plugin": "Nom du plug-in réseau.",
"The name of the network plugin.": "",
"The number of bytes to use for 9p packet payload": "",
"The output format. One of 'json', 'table'": "",
"The path on the file system where the docs in markdown need to be saved": "",
"The service namespace": "",
"The services namespace": "",
@ -367,7 +414,6 @@
"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://minikube.sigs.k8s.io/docs/reference/drivers/vmware/ for more information.\n\t\t\tTo disable this message, run [minikube config set ShowDriverDeprecationNotification false]": "",
"The {{.driver_name}} driver should not be used with root privileges.": "Le pilote {{.driver_name}} ne doit pas être utilisé avec des droits racine.",
"There appears to be another hypervisor conflicting with KVM. Please stop the other hypervisor, or use --vm-driver to switch to it.": "",
"There's a new version for '{{.driver_executable}}'. Please consider upgrading. {{.documentation_url}}": "Une nouvelle version de \"{{.driver_executable}}\" est disponible. Pensez à effectuer la mise à niveau. {{.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}}": "",
@ -376,38 +422,45 @@
"This will start the mount daemon and automatically mount files into minikube": "Cela permet de lancer le daemon d'installation et d'installer automatiquement les fichiers dans minikube.",
"This will start the mount daemon and automatically mount files into minikube.": "",
"Tip: To remove this root owned cluster, run: sudo {{.cmd}} delete": "Conseil : Pour supprimer ce cluster appartenant à la racine, exécutez la commande \"sudo {{.cmd}} delete\".",
"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}}": "Pour vous connecter à ce cluster, utilisez la commande \"kubectl --context={{.name}}\".",
"To connect to this cluster, use: kubectl --context={{.name}}__1": "Pour vous connecter à ce cluster, utilisez la commande \"kubectl --context={{.name}}\".",
"To connect to this cluster, use: kubectl --context={{.profile_name}}": "",
"To disable this notice, run: 'minikube config set WantUpdateNotification false'\\n": "",
"To proceed, either:\n 1) Delete the existing VM using: '{{.command}} delete'\n or\n 2) Restart with the existing driver: '{{.command}} start --vm-driver={{.old_driver}}'": "",
"To proceed, either:\n\n 1) Delete the existing \"{{.profile_name}}\" cluster using: '{{.command}} delete'\n\n * or *\n\n 2) Start the existing \"{{.profile_name}}\" cluster using: '{{.command}} start --vm-driver={{.old_driver}}'": "",
"To see addons list for other profiles use: `minikube addons -p name list`": "",
"To start minikube with HyperV Powershell must be in your PATH`": "",
"To use kubectl or minikube commands as your own user, you may need to relocate them. For example, to overwrite your own settings, run:": "Pour utiliser les commandes kubectl ou minikube sous votre propre nom d'utilisateur, vous devrez peut-être les déplacer. Par exemple, pour écraser vos propres paramètres, exécutez la commande suivante :",
"Troubleshooting Commands:": "",
"Trying to delete invalid profile {{.profile}}": "",
"Unable to bind flags": "",
"Unable to determine a default driver to use. Try specifying --vm-driver, or see https://minikube.sigs.k8s.io/docs/start/": "",
"Unable to enable dashboard": "",
"Unable to fetch latest version info": "",
"Unable to generate docs": "",
"Unable to generate the documentation. Please ensure that the path specified is a directory, exists \u0026 you have permission to write to it.": "",
"Unable to get VM IP address": "",
"Unable to get addon status for {{.name}}: {{.error}}": "",
"Unable to get bootstrapper: {{.error}}": "Impossible d'obtenir l'amorceur : {{.error}}",
"Unable to get current user": "",
"Unable to get runtime": "",
"Unable to get the status of the cluster.": "",
"Unable to get the status of the {{.name}} cluster.": "",
"Unable to kill mount process: {{.error}}": "",
"Unable to load cached images from config file.": "Impossible de charger les images mises en cache depuis le fichier de configuration.",
"Unable to load cached images: {{.error}}": "",
"Unable to load config: {{.error}}": "Impossible de charger la configuration : {{.error}}",
"Unable to parse \"{{.kubernetes_version}}\": {{.error}}": "Impossible d'analyser la version \"{{.kubernetes_version}}\" : {{.error}}",
"Unable to parse default Kubernetes version from constants: {{.error}}": "",
"Unable to parse oldest Kubernetes version from constants: {{.error}}": "",
"Unable to pull images, which may be OK: {{.error}}": "Impossible d'extraire des images, qui sont peut-être au bon format : {{.error}}",
"Unable to remove machine directory: %v": "",
"Unable to start VM": "",
"Unable to start VM. Please investigate and run 'minikube delete' if possible": "",
"Unable to stop VM": "",
"Unable to update {{.driver}} driver: {{.error}}": "",
"Unable to verify SSH connectivity: {{.error}}. Will retry...": "",
"Uninstalling Kubernetes {{.kubernetes_version}} using {{.bootstrapper_name}} ...": "Désinstallation de Kubernetes {{.kubernetes_version}} à l'aide de {{.bootstrapper_name}}…",
"Unmounting {{.path}} ...": "",
"Unpaused kubelet and {{.count}} containers": "",
"Unpaused kubelet and {{.count}} containers in: {{.namespaces}}": "",
"Unset the KUBECONFIG environment variable, or verify that it does not point to an empty or otherwise invalid path": "",
"Unset variables instead of setting them": "",
"Update server returned an empty list": "",
@ -416,15 +469,20 @@
"Usage": "Usage",
"Usage: minikube completion SHELL": "",
"Usage: minikube delete": "",
"Usage: minikube delete --all --purge": "",
"Use \"{{.CommandPath}} [command] --help\" for more information about a command.": "",
"Use 'kubect get po -A' to find the correct and namespace name": "",
"Use -A to specify all namespaces": "",
"Use VirtualBox to remove the conflicting VM and/or network interfaces": "",
"Use native Golang SSH client (default true). Set to 'false' to use the command line 'ssh' command when accessing the docker machine. Useful for the machine drivers when they will not start with 'Waiting for SSH'.": "",
"User ID: {{.userID}}": "",
"Userspace file server is shutdown": "",
"Userspace file server:": "",
"Using image repository {{.name}}": "Utilisation du dépôt d'images {{.name}}…",
"Using the '{{.runtime}}' runtime with the 'none' driver is an untested configuration!": "",
"Using the running {{.driver_name}} \"{{.profile_name}}\" VM ...": "",
"VM driver is one of: %v": "Le pilote de la VM appartient à : %v",
"VM is unable to access {{.repository}}, you may need to configure a proxy or set --image-repository": "",
"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 ...": "",
@ -435,12 +493,13 @@
"VirtualBox cannot create a network, probably because it conflicts with an existing network that minikube no longer knows about. Try running 'minikube delete'": "",
"VirtualBox is broken. Disable real-time anti-virus software, reboot, and reinstall VirtualBox if the problem continues.": "",
"VirtualBox is broken. Reinstall VirtualBox, reboot, and run 'minikube delete'.": "",
"VirtualBox is unable to find its network interface. Try upgrading to the latest release and rebooting.": "",
"Virtualization support is disabled on your computer. If you are running minikube within a VM, try '--vm-driver=none'. Otherwise, consult your systems BIOS manual for how to enable virtualization.": "",
"Wait failed": "",
"Wait failed: {{.error}}": "",
"Wait until Kubernetes core services are healthy before exiting": "Avant de quitter, veuillez patienter jusqu'à ce que les principaux services Kubernetes soient opérationnels.",
"Wait until Kubernetes core services are healthy before exiting.": "",
"Waiting for SSH access ...": "En attente de l'accès SSH...",
"Waiting for the host to be provisioned ...": "",
"Waiting for cluster to come online ...": "",
"Waiting for:": "En attente de :",
"Where to root the NFS Shares, defaults to /nfsshares (hyperkit driver only)": "Emplacement permettant d'accéder aux partages NFS en mode root, la valeur par défaut affichant /nfsshares (pilote hyperkit uniquement).",
"You appear to be using a proxy, but your NO_PROXY environment does not include the minikube IP ({{.ip_address}}). Please see {{.documentation_url}} for more details": "Il semble que vous utilisiez un proxy, mais votre environment NO_PROXY n'inclut pas l'adresse IP ({{.ip_address}}) de minikube. Consultez la documentation à l'adresse {{.documentation_url}} pour en savoir plus.",
@ -454,50 +513,62 @@
"Your minikube vm is not running, try minikube start.": "",
"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\"": "",
"addons modifies minikube addons files using subcommands like \"minikube addons enable dashboard\"": "",
"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": "",
"dry-run mode. Validates configuration, but does not mutate system state": "",
"dry-run validation complete!": "",
"enable failed": "",
"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}}": "",
"if true, will embed the certs in kubeconfig.": "",
"kubeadm detected a TCP port conflict with another process: probably another local Kubernetes installation. Run lsof -p\u003cport\u003e to find the process and kill it": "",
"kubectl and minikube configuration will be stored in {{.home_folder}}": "Les configurations kubectl et minikube seront stockées dans le dossier {{.home_folder}}.",
"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": "",
"max time to wait per Kubernetes core services to be healthy.": "",
"minikube is not running, so the service cannot be accessed": "",
"minikube addons list --output OUTPUT. json, list": "",
"minikube is exiting due to an error. If the above message is not useful, open an issue:": "",
"minikube is unable to access the Google Container Registry. You may need to configure it to use a HTTP proxy.": "",
"minikube is unable to connect to the VM: {{.error}}\n\nThis is likely due to one of two reasons:\n\n- VPN or firewall interference\n- {{.hypervisor}} network configuration issue\n\nSuggested workarounds:\n\n- Disable your local VPN or firewall software\n- Configure your local VPN or firewall to allow access to {{.ip}}\n- Restart or reinstall {{.hypervisor}}\n- Use an alternative --vm-driver": "",
"minikube profile was successfully set to {{.profile_name}}": "",
"minikube status --output OUTPUT. json, text": "",
"minikube {{.version}} is available! Download it: {{.url}}": "",
"mkcmp is used to compare performance of two minikube binaries": "",
"mount argument \"{{.value}}\" must be in form: \u003csource directory\u003e:\u003ctarget directory\u003e": "",
"mount failed": "",
"namespaces to pause": "",
"namespaces to unpause": "",
"not enough arguments ({{.ArgCount}}).\\nusage: minikube config set PROPERTY_NAME PROPERTY_VALUE": "",
"pause containers": "",
"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`": "",
"reload cached images.": "",
"reloads images previously added using the 'cache add' subcommand": "",
"service {{.namespace_name}}/{{.service_name}} has no node port": "",
"stat failed": "",
"status json failure": "",
"status text failure": "",
"toom any arguments ({{.ArgCount}}).\\nusage: minikube config set PROPERTY_NAME PROPERTY_VALUE": "",
"tunnel creates a route to services deployed with type LoadBalancer and sets their Ingress to their ClusterIP": "",
"tunnel creates a route to services deployed with type LoadBalancer and sets their Ingress to their ClusterIP. for a detailed example see https://minikube.sigs.k8s.io/docs/tasks/loadbalancer": "",
"tunnel makes services of type LoadBalancer accessible on localhost": "",
"unable to bind flags": "",
"unable to delete minikube config folder": "",
"unable to set logtostderr": "",
"unpause Kubernetes": "",
"unset failed": "",
"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}}": "",
"unsupported or missing driver: {{.name}}": "",
"update config": "",
"usage: minikube addons configure ADDON_NAME": "",
"usage: minikube addons disable ADDON_NAME": "",
@ -509,14 +580,16 @@
"usage: minikube delete --all": "",
"usage: minikube profile [MINIKUBE_PROFILE_NAME]": "",
"zsh completion failed": "",
"{{.addonName}} was successfully enabled": "",
"{{.driver}} does not appear to be installed": "",
"{{.driver}} does not appear to be installed, but is specified by an existing profile. Please run 'minikube delete' or install {{.driver}}": "",
"{{.extra_option_component_name}}.{{.key}}={{.value}}": "",
"{{.machine}} IP has been updated to point at {{.ip}}": "",
"{{.machine}} IP was already correctly configured for {{.ip}}": "",
"{{.name}} cluster does not exist": "",
"{{.name}} has no available configuration options": "",
"{{.name}} was successfully configured": "",
"{{.path}} is version {{.client_version}}, and is incompatible with Kubernetes {{.cluster_version}}. You will need to update {{.path}} or use 'minikube kubectl' to connect with this cluster": "",
"{{.prefix}}minikube {{.version}} on {{.platform}}": "{{.prefix}}minikube {{.version}} sur {{.platform}}",
"{{.type}} is not yet a supported filesystem. We will try anyways!": "",
"{{.url}} is not accessible: {{.error}}": ""
}
}

View File

@ -1,7 +1,9 @@
{
"\"The '{{.minikube_addon}}' addon is disabled": "",
"\"{{.minikube_addon}}\" was successfully disabled": "「{{.minikube_addon}}」が無効化されました",
"\"{{.name}}\" cluster does not exist. Proceeding ahead with cleanup.": "「{{.name}}」というクラスターは存在しません。クリーンアップ処理を続行します。",
"\"{{.name}}\" profile does not exist": "「{{.name}}」というプロファイルは存在しません",
"\"{{.name}}\" profile does not exist, trying anyways.": "",
"\"{{.profile_name}}\" VM does not exist, nothing to stop": "「{{.profile_name}}」というVMは存在しません。停止すべき対象がありません",
"\"{{.profile_name}}\" host does not exist, unable to show an IP": "「{{.profile_name}}」というホストは存在しません。IPを表示できません",
"\"{{.profile_name}}\" stopped.": "「{{.profile_name}}」が停止しました。",
@ -35,8 +37,8 @@
"Amount of time to wait for a service in seconds": "",
"Amount of time to wait for service in seconds": "",
"Another hypervisor, such as VirtualBox, is conflicting with KVM. Please stop the other hypervisor, or use --vm-driver to switch to it.": "",
"Automatically selected the {{.experimental}} '{{.driver}}' driver": "",
"Automatically selected the {{.experimental}} '{{.driver}}' driver (alternates: {{.alternates}})": "",
"Automatically selected the {{.experimental}}'{{.driver}}' driver": "",
"Automatically selected the {{.experimental}}'{{.driver}}' driver (alternates: {{.alternates}})": "",
"Available Commands": "",
"Basic Commands:": "",
"Block until the apiserver is servicing API requests": "",
@ -104,6 +106,8 @@
"Enable the default CNI plugin (/etc/cni/net.d/k8s.conf). Used in conjunction with \\\"--network-plugin=cni\\": "デフォルトの CNI プラグイン(/etc/cni/net.d/k8s.confを有効にします。\\\"--network-plugin=cni\\\" と組み合わせて使用されます。",
"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 '{{.name}}' returned an error: {{.error}}": "",
"Enabling addons: {{.addons}}": "",
"Enabling dashboard ...": "",
"Ensure that CRI-O is installed and healthy: Run 'sudo systemctl start crio' and 'journalctl -u crio'. Alternatively, use --container-runtime=docker": "",
"Ensure that Docker is installed and healthy: Run 'sudo systemctl start docker' and 'journalctl -u docker'. Alternatively, select another value for --vm-driver": "",
@ -111,17 +115,12 @@
"Ensure that your value for HTTPS_PROXY points to an HTTPS proxy rather than an HTTP proxy": "",
"Environment variables to pass to the Docker daemon. (format: key=value)": "Docker デーモンに渡す環境変数(形式: Key=Value",
"Error checking driver version: {{.error}}": "ドライバのバージョンの確認中にエラーが発生しました。{{.error}}",
"Error converting status to json": "",
"Error creating minikube directory": "",
"Error creating status template": "",
"Error creating view template": "",
"Error executing status template": "",
"Error executing template": "",
"Error executing view template": "",
"Error finding port for mount": "",
"Error getting IP": "",
"Error getting addons status": "",
"Error getting bootstrapper": "",
"Error getting client": "",
"Error getting client: {{.error}}": "",
"Error getting cluster": "",
@ -215,6 +214,8 @@
"Hyperkit is broken. Upgrade to the latest hyperkit version and/or Docker for Desktop. Alternatively, you may choose an alternate --vm-driver": "",
"Hyperkit networking is broken. Upgrade to the latest hyperkit version and/or Docker for Desktop. Alternatively, you may choose an alternate --vm-driver": "",
"If set, automatically updates drivers to the latest version. Defaults to true.": "",
"If set, pause all namespaces": "",
"If set, unpause all namespaces": "",
"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.": "true の場合、現在のブートストラッパの Docker イメージをキャッシュに保存して、マシンに読み込みます。--vm-driver=none の場合は常に false です。",
"If true, only download and cache files for later use - don't install or start anything.": "true の場合、後で使用できるようにファイルのダウンロードとキャッシュ保存だけが行われます。インストールも起動も行われません。",
@ -259,6 +260,7 @@
"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`.": "",
"Node may be unable to resolve external DNS records": "",
"None of the known repositories in your location are accessible. Using {{.image_repository_name}} as fallback.": "使用しているロケーション内で既知のいずれのリポジトリにもアクセスできません。フォールバックとして {{.image_repository_name}} を使用します。",
"None of the known repositories is accessible. Consider specifying an alternative image repository with --image-repository flag": "既知のいずれのリポジトリにもアクセスできません。--image-repository フラグとともに代替のイメージ リポジトリを指定することを検討してください。",
"Not passing {{.name}}={{.value}} to docker env.": "",
@ -275,6 +277,9 @@
"Options: {{.options}}": "",
"Outputs minikube shell completion for the given shell (bash or zsh)": "",
"Outputs 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": "",
"Pause": "",
"Paused kubelet and {{.count}} containers": "",
"Paused kubelet and {{.count}} containers in: {{.namespaces}}": "",
"Permissions: {{.octalMode}} ({{.writtenMode}})": "",
"Please enter a value:": "",
"Please install the minikube hyperkit VM driver, or select an alternative --vm-driver": "",
@ -297,11 +302,13 @@
"Reboot to complete VirtualBox installation, verify that VirtualBox is not blocked by your system, and/or use another hypervisor": "",
"Rebuild libvirt with virt-network support": "",
"Received {{.name}} signal": "",
"Reconfiguring existing host ...": "",
"Registry mirrors to pass to the Docker daemon": "Docker デーモンに渡すレジストリ ミラー",
"Reinstall VirtualBox and reboot. Alternatively, try the kvm2 driver: https://minikube.sigs.k8s.io/docs/reference/drivers/kvm2/": "",
"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 using {{.bootstrapper}} ...": "{{.bootstrapper}} を使用して Kubernetes を再起動しています...",
"Removed all traces of the \"{{.name}}\" cluster.": "",
"Removing {{.directory}} ...": "{{.directory}} を削除しています...",
"Requested cpu count {{.requested_cpus}} is less than the minimum allowed of {{.minimum_cpus}}": "",
"Requested disk size {{.requested_size}} is less than minimum of {{.minimum_size}}": "リクエストされたディスクサイズ {{.requested_size}} が最小値 {{.minimum_size}} 未満です",
@ -321,8 +328,8 @@
"Run the minikube command as an Administrator": "",
"Run: 'chmod 600 $HOME/.kube/config'": "",
"Running on localhost (CPUs={{.number_of_cpus}}, Memory={{.memory_size}}MB, Disk={{.disk_size}}MB) ...": "",
"Selecting {{.experimental}} '{{.driver}}' driver from existing profile (alternates: {{.alternates}})": "",
"Selecting {{.experimental}} '{{.driver}}' driver from user configuration (alternates: {{.alternates}})": "",
"Selecting {{.experimental}}'{{.driver}}' driver from existing profile (alternates: {{.alternates}})": "",
"Selecting {{.experimental}}'{{.driver}}' driver from user configuration (alternates: {{.alternates}})": "",
"Set failed": "",
"Set flag to delete all profiles": "",
"Set this flag to delete the '.minikube' folder from your user directory.": "",
@ -352,7 +359,6 @@
"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 deleted all profiles": "",
"Successfully deleted profile \\\"{{.name}}\\\"": "",
"Successfully mounted {{.sourcePath}} to {{.destinationPath}}": "",
"Successfully powered off Hyper-V. minikube driver -- {{.driver}}": "",
"Successfully purged minikube directory located at - [{{.minikubeDirectory}}]": "",
@ -368,6 +374,7 @@
"The 'none' driver does not respect the --memory flag": "",
"The 'none' driver does not support multiple profiles: https://minikube.sigs.k8s.io/docs/reference/drivers/none/": "",
"The 'none' driver provides limited isolation and may reduce system security and reliability.": "ドライバに「none」を指定すると、分離が制限され、システムのセキュリティと信頼性が低下する可能性があります。",
"The '{{.addonName}}' addon is enabled": "",
"The '{{.driver}}' driver requires elevated permissions. The following commands will be executed:\\n\\n{{ .example }}\\n": "",
"The CIDR to be used for service cluster IPs.": "サービス クラスタ IP に使用される CIDR。",
"The CIDR to be used for the minikube VM (virtualbox driver only)": "minikube VM に使用される CIDRvirtualbox ドライバのみ)",
@ -418,7 +425,6 @@
"This will start the mount daemon and automatically mount files into minikube": "これによりマウント デーモンが起動し、ファイルが minikube に自動的にマウントされます",
"This will start the mount daemon and automatically mount files into minikube.": "",
"Tip: To remove this root owned cluster, run: sudo {{.cmd}} delete": "ヒント: この root 所有のクラスタを削除するには、「sudo {{.cmd}} delete」を実行します",
"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}}": "このクラスタに接続するには、「kubectl --context={{.name}}」を使用します",
"To connect to this cluster, use: kubectl --context={{.name}}__1": "このクラスタに接続するには、「kubectl --context={{.name}}」を使用します",
"To connect to this cluster, use: kubectl --context={{.profile_name}}": "",
@ -436,6 +442,7 @@
"Unable to generate docs": "",
"Unable to generate the documentation. Please ensure that the path specified is a directory, exists \u0026 you have permission to write to it.": "",
"Unable to get VM IP address": "",
"Unable to get addon status for {{.name}}: {{.error}}": "",
"Unable to get bootstrapper: {{.error}}": "ブートストラッパを取得できません。{{.error}}",
"Unable to get current user": "",
"Unable to get runtime": "",
@ -455,6 +462,8 @@
"Unable to verify SSH connectivity: {{.error}}. Will retry...": "",
"Uninstalling Kubernetes {{.kubernetes_version}} using {{.bootstrapper_name}} ...": "{{.bootstrapper_name}} を使用して Kubernetes {{.kubernetes_version}} をアンインストールしています...",
"Unmounting {{.path}} ...": "",
"Unpaused kubelet and {{.count}} containers": "",
"Unpaused kubelet and {{.count}} containers in: {{.namespaces}}": "",
"Unset the KUBECONFIG environment variable, or verify that it does not point to an empty or otherwise invalid path": "",
"Unset variables instead of setting them": "",
"Update server returned an empty list": "",
@ -466,6 +475,7 @@
"Usage: minikube delete --all --purge": "",
"Use \"{{.CommandPath}} [command] --help\" for more information about a command.": "",
"Use 'kubect get po -A' to find the correct and namespace name": "",
"Use -A to specify all namespaces": "",
"Use VirtualBox to remove the conflicting VM and/or network interfaces": "",
"Use native Golang SSH client (default true). Set to 'false' to use the command line 'ssh' command when accessing the docker machine. Useful for the machine drivers when they will not start with 'Waiting for SSH'.": "",
"User ID: {{.userID}}": "",
@ -476,7 +486,6 @@
"Using the running {{.driver_name}} \"{{.profile_name}}\" VM ...": "",
"VM driver is one of: %v": "VM ドライバは次のいずれかです。%v",
"VM is unable to access {{.repository}}, you may need to configure a proxy or set --image-repository": "",
"VM may be unable to resolve external DNS records": "",
"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 ...": "",
@ -492,8 +501,6 @@
"Wait failed: {{.error}}": "",
"Wait until Kubernetes core services are healthy before exiting": "Kubernetes コアサービスが正常になるまで待機してから終了してください",
"Waiting for cluster to come online ...": "",
"Waiting for the host to be provisioned ...": "",
"Warning: Your kubectl is pointing to stale minikube-vm.\\nTo fix the kubectl context, run `minikube update-context`": "",
"Where to root the NFS Shares, defaults to /nfsshares (hyperkit driver only)": "NFS 共有のルートに指定する場所。デフォルトは /nfsshareshyperkit ドライバのみ)",
"You appear to be using a proxy, but your NO_PROXY environment does not include the minikube IP ({{.ip_address}}). Please see {{.documentation_url}} for more details": "プロキシを使用しようとしていますが、現在の NO_PROXY 環境に minikube IP{{.ip_address}})は含まれていません。詳細については、{{.documentation_url}} をご覧ください",
"You can delete them using the following command(s):": "",
@ -506,7 +513,6 @@
"Your minikube vm is not running, try minikube start.": "",
"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 enable failed": "",
"addons modifies minikube addons files using subcommands like \"minikube addons enable dashboard\"": "",
"api load": "",
"bash completion failed": "",
@ -516,7 +522,7 @@
"config view failed": "",
"dashboard service is not running: {{.error}}": "",
"disable failed": "",
"dry-run mode. Validates configuration, but does does not mutate system state": "",
"dry-run mode. Validates configuration, but does not mutate system state": "",
"dry-run validation complete!": "",
"enable failed": "",
"error creating clientset": "",
@ -541,18 +547,24 @@
"mkcmp is used to compare performance of two minikube binaries": "",
"mount argument \"{{.value}}\" must be in form: \u003csource directory\u003e:\u003ctarget directory\u003e": "",
"mount failed": "",
"namespaces to pause": "",
"namespaces to unpause": "",
"not enough arguments ({{.ArgCount}}).\\nusage: minikube config set PROPERTY_NAME PROPERTY_VALUE": "",
"pause containers": "",
"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`": "",
"reload cached images.": "",
"reloads images previously added using the 'cache add' subcommand": "",
"service {{.namespace_name}}/{{.service_name}} has no node port": "",
"stat failed": "",
"status json failure": "",
"status text failure": "",
"toom any arguments ({{.ArgCount}}).\\nusage: minikube config set PROPERTY_NAME PROPERTY_VALUE": "",
"tunnel creates a route to services deployed with type LoadBalancer and sets their Ingress to their ClusterIP. for a detailed example see https://minikube.sigs.k8s.io/docs/tasks/loadbalancer": "",
"tunnel makes services of type LoadBalancer accessible on localhost": "",
"unable to bind flags": "",
"unable to delete minikube config folder": "",
"unable to set logtostderr": "",
"unpause Kubernetes": "",
"unset failed": "",
"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": "",
@ -568,7 +580,6 @@
"usage: minikube delete --all": "",
"usage: minikube profile [MINIKUBE_PROFILE_NAME]": "",
"zsh completion failed": "",
"{{.addonName}} was successfully enabled": "",
"{{.driver}} does not appear to be installed": "",
"{{.driver}} does not appear to be installed, but is specified by an existing profile. Please run 'minikube delete' or install {{.driver}}": "",
"{{.extra_option_component_name}}.{{.key}}={{.value}}": "",

View File

@ -1,22 +1,22 @@
{
"\"The '{{.minikube_addon}}' addon is disabled": "",
"\"{{.minikube_addon}}\" was successfully disabled": "\"{{.minikube_addon}}\" został wyłaczony",
"\"{{.name}}\" cluster does not exist. Proceeding ahead with cleanup.": "",
"\"{{.name}}\" profile does not exist": "Profil \"{{.name}}\" nie istnieje",
"\"{{.name}}\" profile does not exist, trying anyways.": "",
"\"{{.profile_name}}\" VM does not exist, nothing to stop": "Maszyna wirtualna \"{{.profile_name}}\" nie istnieje. Nie można zatrzymać",
"\"{{.profile_name}}\" host does not exist, unable to show an IP": "Profil \"{{.profile_name}}\" nie istnieje. Nie można wyświetlić adresu IP ",
"\"{{.profile_name}}\" stopped.": "Zatrzymano \"{{.profile_name}}\"",
"'none' driver does not support 'minikube docker-env' command": "sterownik 'none' nie wspiera komendy 'minikube docker-env'",
"'none' driver does not support 'minikube mount' command": "sterownik 'none' nie wspiera komendy 'minikube mount'",
"'none' driver does not support 'minikube ssh' command": "sterownik 'none' nie wspiera komendy 'minikube ssh'",
"'{{.driver}}' driver reported an issue: {{.error}}": "",
"- {{.profile}}": "",
"A VPN or firewall is interfering with HTTP access to the minikube VM. Alternatively, try a different VM driver: https://minikube.sigs.k8s.io/docs/start/": "",
"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 blocking Docker 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 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 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 configuration that may be passed to different components.\nThe key should be '.' separated, and the first part before the dot is the component to apply the configuration to.\nValid components are: kubelet, kubeadm, apiserver, controller-manager, etcd, proxy, scheduler\nValid kubeadm parameters:": "",
"A set of key=value pairs that describe feature gates for alpha/experimental features.": "",
"Access the kubernetes dashboard running within the minikube cluster": "Dostęp do dashboardu uruchomionego w klastrze kubernetesa w minikube",
"Add an image to local cache.": "",
@ -32,22 +32,34 @@
"Amount of RAM allocated to the minikube VM (format: \u003cnumber\u003e[\u003cunit\u003e], where unit = b, k, m or g).": "Ilość zarezerwowanej pamieci RAM dla maszyny wirtualnej minikube (format: \u003cnumber\u003e[\u003cunit\u003e], where unit = b, k, m or )",
"Amount of time to wait for a service in seconds": "Czas oczekiwania na serwis w sekundach",
"Amount of time to wait for service in seconds": "Czas oczekiwania na servis w sekundach",
"Another hypervisor, such as VirtualBox, is conflicting with KVM. Please stop the other hypervisor, or use --vm-driver to switch to it.": "",
"Automatically selected the {{.experimental}}'{{.driver}}' driver": "",
"Automatically selected the {{.experimental}}'{{.driver}}' driver (alternates: {{.alternates}})": "",
"Available Commands": "Dostępne polecenia",
"Basic Commands:": "Podstawowe polecenia",
"Block until the apiserver is servicing API requests": "",
"Cannot find directory {{.path}} for mount": "Nie można odnoleść folderu {{.path}} do zamontowania",
"Cannot use both --output and --format options": "",
"Check output of 'journalctl -xeu kubelet', try passing --extra-config=kubelet.cgroup-driver=systemd to minikube start": "",
"Check that SELinux is disabled, and that the provided apiserver flags are valid": "",
"Check that minikube is running and that you have specified the correct namespace (-n flag) if required.": "Upewnij się że minikube zpstało uruchomione i że podano poprawną przestrzeń nazw(-n flag) celem zamontowania",
"Check that the provided apiserver flags are valid": "",
"Check that your --kubernetes-version has a leading 'v'. For example: 'v1.1.14'": "Upewnij się że --kubernetes-version ma 'v' z przodu. Na przykład `v1.1.14`",
"Check that your apiserver flags are valid, or run 'minikube delete'": "",
"Check your firewall rules for interference, and run 'virt-host-validate' to check for KVM configuration issues. If you are running minikube within a VM, consider using --vm-driver=none": "",
"Configuration and Management Commands:": "Polecenia konfiguracji i zarządzania",
"Configure a default route on this Linux host, or use another --vm-driver that does not require it": "",
"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}}": "Konfiguruje środowisko dla: Kubernetesa w wersji {{.k8sVersion}} na {{.runtime}} {{.runtimeVersion}}",
"Configuring local host environment ...": "Konfiguruje lokalne środowisko hosta",
"Confirm that you have a working internet connection and that your VM has not run out of resources by using: 'minikube logs'": "",
"Confirm that you have supplied the correct value to --hyperv-virtual-switch using the 'Get-VMSwitch' command": "",
"Could not get profile flag": "",
"Could not process error from failed deletion": "",
"Could not process errors from failed deletion": "",
"Country code of the image mirror to be used. Leave empty to use the global one. For Chinese mainland users, set it to cn.": "",
"Created a new profile : {{.profile_name}}": "Stworzono nowy profil : {{.profile_name}}",
"Creating Kubernetes in {{.driver_name}} container with (CPUs={{.number_of_cpus}}), Memory={{.memory_size}}MB ({{.host_memory_size}}MB available) ...": "",
"Creating a new profile failed": "Tworzenie nowego profilu nie powiodło się",
"Creating mount {{.name}} ...": "",
"Creating {{.driver_name}} VM (CPUs={{.number_of_cpus}}, Memory={{.memory_size}}MB, Disk={{.disk_size}}MB) ...": "Tworzenie {{.driver_name}} (CPUs={{.number_of_cpus}}, Pamięć={{.memory_size}}MB, Dysk={{.disk_size}}MB)...",
@ -62,7 +74,6 @@
"Disable dynamic memory in your VM manager, or pass in a larger --memory value": "",
"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)": "",
"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": "",
@ -82,26 +93,28 @@
"ERROR creating `registry-creds-ecr` secret: {{.error}}": "",
"ERROR creating `registry-creds-gcr` secret: {{.error}}": "",
"Either systemctl is not installed, or Docker is broken. Run 'sudo systemctl start docker' and 'journalctl -u docker'": "",
"Enable addons. see `minikube addons list` for a list of valid addon names.": "",
"Enable experimental NVIDIA GPU support in minikube": "aktywuj eksperymentalne wsparcie minikube dla NVIDIA GPU",
"Enable host resolver for NAT DNS requests (virtualbox driver only)": "",
"Enable istio needs {{.minMem}} MB of memory and {{.minCpus}} CPUs.": "",
"Enable proxy for NAT DNS requests (virtualbox driver only)": "",
"Enable the default CNI plugin (/etc/cni/net.d/k8s.conf). Used in conjunction with \\\"--network-plugin=cni\\": "",
"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 '{{.name}}' returned an error: {{.error}}": "",
"Enabling addons: {{.addons}}": "",
"Enabling dashboard ...": "",
"Ensure that CRI-O is installed and healthy: Run 'sudo systemctl start crio' and 'journalctl -u crio'. Alternatively, use --container-runtime=docker": "",
"Ensure that Docker is installed and healthy: Run 'sudo systemctl start docker' and 'journalctl -u docker'. Alternatively, select another value for --vm-driver": "",
"Ensure that the user listed in /etc/libvirt/qemu.conf has access to your home directory": "",
"Ensure that your value for HTTPS_PROXY points to an HTTPS proxy rather than an HTTP proxy": "",
"Environment variables to pass to the Docker daemon. (format: key=value)": "Zmienne środowiskowe do przekazania do demona docker (format: klucz-wartość)",
"Error checking driver version: {{.error}}": "Błąd podczas sprawdzania wersij sterownika : {{.error}}",
"Error creating list template": "",
"Error creating minikube directory": "",
"Error creating status template": "",
"Error creating view template": "",
"Error executing list template": "",
"Error executing status template": "",
"Error executing template": "",
"Error executing view template": "",
"Error finding port for mount": "",
"Error getting IP": "",
"Error getting bootstrapper": "",
"Error getting client": "",
"Error getting client: {{.error}}": "",
"Error getting cluster": "",
@ -110,7 +123,7 @@
"Error getting host": "",
"Error getting host status": "",
"Error getting machine logs": "",
"Error getting machine status": "",
"Error getting profiles to delete": "",
"Error getting service status": "",
"Error getting service with namespace: {{.namespace}} and labels {{.labelName}}:{{.addonName}}: {{.error}}": "",
"Error getting the host IP address to use from within the VM": "",
@ -119,7 +132,6 @@
"Error loading api": "",
"Error loading profile config": "",
"Error loading profile config: {{.error}}": "",
"Error loading profile {{.name}}: {{.error}}": "",
"Error opening service": "",
"Error parsing minikube version: {{.error}}": "Bład parsowania wersji minikube: {{.error}}",
"Error parsing vmDriver version: {{.error}}": "Błąd parsowania wersji vmDriver: {{.error}}",
@ -136,17 +148,16 @@
"Error: [{{.id}}] {{.error}}": "",
"Examples": "Przykłady",
"Exiting": "",
"Exiting due to driver incompatibility": "",
"Exiting.": "",
"Failed runtime": "",
"Failed to cache ISO": "",
"Failed to cache and load images": "",
"Failed to cache binaries": "",
"Failed to cache images": "",
"Failed to cache images to tar": "",
"Failed to change permissions for {{.minikube_dir_path}}: {{.error}}": "Nie udało się zmienić uprawnień pliku {{.minikube_dir_path}}: {{.error}}",
"Failed to check if machine exists": "",
"Failed to check main repository and mirrors for images for images": "",
"Failed to delete cluster: {{.error}}": "",
"Failed to delete cluster: {{.error}}__1": "",
"Failed to delete images": "",
"Failed to delete images from config": "",
"Failed to download kubectl": "Pobieranie kubectl nie powiodło się",
@ -160,9 +171,9 @@
"Failed to get service URL: {{.error}}": "",
"Failed to kill mount process: {{.error}}": "Zabicie procesu nie powiodło się: {{.error}}",
"Failed to list cached images": "",
"Failed to reload cached images": "",
"Failed to remove profile": "Usunięcie profilu nie powiodło się",
"Failed to save config": "Zapisywanie konfiguracji nie powiodło się",
"Failed to set NO_PROXY Env. Please use `export NO_PROXY=$NO_PROXY,{{.ip}}": "",
"Failed to set NO_PROXY Env. Please use `export NO_PROXY=$NO_PROXY,{{.ip}}`.": "",
"Failed to setup certs": "Konfiguracja certyfikatów nie powiodła się",
"Failed to setup kubeconfig": "Konfiguracja kubeconfig nie powiodła się",
@ -173,7 +184,6 @@
"Flags": "",
"Follow": "",
"For best results, install kubectl: https://kubernetes.io/docs/tasks/tools/install-kubectl/": "",
"For best results, install kubectl: https://kubernetes.io/docs/tasks/tools/install-kubectl/__1": "",
"For more information, see:": "",
"Force environment to be configured for a specified shell: [fish, cmd, powershell, tcsh, bash, zsh], default is auto-detect": "",
"Force minikube to perform possibly dangerous operations": "Wymuś wykonanie potencjalnie niebezpiecznych operacji",
@ -185,14 +195,19 @@
"Gets the status of a local kubernetes cluster": "Pobiera aktualny status klastra kubernetesa",
"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": "",
"Getting machine config failed": "",
"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?": "Czy napewno skonfigurowano libvirt w sposób prawidłowy?",
"Hide the hypervisor signature from the guest in minikube (kvm2 driver only)": "",
"Hyperkit is broken. Upgrade to the latest hyperkit version and/or Docker for Desktop. Alternatively, you may choose an alternate --vm-driver": "",
"Hyperkit networking is broken. Upgrade to the latest hyperkit version and/or Docker for Desktop. Alternatively, you may choose an alternate --vm-driver": "",
"If set, automatically updates drivers to the latest version. Defaults to true.": "",
"If set, pause all namespaces": "",
"If set, unpause all namespaces": "",
"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.": "",
@ -200,12 +215,12 @@
"If you are running minikube within a VM, consider using --vm-driver=none:": "",
"Images Commands:": "",
"Insecure Docker registries to pass to the Docker daemon. The default service CIDR range will automatically be added.": "",
"Insecure Docker registries to pass to the Docker daemon. The default service CIDR range will automatically be added.": "",
"Install VirtualBox, or select an alternative value for --vm-driver": "",
"Install the latest hyperkit binary, and run 'minikube delete'": "",
"Invalid size passed in argument: {{.error}}": "Nieprawidłowy rozmiar przekazany w argumencie: {{.error}}",
"IsEnabled failed": "",
"Kill the mount process spawned by minikube start": "",
"Kubernetes {{.new}} is now available. If you would like to upgrade, specify: --kubernetes-version={{.new}}": "",
"Kubernetes {{.version}} is not supported by this release of minikube": "",
"Launching Kubernetes ...": "Uruchamianie Kubernetesa...",
"Launching proxy ...": "",
@ -230,9 +245,13 @@
"Mounting host path {{.sourcePath}} into VM as {{.destinationPath}} ...": "",
"Mounts the specified directory into minikube": "Montuje podany katalog wewnątrz minikube",
"Mounts the specified directory into minikube.": "Montuje podany katalog wewnątrz minikube",
"Multiple errors deleting profiles": "",
"Multiple minikube profiles were found -": "",
"NIC Type used for host only network. One of Am79C970A, Am79C973, 82540EM, 82543GC, 82545EM, or virtio (virtualbox driver only)": "",
"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`.": "",
"Node may be unable to resolve external DNS records": "",
"None of the known repositories in your location are accessible. Using {{.image_repository_name}} as fallback.": "",
"None of the known repositories is accessible. Consider specifying an alternative image repository with --image-repository flag": "",
"Not passing {{.name}}={{.value}} to docker env.": "",
@ -243,11 +262,15 @@
"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 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)": "Zwraca autouzupełnianie poleceń minikube dla powłoki system(bash, zsh)",
"Outputs 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": "",
"Pause": "",
"Paused kubelet and {{.count}} containers": "",
"Paused kubelet and {{.count}} containers in: {{.namespaces}}": "",
"Permissions: {{.octalMode}} ({{.writtenMode}})": "",
"Please enter a value:": "Wprowadź wartość",
"Please install the minikube hyperkit VM driver, or select an alternative --vm-driver": "",
@ -264,22 +287,24 @@
"Problems detected in {{.entry}}:": "Wykryto problem w {{.name}}",
"Problems detected in {{.name}}:": "Wykryto problem w {{.name}}",
"Profile gets or sets the current minikube profile": "Pobiera lub ustawia aktywny profil minikube",
"Profile name \"{{.profilename}}\" is minikube keyword. To delete profile use command minikube delete -p \u003cprofile name\u003e": "",
"Provide VM UUID to restore MAC address (hyperkit driver only)": "",
"Pulling images ...": "",
"Reboot to complete VirtualBox installation, and verify that VirtualBox is not blocked by your system": "Uruchom ponownie komputer aby zakończyć instalacje VirtualBox'a i upewnij się że nie jest on blokowany przez twój system",
"Reboot to complete VirtualBox installation, verify that VirtualBox is not blocked by your system, and/or use another hypervisor": "",
"Rebuild libvirt with virt-network support": "",
"Received {{.name}} signal": "",
"Reconfiguring existing host ...": "",
"Registry mirrors to pass to the Docker daemon": "",
"Reinstall VirtualBox and reboot. Alternatively, try the kvm2 driver: https://minikube.sigs.k8s.io/docs/reference/drivers/kvm2/": "",
"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:": "Powiązane problemy",
"Relaunching Kubernetes using {{.bootstrapper}} ...": "",
"Removed all traces of the \"{{.name}}\" cluster.": "",
"Removing {{.directory}} ...": "",
"Requested cpu count {{.requested_cpus}} is less than the minimum allowed of {{.minimum_cpus}}": "",
"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 {{.requested_size}} is less than the minimum allowed of {{.minimum_size}}": "",
"Retriable failure: {{.error}}": "",
"Retrieve the ssh identity key path of the specified cluster": "Pozyskuje ścieżkę do klucza ssh dla wyspecyfikowanego klastra",
"Retrieve the ssh identity key path of the specified cluster.": "Pozyskuje ścieżkę do klucza ssh dla wyspecyfikowanego klastra.",
"Retrieves the IP address of the running cluster": "Pobiera adres IP aktualnie uruchomionego klastra",
@ -287,22 +312,27 @@
"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 'kubectl describe pod coredns -n kube-system' and check for a firewall or DNS conflict": "",
"Run 'minikube delete' to delete the stale VM": "",
"Run 'minikube delete' to delete the stale VM, or and ensure that minikube is running as the same user you are issuing this command with": "",
"Run kubectl": "Uruchamia kubectl",
"Run minikube from the C: drive.": "",
"Run the kubernetes client, download it if necessary. Remember -- after kubectl!\n\nExamples:\nminikube kubectl -- --help\nminikube kubectl -- get pods --namespace kube-system": "",
"Run the minikube command as an Administrator": "",
"Run: 'chmod 600 $HOME/.kube/config'": "",
"Running on localhost (CPUs={{.number_of_cpus}}, Memory={{.memory_size}}MB, Disk={{.disk_size}}MB) ...": "",
"Selecting {{.experimental}}'{{.driver}}' driver from existing profile (alternates: {{.alternates}})": "",
"Selecting {{.experimental}}'{{.driver}}' driver from user configuration (alternates: {{.alternates}})": "",
"Set failed": "",
"Set flag to delete all profiles": "",
"Set this flag to delete the '.minikube' folder from your user directory.": "",
"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)'": "Ustawia zmienne środowiskowe dockera. Podobne do `(docker-machine env)`",
"Sets up docker env variables; similar to '$(docker-machine env)'.": "Ustawia zmienne środowiskowe dockera. Podobne do `(docker-machine env)`",
"Setting profile failed": "Ustawianie profilu nie powiodło się",
"Show a list of global command-line options (applies to all commands).": "",
"Show only log entries which point to known problems": "Pokaż logi które wskazują na znane problemy",
"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 was set.": "Zignorowano zmianę kontekstu kubectl ponieważ --keep-context zostało przekazane",
"Sorry that minikube crashed. If this was unexpected, we would love to hear from you:": "",
"Sorry, Kubernetes {{.version}} is not supported by this release of minikube": "",
"Sorry, completion support is not yet implemented for {{.name}}": "",
"Sorry, the kubeadm.{{.parameter_name}} parameter is currently not supported by --extra-config": "",
@ -319,15 +349,22 @@
"Stopping \"{{.profile_name}}\" in {{.driver_name}} ...": "Zatrzymywanie \"{{.profile_name}}\" - {{.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": "Zatrzymuje lokalny klaster kubernetesa",
"Successfully deleted all profiles": "",
"Successfully mounted {{.sourcePath}} to {{.destinationPath}}": "Pomyślnie zamontowano {{.sourcePath}} do {{.destinationPath}}",
"Successfully powered off Hyper-V. minikube driver -- {{.driver}}": "",
"Successfully purged minikube directory located at - [{{.minikubeDirectory}}]": "",
"Suggestion: {{.advice}}": "Sugestia: {{.advice}}",
"Suggestion: {{.fix}}": "",
"Target directory {{.path}} must be an absolute path": "",
"The \"{{.cluster_name}}\" cluster has been deleted.": "Klaster \"{{.cluster_name}}\" został usunięty",
"The \"{{.driver_name}}\" driver requires root privileges. Please run minikube using 'sudo minikube --vm-driver={{.driver_name}}'.": "Sterownik \"{{.driver_name}}\" wymaga uprawnień root'a. Użyj 'sudo minikube --vm-driver={{.driver_name}}'",
"The \"{{.driver_name}}\" driver should not be used with root privileges.": "",
"The \"{{.name}}\" cluster has been deleted.": "Klaster \"{{.name}}\" został usunięty",
"The 'none' driver does not respect the --cpus flag": "",
"The 'none' driver does not respect the --memory flag": "",
"The 'none' driver does not support multiple profiles: https://minikube.sigs.k8s.io/docs/reference/drivers/none/": "",
"The 'none' driver provides limited isolation and may reduce system security and reliability.": "",
"The '{{.addonName}}' addon is enabled": "",
"The '{{.driver}}' driver requires elevated permissions. The following commands will be executed:\\n\\n{{ .example }}\\n": "",
"The CIDR to be used for service cluster IPs.": "",
"The CIDR to be used for the minikube VM (virtualbox driver only)": "",
@ -339,25 +376,26 @@
"The VM that minikube is configured for no longer exists. Run 'minikube delete'": "",
"The apiserver listening port": "API nasłuchuje na porcie:",
"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 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 argument to pass the minikube mount command on start.": "",
"The cluster dns domain name used in the kubernetes cluster": "Domena dns clastra użyta przez kubernetesa",
"The container runtime to be used (docker, crio, containerd)": "Runtime konteneryzacji (docker, crio, containerd).",
"The container runtime to be used (docker, crio, containerd).": "",
"The cri socket path to be used": "",
"The cri socket path to be used.": "",
"The docker host is currently not running": "",
"The docker service is currently not active": "Serwis docker jest nieaktywny",
"The driver '{{.driver}}' is not supported on {{.os}}": "Sterownik '{{.driver}} jest niewspierany przez system {{.os}}",
"The driver {{.experimental}} '{{.driver}}' is not supported on {{.os}}": "",
"The existing \"{{.profile_name}}\" VM that was created using the \"{{.old_driver}}\" driver, and is incompatible with the \"{{.driver}}\" driver.": "",
"The hyperv virtual switch name. Defaults to first found. (hyperv driver only)": "",
"The hypervisor does not appear to be configured properly. Run 'minikube start --alsologtostderr -v=1' and inspect the error code": "",
"The initial time interval for each check that wait performs in seconds": "",
"The kubernetes version that the minikube VM will use (ex: v1.2.3)": "Wersja kubernetesa która zostanie użyta przez wirtualną maszyna minikube (np. v1.2.3)",
"The machine-driver specified is failing to start. Try running 'docker-machine-driver-\u003ctype\u003e version'": "",
"The minikube VM is offline. Please run 'minikube start' to start it again.": "",
"The name of the network plugin": "Nazwa pluginu sieciowego",
"The name of the network plugin.": "Nazwa pluginu sieciowego",
"The number of bytes to use for 9p packet payload": "",
"The output format. One of 'json', 'table'": "",
"The path on the file system where the docs in markdown need to be saved": "",
"The service namespace": "",
"The services namespace": "",
@ -366,64 +404,72 @@
"The value passed to --format is invalid: {{.error}}": "Wartość przekazana do --format jest nieprawidłowa: {{.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://minikube.sigs.k8s.io/docs/reference/drivers/vmware/ for more information.\n\t\t\tTo disable this message, run [minikube config set ShowDriverDeprecationNotification false]": "",
"The {{.driver_name}} driver should not be used with root privileges.": "{{.driver_name}} nie powinien byc używany z przywilejami root'a.",
"There appears to be another hypervisor conflicting with KVM. Please stop the other hypervisor, or use --vm-driver to switch to it.": "",
"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": "",
"This will start the mount daemon and automatically mount files into minikube.": "",
"Tip: To remove this root owned cluster, run: sudo {{.cmd}} delete": "",
"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}}": "Aby połączyć się z klastrem użyj: kubectl --context={{.name}}",
"To connect to this cluster, use: kubectl --context={{.profile_name}}": "Aby połaczyć się z klastem uzyj: kubectl --context={{.profile_name}}",
"To disable this notice, run: 'minikube config set WantUpdateNotification false'": "Aby wyłączyć te notyfikację, użyj: 'minikube config set WantUpdateNotification false'",
"To disable this notice, run: 'minikube config set WantUpdateNotification false'\\n": "",
"To proceed, either:\n 1) Delete the existing VM using: '{{.command}} delete'\n or\n 2) Restart with the existing driver: '{{.command}} start --vm-driver={{.old_driver}}'": "",
"To proceed, either:\n\n 1) Delete the existing \"{{.profile_name}}\" cluster using: '{{.command}} delete'\n\n * or *\n\n 2) Start the existing \"{{.profile_name}}\" cluster using: '{{.command}} start --vm-driver={{.old_driver}}'": "",
"To see addons list for other profiles use: `minikube addons -p name list`": "",
"To start minikube with HyperV Powershell must be in your PATH`": "Aby uruchomić minikube z HyperV Powershell musi znajdować się w zmiennej PATH",
"To use kubectl or minikube commands as your own user, you may need to relocate them. For example, to overwrite your own settings, run:": "",
"Troubleshooting Commands:": "",
"Trying to delete invalid profile {{.profile}}": "",
"Unable to bind flags": "",
"Unable to determine a default driver to use. Try specifying --vm-driver, or see https://minikube.sigs.k8s.io/docs/start/": "",
"Unable to enable dashboard": "",
"Unable to fetch latest version info": "",
"Unable to generate docs": "",
"Unable to generate the documentation. Please ensure that the path specified is a directory, exists \u0026 you have permission to write to it.": "",
"Unable to get VM IP address": "",
"Unable to get bootstrapper: {{.error}}": "",
"Unable to get addon status for {{.name}}: {{.error}}": "",
"Unable to get current user": "",
"Unable to get runtime": "",
"Unable to get the status of the cluster.": "",
"Unable to get the status of the {{.name}} cluster.": "",
"Unable to kill mount process: {{.error}}": "",
"Unable to load cached images from config file.": "",
"Unable to load cached images: {{.error}}": "",
"Unable to load config: {{.error}}": "",
"Unable to parse \"{{.kubernetes_version}}\": {{.error}}": "",
"Unable to parse default Kubernetes version from constants: {{.error}}": "",
"Unable to parse oldest Kubernetes version from constants: {{.error}}": "",
"Unable to pull images, which may be OK: {{.error}}": "",
"Unable to remove machine directory: %v": "",
"Unable to start VM": "Nie można uruchomić maszyny wirtualnej",
"Unable to start VM. Please investigate and run 'minikube delete' if possible": "",
"Unable to stop VM": "Nie można zatrzymać maszyny wirtualnej",
"Unable to update {{.driver}} driver: {{.error}}": "",
"Unable to verify SSH connectivity: {{.error}}. Will retry...": "",
"Uninstalling Kubernetes {{.kubernetes_version}} using {{.bootstrapper_name}} ...": "",
"Unmounting {{.path}} ...": "",
"Unpaused kubelet and {{.count}} containers": "",
"Unpaused kubelet and {{.count}} containers in: {{.namespaces}}": "",
"Unset the KUBECONFIG environment variable, or verify that it does not point to an empty or otherwise invalid 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": "",
"Usage: minikube delete": "",
"Usage: minikube delete --all --purge": "",
"Use \"{{.CommandPath}} [command] --help\" for more information about a command.": "",
"Use 'kubect get po -A' to find the correct and namespace name": "",
"Use -A to specify all namespaces": "",
"Use VirtualBox to remove the conflicting VM and/or network interfaces": "",
"Use native Golang SSH client (default true). Set to 'false' to use the command line 'ssh' command when accessing the docker machine. Useful for the machine drivers when they will not start with 'Waiting for SSH'.": "",
"User ID: {{.userID}}": "",
"Userspace file server is shutdown": "",
"Userspace file server:": "",
"Using image repository {{.name}}": "",
"Using the '{{.runtime}}' runtime with the 'none' driver is an untested configuration!": "",
"Using the running {{.driver_name}} \"{{.profile_name}}\" VM ...": "",
"VM driver is one of: %v": "Sterownik wirtualnej maszyny to jeden z: %v",
"VM is unable to access {{.repository}}, you may need to configure a proxy or set --image-repository": "",
"Verify that your HTTP_PROXY and HTTPS_PROXY environment variables are set correctly.": "Weryfikuję czy zmienne HTTP_PROXY i HTTPS_PROXY sa ustawione poprawnie",
"Verify the IP address of the running cluster in kubeconfig.": "Weryfikuję adres IP działającego klastra w kubeconfig",
"Verifying dashboard health ...": "Weryfikuję status dashboardu",
@ -434,13 +480,12 @@
"VirtualBox cannot create a network, probably because it conflicts with an existing network that minikube no longer knows about. Try running 'minikube delete'": "",
"VirtualBox is broken. Disable real-time anti-virus software, reboot, and reinstall VirtualBox if the problem continues.": "",
"VirtualBox is broken. Reinstall VirtualBox, reboot, and run 'minikube delete'.": "",
"VirtualBox is unable to find its network interface. Try upgrading to the latest release and rebooting.": "",
"Virtualization support is disabled on your computer. If you are running minikube within a VM, try '--vm-driver=none'. Otherwise, consult your systems BIOS manual for how to enable virtualization.": "",
"Wait failed": "",
"Wait failed: {{.error}}": "",
"Wait until Kubernetes core services are healthy before exiting": "",
"Wait until Kubernetes core services are healthy before exiting.": "",
"Waiting for SSH access ...": "Oczekiwanie na połaczenie SSH...",
"Waiting for the host to be provisioned ...": "",
"Waiting for cluster to come online ...": "",
"Waiting for:": "Oczekiwanie na :",
"Where to root the NFS Shares, defaults to /nfsshares (hyperkit driver only)": "",
"You appear to be using a proxy, but your NO_PROXY environment does not include the minikube IP ({{.ip_address}}). Please see {{.documentation_url}} for more details": "",
@ -454,50 +499,63 @@
"Your minikube vm is not running, try minikube start.": "",
"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\"": "",
"addons modifies minikube addons files using subcommands like \"minikube addons enable dashboard\"": "",
"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": "",
"dry-run mode. Validates configuration, but does not mutate system state": "",
"dry-run validation complete!": "",
"enable failed": "",
"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}}": "Nie udało się otworzyć przeglądarki: {{.error}}",
"if true, will embed the certs in kubeconfig.": "",
"kubeadm detected a TCP port conflict with another process: probably another local Kubernetes installation. Run lsof -p\u003cport\u003e to find the process and kill it": "",
"kubectl and minikube configuration will be stored in {{.home_folder}}": "konfiguracja minikube i kubectl będzie przechowywana w katalogu {{.home_dir}}",
"kubectl not found in PATH, but is required for the dashboard. Installation guide: https://kubernetes.io/docs/tasks/tools/install-kubectl/": "kubectl nie zostało odnaleźione w zmiennej środowiskowej ${PATH}. Instrukcja instalacji: https://kubernetes.io/docs/tasks/tools/install-kubectl/",
"kubectl proxy": "",
"logdir set failed": "",
"max time to wait per Kubernetes core services to be healthy.": "",
"minikube is not running, so the service cannot be accessed": "",
"minikube addons list --output OUTPUT. json, list": "",
"minikube is exiting due to an error. If the above message is not useful, open an issue:": "",
"minikube is unable to access the Google Container Registry. You may need to configure it to use a HTTP proxy.": "",
"minikube is unable to connect to the VM: {{.error}}\n\nThis is likely due to one of two reasons:\n\n- VPN or firewall interference\n- {{.hypervisor}} network configuration issue\n\nSuggested workarounds:\n\n- Disable your local VPN or firewall software\n- Configure your local VPN or firewall to allow access to {{.ip}}\n- Restart or reinstall {{.hypervisor}}\n- Use an alternative --vm-driver": "",
"minikube profile was successfully set to {{.profile_name}}": "",
"minikube status --output OUTPUT. json, text": "",
"minikube {{.version}} is available! Download it: {{.url}}": "minikube {{.version}} jest dostępne! Pobierz je z: {{.url}}",
"mkcmp is used to compare performance of two minikube binaries": "",
"mount argument \"{{.value}}\" must be in form: \u003csource directory\u003e:\u003ctarget directory\u003e": "",
"mount failed": "Montowanie się nie powiodło",
"namespaces to pause": "",
"namespaces to unpause": "",
"not enough arguments ({{.ArgCount}}).\\nusage: minikube config set PROPERTY_NAME PROPERTY_VALUE": "",
"pause containers": "",
"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`": "",
"reload cached images.": "",
"reloads images previously added using the 'cache add' subcommand": "",
"service {{.namespace_name}}/{{.service_name}} has no node port": "",
"stat failed": "",
"status json failure": "",
"status text failure": "",
"toom any arguments ({{.ArgCount}}).\\nusage: minikube config set PROPERTY_NAME PROPERTY_VALUE": "",
"tunnel creates a route to services deployed with type LoadBalancer and sets their Ingress to their ClusterIP": "",
"tunnel creates a route to services deployed with type LoadBalancer and sets their Ingress to their ClusterIP. for a detailed example see https://minikube.sigs.k8s.io/docs/tasks/loadbalancer": "",
"tunnel makes services of type LoadBalancer accessible on localhost": "",
"unable to bind flags": "",
"unable to delete minikube config folder": "",
"unable to set logtostderr": "",
"unpause Kubernetes": "",
"unset failed": "",
"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}}": "nie wspierany sterownik: {{.name}}",
"unsupported or missing driver: {{.name}}": "",
"update config": "",
"usage: minikube addons configure ADDON_NAME": "",
"usage: minikube addons disable ADDON_NAME": "",
@ -505,16 +563,21 @@
"usage: minikube addons list": "",
"usage: minikube addons open ADDON_NAME": "",
"usage: minikube config unset PROPERTY_NAME": "",
"usage: minikube delete": "",
"usage: minikube delete --all": "",
"usage: minikube profile [MINIKUBE_PROFILE_NAME]": "",
"zsh completion failed": "",
"{{.addonName}} was successfully enabled": "{{.addonName}} został aktywowany pomyślnie",
"{{.driver}} does not appear to be installed": "",
"{{.driver}} does not appear to be installed, but is specified by an existing profile. Please run 'minikube delete' or install {{.driver}}": "",
"{{.extra_option_component_name}}.{{.key}}={{.value}}": "",
"{{.machine}} IP has been updated to point at {{.ip}}": "",
"{{.machine}} IP was already correctly configured for {{.ip}}": "",
"{{.name}} cluster does not exist": "Klaster {{.name}} nie istnieje",
"{{.name}} has no available configuration options": "{{.name}} nie posiada opcji configuracji",
"{{.name}} was successfully configured": "{{.name}} skonfigurowano pomyślnie",
"{{.path}} is version {{.client_version}}, and is incompatible with Kubernetes {{.cluster_version}}. You will need to update {{.path}} or use 'minikube kubectl' to connect with this cluster": "",
"{{.prefix}}minikube {{.version}} on {{.platform}}": "{{.prefix}}minikube {{.version}} na {{.platform}}",
"{{.type}} is not yet a supported filesystem. We will try anyways!": "{{.type}} nie jest wspierany przez system plików. I tak spróbujemy!",
"{{.url}} is not accessible: {{.error}}": ""
}
}

View File

@ -1,7 +1,9 @@
{
"\"The '{{.minikube_addon}}' addon is disabled": "",
"\"{{.minikube_addon}}\" was successfully disabled": "已成功禁用 \"{{.minikube_addon}}\"",
"\"{{.name}}\" cluster does not exist. Proceeding ahead with cleanup.": "\"{{.name}}\" 集群不存在,将继续清理",
"\"{{.name}}\" profile does not exist": "“{{.name}}”配置文件不存在",
"\"{{.name}}\" profile does not exist, trying anyways.": "",
"\"{{.profile_name}}\" VM does not exist, nothing to stop": "\"{{.profile_name}}\" 虚拟机不存在,没有什么可供停止的",
"\"{{.profile_name}}\" host does not exist, unable to show an IP": "\"{{.profile_name}}\" 主机不存在无法显示其IP",
"\"{{.profile_name}}\" stopped.": "\"{{.profile_name}}\" 已停止",
@ -38,6 +40,8 @@
"Another hypervisor, such as VirtualBox, is conflicting with KVM. Please stop the other hypervisor, or use --vm-driver to switch to it.": "另外一个管理程序与 KVM 产生了冲突,如 VirtualBox。请停止其他的管理程序",
"Automatically selected the '{{.driver}}' driver": "自动选择 '{{.driver}}' 驱动",
"Automatically selected the '{{.driver}}' driver (alternates: {{.alternates}})": "自动选择 '{{.driver}}' 驱动(可选项:{{.alternates}}",
"Automatically selected the {{.experimental}}'{{.driver}}' driver": "",
"Automatically selected the {{.experimental}}'{{.driver}}' driver (alternates: {{.alternates}})": "",
"Available Commands": "可用命令",
"Basic Commands:": "基本命令:",
"Block until the apiserver is servicing API requests": "阻塞直到 apiserver 为 API 请求提供服务",
@ -106,6 +110,8 @@
"Enable the default CNI plugin (/etc/cni/net.d/k8s.conf). Used in conjunction with \\\"--network-plugin=cni\\": "启用默认 CNI 插件 (/etc/cni/net.d/k8s.conf)。与“--network-plugin=cni”结合使用",
"Enable the default CNI plugin (/etc/cni/net.d/k8s.conf). Used in conjunction with \\\"--network-plugin=cni\\\".": "启用默认 CNI 插件 (/etc/cni/net.d/k8s.conf)。与“--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": "启动 minikube 插件 w/ADDON_NAME例如minikube addons enable dashboard。查看相关可用的插件列表请使用minikube addons list",
"Enabling '{{.name}}' returned an error: {{.error}}": "",
"Enabling addons: {{.addons}}": "",
"Enabling dashboard ...": "正在开启 dashboard ...",
"Ensure that CRI-O is installed and healthy: Run 'sudo systemctl start crio' and 'journalctl -u crio'. Alternatively, use --container-runtime=docker": "确保 CRI-O 已安装且正常运行:执行 'sudo systemctl start crio' and 'journalctl -u crio'。或者使用 --container-runtime=docker",
"Ensure that Docker is installed and healthy: Run 'sudo systemctl start docker' and 'journalctl -u docker'. Alternatively, select another value for --vm-driver": "确保 Docker 已安装且正常运行: 执行 'sudo systemctl start docker' and 'journalctl -u docker'。或者为 --vm-driver 指定另外的值",
@ -215,7 +221,6 @@
"Gets the value of PROPERTY_NAME from the minikube config file": "",
"Getting machine config failed": "获取机器配置失败",
"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": "",
@ -225,6 +230,8 @@
"Hyperkit is broken. Upgrade to the latest hyperkit version and/or Docker for Desktop. Alternatively, you may choose an alternate --vm-driver": "Hyperkit 已损坏。升级到最新的 hyperkit 版本以及/或者 Docker 桌面版。或者,你可以通过 --vm-driver 切换其他选项",
"Hyperkit networking is broken. Upgrade to the latest hyperkit version and/or Docker for Desktop. Alternatively, you may choose an alternate --vm-driver": "Hyperkit 的网络挂了。升级到最新的 hyperkit 版本以及/或者 Docker 桌面版。或者,你可以通过 --vm-driver 切换其他选项",
"If set, automatically updates drivers to the latest version. Defaults to true.": "如果设置了,将自动更新驱动到最新版本。默认为 true。",
"If set, pause all namespaces": "",
"If set, unpause all namespaces": "",
"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.": "如果为 true请缓存当前引导程序的 docker 镜像并将其加载到机器中。在 --vm-driver=none 情况下始终为 false。",
"If true, only download and cache files for later use - don't install or start anything.": "如果为 true仅会下载和缓存文件以备后用 - 不会安装或启动任何项。",
@ -270,6 +277,7 @@
"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`.": "",
"Node may be unable to resolve external DNS records": "",
"None of the known repositories in your location are accessible. Using {{.image_repository_name}} as fallback.": "您所在位置的已知存储库都无法访问。正在将 {{.image_repository_name}} 用作后备存储库。",
"None of the known repositories is accessible. Consider specifying an alternative image repository with --image-repository flag": "已知存储库都无法访问。请考虑使用 --image-repository 标志指定备选镜像存储库",
"Not passing {{.name}}={{.value}} to docker env.": "",
@ -286,6 +294,9 @@
"Options: {{.options}}": "",
"Outputs minikube shell completion for the given shell (bash or zsh)": "",
"Outputs 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": "",
"Pause": "",
"Paused kubelet and {{.count}} containers": "",
"Paused kubelet and {{.count}} containers in: {{.namespaces}}": "",
"Permissions: {{.octalMode}} ({{.writtenMode}})": "",
"Please enter a value:": "",
"Please install the minikube hyperkit VM driver, or select an alternative --vm-driver": "",
@ -308,11 +319,13 @@
"Reboot to complete VirtualBox installation, verify that VirtualBox is not blocked by your system, and/or use another hypervisor": "重启以完成 VirtualBox 安装,检查 VirtualBox 未被您的操作系统禁用,或者使用其他的管理程序。",
"Rebuild libvirt with virt-network support": "",
"Received {{.name}} signal": "",
"Reconfiguring existing host ...": "",
"Registry mirrors to pass to the Docker daemon": "传递给 Docker 守护进程的注册表镜像",
"Reinstall VirtualBox and reboot. Alternatively, try the kvm2 driver: https://minikube.sigs.k8s.io/docs/reference/drivers/kvm2/": "",
"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 using {{.bootstrapper}} ...": "正在使用 {{.bootstrapper}} 重新启动 Kubernetes…",
"Removed all traces of the \"{{.name}}\" cluster.": "",
"Removing {{.directory}} ...": "正在移除 {{.directory}}…",
"Requested cpu count {{.requested_cpus}} is less than the minimum allowed of {{.minimum_cpus}}": "请求的 CPU 数量 {{.requested_cpus}} 小于允许的最小值 {{.minimum_cpus}}",
"Requested disk size {{.requested_size}} is less than minimum of {{.minimum_size}}": "请求的磁盘大小 {{.requested_size}} 小于最小值 {{.minimum_size}}",
@ -326,6 +339,7 @@
"Returns the value of PROPERTY_NAME from the minikube config file. Can be overwritten at runtime by flags or environmental variables.": "",
"Run 'kubectl describe pod coredns -n kube-system' and check for a firewall or DNS conflict": "",
"Run 'minikube delete' to delete the stale VM, or and ensure that minikube is running as the same user you are issuing this command with": "执行 'minikube delete' 以删除过时的虚拟机,或者确保 minikube 以与您发出此命令的用户相同的用户身份运行",
"Run kubectl": "",
"Run minikube from the C: drive.": "",
"Run the kubernetes client, download it if necessary. Remember -- after kubectl!\n\nExamples:\nminikube kubectl -- --help\nminikube kubectl -- get pods --namespace kube-system": "",
"Run the minikube command as an Administrator": "",
@ -333,6 +347,8 @@
"Running on localhost (CPUs={{.number_of_cpus}}, Memory={{.memory_size}}MB, Disk={{.disk_size}}MB) ...": "",
"Selecting '{{.driver}}' driver from existing profile (alternates: {{.alternates}})": "从现有配置文件中选择 '{{.driver}}' 驱动程序 (可选:{{.alternates}}",
"Selecting '{{.driver}}' driver from user configuration (alternates: {{.alternates}})": "从用户配置中选择 {{.driver}}' 驱动程序(可选:{{.alternates}}",
"Selecting {{.experimental}}'{{.driver}}' driver from existing profile (alternates: {{.alternates}})": "",
"Selecting {{.experimental}}'{{.driver}}' driver from user configuration (alternates: {{.alternates}})": "",
"Set failed": "",
"Set flag to delete all profiles": "设置标志以删除所有配置文件",
"Set this flag to delete the '.minikube' folder from your user directory.": "设置这个标志来删除您用户目录下的 '.minikube' 文件夹。",
@ -378,6 +394,7 @@
"The 'none' driver does not respect the --memory flag": "'none' 驱动程序不遵循 --memory 标志",
"The 'none' driver does not support multiple profiles: https://minikube.sigs.k8s.io/docs/reference/drivers/none/": "",
"The 'none' driver provides limited isolation and may reduce system security and reliability.": "“none”驱动程序提供有限的隔离功能并且可能会降低系统安全性和可靠性。",
"The '{{.addonName}}' addon is enabled": "",
"The '{{.driver}}' driver requires elevated permissions. The following commands will be executed:\\n\\n{{ .example }}\\n": "",
"The CIDR to be used for service cluster IPs.": "需要用于服务集群 IP 的 CIDR。",
"The CIDR to be used for the minikube VM (virtualbox driver only)": "需要用于 minikube 虚拟机的 CIDR仅限 virtualbox 驱动程序)",
@ -400,6 +417,7 @@
"The docker host is currently not running": "",
"The docker service is currently not active": "",
"The driver '{{.driver}}' is not supported on {{.os}}": "{{.os}} 不支持驱动程序“{{.driver}}”",
"The driver {{.experimental}} '{{.driver}}' is not supported on {{.os}}": "",
"The existing \"{{.profile_name}}\" VM that was created using the \"{{.old_driver}}\" driver, and is incompatible with the \"{{.driver}}\" driver.": "",
"The hyperv virtual switch name. Defaults to first found. (hyperv driver only)": "hyperv 虚拟交换机名称。默认为找到的第一个 hyperv 虚拟交换机。(仅限 hyperv 驱动程序)",
"The hypervisor does not appear to be configured properly. Run 'minikube start --alsologtostderr -v=1' and inspect the error code": "管理程序似乎配置的不正确。执行 'minikube start --alsologtostderr -v=1' 并且检查错误代码",
@ -427,12 +445,12 @@
"This will start the mount daemon and automatically mount files into minikube": "这将启动装载守护进程并将文件自动装载到 minikube 中",
"This will start the mount daemon and automatically mount files into minikube.": "",
"Tip: To remove this root owned cluster, run: sudo {{.cmd}} delete": "提示:要移除这个由根用户拥有的集群,请运行 sudo {{.cmd}} delete",
"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}}": "如需连接到此集群,请使用 kubectl --context={{.name}}",
"To connect to this cluster, use: kubectl --context={{.name}}__1": "如需连接到此集群,请使用 kubectl --context={{.name}}",
"To connect to this cluster, use: kubectl --context={{.profile_name}}": "",
"To disable this notice, run: 'minikube config set WantUpdateNotification false'\\n": "",
"To proceed, either:\n\n 1) Delete the existing \"{{.profile_name}}\" cluster using: '{{.command}} delete'\n\n * or *\n\n 2) Start the existing \"{{.profile_name}}\" cluster using: '{{.command}} start --vm-driver={{.old_driver}}'": "",
"To see addons list for other profiles use: `minikube addons -p name list`": "",
"To start minikube with HyperV Powershell must be in your PATH`": "",
"To use kubectl or minikube commands as your own user, you may need to relocate them. For example, to overwrite your own settings, run:": "如需以您自己的用户身份使用 kubectl 或 minikube 命令,您可能需要重新定位该命令。例如,如需覆盖您的自定义设置,请运行:",
"Troubleshooting Commands:": "",
@ -444,6 +462,7 @@
"Unable to generate docs": "",
"Unable to generate the documentation. Please ensure that the path specified is a directory, exists \u0026 you have permission to write to it.": "",
"Unable to get VM IP address": "",
"Unable to get addon status for {{.name}}: {{.error}}": "",
"Unable to get bootstrapper: {{.error}}": "无法获取引导程序:{{.error}}",
"Unable to get current user": "",
"Unable to get runtime": "",
@ -463,6 +482,8 @@
"Unable to verify SSH connectivity: {{.error}}. Will retry...": "无法验证 SSH 连接: {{.error}}。即将重试...",
"Uninstalling Kubernetes {{.kubernetes_version}} using {{.bootstrapper_name}} ...": "正在使用 {{.bootstrapper_name}} 卸载 Kubernetes {{.kubernetes_version}}…",
"Unmounting {{.path}} ...": "",
"Unpaused kubelet and {{.count}} containers": "",
"Unpaused kubelet and {{.count}} containers in: {{.namespaces}}": "",
"Unset the KUBECONFIG environment variable, or verify that it does not point to an empty or otherwise invalid path": "",
"Unset variables instead of setting them": "",
"Update server returned an empty list": "",
@ -474,6 +495,7 @@
"Usage: minikube delete --all --purge": "使用方法minikube delete --all --purge",
"Use \"{{.CommandPath}} [command] --help\" for more information about a command.": "",
"Use 'kubect get po -A' to find the correct and namespace name": "使用 'kubect get po -A' 来查询正确的命名空间名称",
"Use -A to specify all namespaces": "",
"Use VirtualBox to remove the conflicting VM and/or network interfaces": "",
"Use native Golang SSH client (default true). Set to 'false' to use the command line 'ssh' command when accessing the docker machine. Useful for the machine drivers when they will not start with 'Waiting for SSH'.": "",
"User ID: {{.userID}}": "",
@ -525,6 +547,8 @@
"config view failed": "",
"dashboard service is not running: {{.error}}": "",
"disable failed": "",
"dry-run mode. Validates configuration, but does not mutate system state": "",
"dry-run validation complete!": "",
"enable failed": "",
"error creating clientset": "",
"error creating machine client": "",
@ -548,18 +572,24 @@
"mkcmp is used to compare performance of two minikube binaries": "mkcmp 用于对比两个 minikube 二进制的性能",
"mount argument \"{{.value}}\" must be in form: \u003csource directory\u003e:\u003ctarget directory\u003e": "",
"mount failed": "",
"namespaces to pause": "",
"namespaces to unpause": "",
"not enough arguments ({{.ArgCount}}).\\nusage: minikube config set PROPERTY_NAME PROPERTY_VALUE": "",
"pause containers": "",
"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`": "",
"reload cached images.": "重新加载缓存的镜像",
"reloads images previously added using the 'cache add' subcommand": "重新加载之前通过子命令 'cache add' 添加的镜像",
"service {{.namespace_name}}/{{.service_name}} has no node port": "",
"stat failed": "",
"status json failure": "",
"status text failure": "",
"toom any arguments ({{.ArgCount}}).\\nusage: minikube config set PROPERTY_NAME PROPERTY_VALUE": "",
"tunnel creates a route to services deployed with type LoadBalancer and sets their Ingress to their ClusterIP": "",
"tunnel creates a route to services deployed with type LoadBalancer and sets their Ingress to their ClusterIP. for a detailed example see https://minikube.sigs.k8s.io/docs/tasks/loadbalancer": "",
"tunnel makes services of type LoadBalancer accessible on localhost": "",
"unable to bind flags": "",
"unable to delete minikube config folder": "无法删除 minikube 配置目录",
"unable to set logtostderr": "",
"unpause Kubernetes": "",
"unset failed": "",
"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": "",
@ -575,7 +605,6 @@
"usage: minikube delete --all": "",
"usage: minikube profile [MINIKUBE_PROFILE_NAME]": "",
"zsh completion failed": "",
"{{.addonName}} was successfully enabled": "",
"{{.driver}} does not appear to be installed": "似乎并未安装 {{.driver}}",
"{{.driver}} does not appear to be installed, but is specified by an existing profile. Please run 'minikube delete' or install {{.driver}}": "似乎并未安装 {{.driver}},但已被当前的配置文件指定。请执行 'minikube delete' 或者安装 {{.driver}}",
"{{.extra_option_component_name}}.{{.key}}={{.value}}": "",