diff --git a/CHANGELOG.md b/CHANGELOG.md index 20a21c3c9e8d..32d1a11709ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -775,7 +775,7 @@ Thank you to the contributors whose work made v1.1 into something we could all b * Add port name to service struct used in minikube service [#4011](https://github.com/kubernetes/minikube/pull/4011) * Update Hyper-V daemons [#4030](https://github.com/kubernetes/minikube/pull/4030) * Avoid surfacing "error: no objects passed to apply" non-error from addon-manager [#4076](https://github.com/kubernetes/minikube/pull/4076) -* Don't cache images when --vmdriver=none [#4059](https://github.com/kubernetes/minikube/pull/4059) +* Don't cache images when --vm-driver=none [#4059](https://github.com/kubernetes/minikube/pull/4059) * Enable CONFIG_NF_CONNTRACK_ZONES [#3755](https://github.com/kubernetes/minikube/pull/3755) * Fixed status checking with non-default apiserver-port. [#4058](https://github.com/kubernetes/minikube/pull/4058) * Escape systemd special chars in docker-env [#3997](https://github.com/kubernetes/minikube/pull/3997) diff --git a/cmd/minikube/cmd/cache.go b/cmd/minikube/cmd/cache.go index 772e521f149e..eb9137198475 100644 --- a/cmd/minikube/cmd/cache.go +++ b/cmd/minikube/cmd/cache.go @@ -19,12 +19,10 @@ package cmd import ( "github.com/spf13/cobra" cmdConfig "k8s.io/minikube/cmd/minikube/cmd/config" - "k8s.io/minikube/pkg/minikube/config" - "k8s.io/minikube/pkg/minikube/constants" "k8s.io/minikube/pkg/minikube/exit" "k8s.io/minikube/pkg/minikube/image" - "k8s.io/minikube/pkg/minikube/localpath" "k8s.io/minikube/pkg/minikube/machine" + "k8s.io/minikube/pkg/minikube/node" ) // cacheImageConfigKey is the config field name used to store which images we have previously cached @@ -77,54 +75,13 @@ var reloadCacheCmd = &cobra.Command{ Short: "reload cached images.", Long: "reloads images previously added using the 'cache add' subcommand", Run: func(cmd *cobra.Command, args []string) { - err := cacheAndLoadImagesInConfig() + err := node.CacheAndLoadImagesInConfig() if err != nil { exit.WithError("Failed to reload cached images", err) } }, } -func imagesInConfigFile() ([]string, error) { - configFile, err := config.ReadConfig(localpath.ConfigFile) - if err != nil { - return nil, err - } - if values, ok := configFile[cacheImageConfigKey]; ok { - var images []string - for key := range values.(map[string]interface{}) { - images = append(images, key) - } - return images, nil - } - return []string{}, nil -} - -// saveImagesToTarFromConfig saves images to tar in cache which specified in config file. -// currently only used by download-only option -func saveImagesToTarFromConfig() error { - images, err := imagesInConfigFile() - if err != nil { - return err - } - if len(images) == 0 { - return nil - } - return image.SaveToDir(images, constants.ImageCacheDir) -} - -// cacheAndLoadImagesInConfig loads the images currently in the config file -// called by 'start' and 'cache reload' commands. -func cacheAndLoadImagesInConfig() error { - images, err := imagesInConfigFile() - if err != nil { - return err - } - if len(images) == 0 { - return nil - } - return machine.CacheAndLoadImages(images) -} - func init() { cacheCmd.AddCommand(addCacheCmd) cacheCmd.AddCommand(deleteCacheCmd) diff --git a/cmd/minikube/cmd/config/open.go b/cmd/minikube/cmd/config/open.go index a65250810d47..e3782e816f1e 100644 --- a/cmd/minikube/cmd/config/open.go +++ b/cmd/minikube/cmd/config/open.go @@ -26,7 +26,6 @@ import ( "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" @@ -69,7 +68,7 @@ var addonsOpenCmd = &cobra.Command{ defer api.Close() profileName := viper.GetString(pkg_config.MachineProfile) - if !cluster.IsHostRunning(api, profileName) { + if !machine.IsHostRunning(api, profileName) { os.Exit(1) } addon, ok := assets.Addons[addonName] // validate addon input diff --git a/cmd/minikube/cmd/config/profile_list.go b/cmd/minikube/cmd/config/profile_list.go index fd6cbbd3e92a..9f0b0d8259b6 100644 --- a/cmd/minikube/cmd/config/profile_list.go +++ b/cmd/minikube/cmd/config/profile_list.go @@ -23,7 +23,6 @@ import ( "strconv" "strings" - "k8s.io/minikube/pkg/minikube/cluster" "k8s.io/minikube/pkg/minikube/config" "k8s.io/minikube/pkg/minikube/exit" "k8s.io/minikube/pkg/minikube/machine" @@ -76,7 +75,7 @@ var printProfilesTable = func() { defer api.Close() for _, p := range validProfiles { - p.Status, err = cluster.GetHostStatus(api, p.Name) + p.Status, err = machine.GetHostStatus(api, p.Name) if err != nil { glog.Warningf("error getting host status for %s: %v", p.Name, err) } @@ -85,7 +84,7 @@ var printProfilesTable = func() { 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, p.Config.KubernetesConfig.ContainerRuntime, cp.IP, strconv.Itoa(cp.Port), p.Config.KubernetesConfig.KubernetesVersion, p.Status}) + validData = append(validData, []string{p.Name, p.Config.Driver, p.Config.KubernetesConfig.ContainerRuntime, cp.IP, strconv.Itoa(cp.Port), p.Config.KubernetesConfig.KubernetesVersion, p.Status}) } table.AppendBulk(validData) @@ -118,7 +117,7 @@ var printProfilesJSON = func() { validProfiles, invalidProfiles, err := config.ListProfiles() for _, v := range validProfiles { - status, err := cluster.GetHostStatus(api, v.Name) + status, err := machine.GetHostStatus(api, v.Name) if err != nil { glog.Warningf("error getting host status for %s: %v", v.Name, err) } diff --git a/cmd/minikube/cmd/dashboard.go b/cmd/minikube/cmd/dashboard.go index f247b365d764..802b57d9221f 100644 --- a/cmd/minikube/cmd/dashboard.go +++ b/cmd/minikube/cmd/dashboard.go @@ -35,7 +35,6 @@ import ( "github.com/spf13/viper" pkgaddons "k8s.io/minikube/pkg/addons" "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" @@ -102,7 +101,7 @@ 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.IsHostRunning(api, profileName) { + if !machine.IsHostRunning(api, profileName) { os.Exit(1) } diff --git a/cmd/minikube/cmd/delete.go b/cmd/minikube/cmd/delete.go index a6374b34901f..f58bd5440e3c 100644 --- a/cmd/minikube/cmd/delete.go +++ b/cmd/minikube/cmd/delete.go @@ -33,6 +33,7 @@ import ( "github.com/spf13/viper" cmdcfg "k8s.io/minikube/cmd/minikube/cmd/config" "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/constants" "k8s.io/minikube/pkg/minikube/cruntime" @@ -92,10 +93,7 @@ func runDelete(cmd *cobra.Command, args []string) { if len(args) > 0 { exit.UsageT("Usage: minikube delete") } - profileFlag, err := cmd.Flags().GetString("profile") - if err != nil { - exit.WithError("Could not get profile flag", err) - } + profileFlag := viper.GetString(config.MachineProfile) validProfiles, invalidProfiles, err := pkg_config.ListProfiles() profilesToDelete := append(validProfiles, invalidProfiles...) @@ -192,7 +190,7 @@ func deleteProfile(profile *pkg_config.Profile) error { return DeletionError{Err: delErr, Errtype: MissingProfile} } - if err == nil && driver.BareMetal(cc.VMDriver) { + if err == nil && driver.BareMetal(cc.Driver) { if err := uninstallKubernetes(api, profile.Name, cc.KubernetesConfig, viper.GetString(cmdcfg.Bootstrapper)); err != nil { deletionError, ok := err.(DeletionError) if ok { @@ -208,7 +206,7 @@ func deleteProfile(profile *pkg_config.Profile) error { out.T(out.FailureType, "Failed to kill mount process: {{.error}}", out.V{"error": err}) } - if err = cluster.DeleteHost(api, profile.Name); err != nil { + if err = machine.DeleteHost(api, profile.Name); err != nil { switch errors.Cause(err).(type) { case mcnerror.ErrHostDoesNotExist: glog.Infof("%s cluster does not exist. Proceeding ahead with cleanup.", profile.Name) @@ -276,12 +274,12 @@ func profileDeletionErr(profileName string, additionalInfo 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) + clusterBootstrapper, err := cluster.Bootstrapper(api, bsName) if err != nil { return DeletionError{Err: fmt.Errorf("unable to get bootstrapper: %v", err), Errtype: Fatal} } - host, err := cluster.CheckIfHostExistsAndLoad(api, profile) + host, err := machine.CheckIfHostExistsAndLoad(api, profile) if err != nil { exit.WithError("Error getting host", err) } diff --git a/cmd/minikube/cmd/docker-env.go b/cmd/minikube/cmd/docker-env.go index e831e048d941..f43e96dfa657 100644 --- a/cmd/minikube/cmd/docker-env.go +++ b/cmd/minikube/cmd/docker-env.go @@ -32,7 +32,6 @@ import ( "github.com/spf13/cobra" "github.com/spf13/viper" "k8s.io/minikube/pkg/drivers/kic/oci" - "k8s.io/minikube/pkg/minikube/cluster" "k8s.io/minikube/pkg/minikube/config" "k8s.io/minikube/pkg/minikube/constants" "k8s.io/minikube/pkg/minikube/driver" @@ -149,7 +148,7 @@ var dockerEnvCmd = &cobra.Command{ if err != nil { exit.WithError("Error getting config", err) } - host, err := cluster.CheckIfHostExistsAndLoad(api, cc.Name) + host, err := machine.CheckIfHostExistsAndLoad(api, cc.Name) if err != nil { exit.WithError("Error getting host", err) } @@ -157,7 +156,7 @@ var dockerEnvCmd = &cobra.Command{ exit.UsageT(`'none' driver does not support 'minikube docker-env' command`) } - hostSt, err := cluster.GetHostStatus(api, cc.Name) + hostSt, err := machine.GetHostStatus(api, cc.Name) if err != nil { exit.WithError("Error getting host status", err) } diff --git a/cmd/minikube/cmd/kubectl.go b/cmd/minikube/cmd/kubectl.go index c880fecf7d00..ebceeb94683e 100644 --- a/cmd/minikube/cmd/kubectl.go +++ b/cmd/minikube/cmd/kubectl.go @@ -20,7 +20,6 @@ import ( "fmt" "os" "os/exec" - "runtime" "syscall" "github.com/golang/glog" @@ -29,6 +28,7 @@ import ( "k8s.io/minikube/pkg/minikube/config" "k8s.io/minikube/pkg/minikube/constants" "k8s.io/minikube/pkg/minikube/machine" + "k8s.io/minikube/pkg/minikube/node" "k8s.io/minikube/pkg/minikube/out" ) @@ -59,7 +59,7 @@ minikube kubectl -- get pods --namespace kube-system`, version = cc.KubernetesConfig.KubernetesVersion } - path, err := cacheKubectlBinary(version) + path, err := node.CacheKubectlBinary(version) if err != nil { out.ErrLn("Error caching kubectl: %v", err) } @@ -82,12 +82,3 @@ minikube kubectl -- get pods --namespace kube-system`, } }, } - -func cacheKubectlBinary(k8sVerison string) (string, error) { - binary := "kubectl" - if runtime.GOOS == "windows" { - binary = "kubectl.exe" - } - - return machine.CacheBinary(binary, k8sVerison, runtime.GOOS, runtime.GOARCH) -} diff --git a/cmd/minikube/cmd/logs.go b/cmd/minikube/cmd/logs.go index 60d49cfe920b..4796ef54b4e5 100644 --- a/cmd/minikube/cmd/logs.go +++ b/cmd/minikube/cmd/logs.go @@ -20,6 +20,7 @@ import ( "github.com/spf13/cobra" "github.com/spf13/viper" cmdcfg "k8s.io/minikube/cmd/minikube/cmd/config" + "k8s.io/minikube/pkg/minikube/cluster" "k8s.io/minikube/pkg/minikube/config" "k8s.io/minikube/pkg/minikube/cruntime" "k8s.io/minikube/pkg/minikube/exit" @@ -66,7 +67,7 @@ var logsCmd = &cobra.Command{ if err != nil { exit.WithError("command runner", err) } - bs, err := getClusterBootstrapper(api, viper.GetString(cmdcfg.Bootstrapper)) + bs, err := cluster.Bootstrapper(api, viper.GetString(cmdcfg.Bootstrapper)) if err != nil { exit.WithError("Error getting cluster bootstrapper", err) } diff --git a/cmd/minikube/cmd/node.go b/cmd/minikube/cmd/node.go new file mode 100644 index 000000000000..7b70780f74ad --- /dev/null +++ b/cmd/minikube/cmd/node.go @@ -0,0 +1,33 @@ +/* +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 cmd + +import ( + "github.com/spf13/cobra" + "k8s.io/minikube/pkg/minikube/exit" +) + +// nodeCmd represents the set of node subcommands +var nodeCmd = &cobra.Command{ + Use: "node", + Short: "Node operations", + Long: "Operations on nodes", + Hidden: true, // This won't be fully functional and thus should not be documented yet + Run: func(cmd *cobra.Command, args []string) { + exit.UsageT("Usage: minikube node [add|start|stop|delete]") + }, +} diff --git a/cmd/minikube/cmd/node_add.go b/cmd/minikube/cmd/node_add.go new file mode 100644 index 000000000000..239c1df7ec32 --- /dev/null +++ b/cmd/minikube/cmd/node_add.go @@ -0,0 +1,77 @@ +/* +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 cmd + +import ( + "strconv" + + "github.com/spf13/cobra" + "github.com/spf13/pflag" + "github.com/spf13/viper" + "k8s.io/minikube/pkg/minikube/config" + "k8s.io/minikube/pkg/minikube/exit" + "k8s.io/minikube/pkg/minikube/node" + "k8s.io/minikube/pkg/minikube/out" +) + +var ( + nodeName string + cp bool + worker bool +) +var nodeAddCmd = &cobra.Command{ + Use: "add", + Short: "Adds a node to the given cluster.", + Long: "Adds a node to the given cluster config, and starts it.", + Run: func(cmd *cobra.Command, args []string) { + profile := viper.GetString(config.MachineProfile) + mc, err := config.Load(profile) + if err != nil { + exit.WithError("Error getting config", err) + } + name := nodeName + if nodeName == "" { + name = profile + strconv.Itoa(len(mc.Nodes)+1) + } + out.T(out.Happy, "Adding node {{.name}} to cluster {{.cluster}}", out.V{"name": name, "cluster": profile}) + + n, err := node.Add(mc, name, cp, worker, "", profile) + if err != nil { + exit.WithError("Error adding node to cluster", err) + } + + _, err = node.Start(*mc, *n, false, nil) + if err != nil { + exit.WithError("Error starting node", err) + } + + out.T(out.Ready, "Successfully added {{.name}} to {{.cluster}}!", out.V{"name": name, "cluster": profile}) + }, +} + +func init() { + nodeAddCmd.Flags().StringVar(&nodeName, "name", "", "The name of the node to add.") + nodeAddCmd.Flags().BoolVar(&cp, "control-plane", false, "If true, the node added will also be a control plane in addition to a worker.") + nodeAddCmd.Flags().BoolVar(&worker, "worker", true, "If true, the added node will be marked for work. Defaults to true.") + //We should figure out which of these flags to actually import + startCmd.Flags().Visit( + func(f *pflag.Flag) { + nodeAddCmd.Flags().AddFlag(f) + }, + ) + nodeCmd.AddCommand(nodeAddCmd) +} diff --git a/cmd/minikube/cmd/node_delete.go b/cmd/minikube/cmd/node_delete.go new file mode 100644 index 000000000000..92e5e5755dd1 --- /dev/null +++ b/cmd/minikube/cmd/node_delete.go @@ -0,0 +1,58 @@ +/* +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 cmd + +import ( + "github.com/spf13/cobra" + "github.com/spf13/viper" + "k8s.io/minikube/pkg/minikube/config" + "k8s.io/minikube/pkg/minikube/exit" + "k8s.io/minikube/pkg/minikube/node" + "k8s.io/minikube/pkg/minikube/out" +) + +var nodeDeleteCmd = &cobra.Command{ + Use: "delete", + Short: "Deletes a node from a cluster.", + Long: "Deletes a node from a cluster.", + Run: func(cmd *cobra.Command, args []string) { + + if len(args) == 0 { + exit.UsageT("Usage: minikube node delete [name]") + } + name := args[0] + + profile := viper.GetString(config.MachineProfile) + out.T(out.DeletingHost, "Deleting node {{.name}} from cluster {{.cluster}}", out.V{"name": name, "cluster": profile}) + + cc, err := config.Load(profile) + if err != nil { + exit.WithError("loading config", err) + } + + err = node.Delete(*cc, name) + if err != nil { + out.FatalT("Failed to delete node {{.name}}", out.V{"name": name}) + } + + out.T(out.Deleted, "Node {{.name}} was successfully deleted.", out.V{"name": name}) + }, +} + +func init() { + nodeCmd.AddCommand(nodeDeleteCmd) +} diff --git a/cmd/minikube/cmd/node_start.go b/cmd/minikube/cmd/node_start.go new file mode 100644 index 000000000000..d62cdf7ef160 --- /dev/null +++ b/cmd/minikube/cmd/node_start.go @@ -0,0 +1,74 @@ +/* +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 cmd + +import ( + "os" + + "github.com/spf13/cobra" + "github.com/spf13/viper" + "k8s.io/minikube/pkg/minikube/config" + "k8s.io/minikube/pkg/minikube/exit" + "k8s.io/minikube/pkg/minikube/machine" + "k8s.io/minikube/pkg/minikube/node" + "k8s.io/minikube/pkg/minikube/out" +) + +var nodeStartCmd = &cobra.Command{ + Use: "start", + Short: "Starts a node.", + Long: "Starts an existing stopped node in a cluster.", + Run: func(cmd *cobra.Command, args []string) { + if len(args) == 0 { + exit.UsageT("Usage: minikube node start [name]") + } + + name := args[0] + + // Make sure it's not running + api, err := machine.NewAPIClient() + if err != nil { + exit.WithError("creating api client", err) + } + + if machine.IsHostRunning(api, name) { + out.T(out.Check, "{{.name}} is already running", out.V{"name": name}) + os.Exit(0) + } + + cc, err := config.Load(viper.GetString(config.MachineProfile)) + if err != nil { + exit.WithError("loading config", err) + } + + n, _, err := node.Retrieve(cc, name) + if err != nil { + exit.WithError("retrieving node", err) + } + + // Start it up baby + _, err = node.Start(*cc, *n, false, nil) + if err != nil { + out.FatalT("Failed to start node {{.name}}", out.V{"name": name}) + } + }, +} + +func init() { + nodeStartCmd.Flags().String("name", "", "The name of the node to start") + nodeCmd.AddCommand(nodeStartCmd) +} diff --git a/cmd/minikube/cmd/node_stop.go b/cmd/minikube/cmd/node_stop.go new file mode 100644 index 000000000000..37afecdddb0d --- /dev/null +++ b/cmd/minikube/cmd/node_stop.go @@ -0,0 +1,52 @@ +/* +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 cmd + +import ( + "github.com/spf13/cobra" + "k8s.io/minikube/pkg/minikube/exit" + "k8s.io/minikube/pkg/minikube/machine" + "k8s.io/minikube/pkg/minikube/out" +) + +var nodeStopCmd = &cobra.Command{ + Use: "stop", + Short: "Stops a node in a cluster.", + Long: "Stops a node in a cluster.", + Run: func(cmd *cobra.Command, args []string) { + if len(args) == 0 { + exit.UsageT("Usage: minikube node stop [name]") + } + + name := args[0] + + api, err := machine.NewAPIClient() + if err != nil { + exit.WithError("creating api client", err) + } + + err = machine.StopHost(api, name) + if err != nil { + out.FatalT("Failed to stop node {{.name}}", out.V{"name": name}) + } + }, +} + +func init() { + nodeStopCmd.Flags().String("name", "", "The name of the node to delete") + nodeCmd.AddCommand(nodeStopCmd) +} diff --git a/cmd/minikube/cmd/pause.go b/cmd/minikube/cmd/pause.go index 1e7c68a01dbb..5f3fadb219b8 100644 --- a/cmd/minikube/cmd/pause.go +++ b/cmd/minikube/cmd/pause.go @@ -63,7 +63,7 @@ func runPause(cmd *cobra.Command, args []string) { } glog.Infof("config: %+v", cc) - host, err := cluster.CheckIfHostExistsAndLoad(api, cname) + host, err := machine.CheckIfHostExistsAndLoad(api, cname) if err != nil { exit.WithError("Error getting host", err) } diff --git a/cmd/minikube/cmd/podman-env.go b/cmd/minikube/cmd/podman-env.go index 5c4f6e06af66..fe77feb6c756 100644 --- a/cmd/minikube/cmd/podman-env.go +++ b/cmd/minikube/cmd/podman-env.go @@ -32,7 +32,6 @@ import ( "github.com/docker/machine/libmachine/state" "github.com/spf13/cobra" "github.com/spf13/viper" - "k8s.io/minikube/pkg/minikube/cluster" "k8s.io/minikube/pkg/minikube/config" "k8s.io/minikube/pkg/minikube/constants" "k8s.io/minikube/pkg/minikube/driver" @@ -120,7 +119,7 @@ var podmanEnvCmd = &cobra.Command{ if err != nil { exit.WithError("Error getting config", err) } - host, err := cluster.CheckIfHostExistsAndLoad(api, cc.Name) + host, err := machine.CheckIfHostExistsAndLoad(api, cc.Name) if err != nil { exit.WithError("Error getting host", err) } @@ -128,7 +127,7 @@ var podmanEnvCmd = &cobra.Command{ exit.UsageT(`'none' driver does not support 'minikube podman-env' command`) } - hostSt, err := cluster.GetHostStatus(api, cc.Name) + hostSt, err := machine.GetHostStatus(api, cc.Name) if err != nil { exit.WithError("Error getting host status", err) } diff --git a/cmd/minikube/cmd/root.go b/cmd/minikube/cmd/root.go index a83a2a446d84..013d2ae538ca 100644 --- a/cmd/minikube/cmd/root.go +++ b/cmd/minikube/cmd/root.go @@ -23,16 +23,12 @@ import ( "runtime" "strings" - "github.com/docker/machine/libmachine" "github.com/golang/glog" - "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/spf13/pflag" "github.com/spf13/viper" "k8s.io/kubectl/pkg/util/templates" configCmd "k8s.io/minikube/cmd/minikube/cmd/config" - "k8s.io/minikube/pkg/minikube/bootstrapper" - "k8s.io/minikube/pkg/minikube/bootstrapper/kubeadm" "k8s.io/minikube/pkg/minikube/config" "k8s.io/minikube/pkg/minikube/constants" "k8s.io/minikube/pkg/minikube/exit" @@ -206,6 +202,7 @@ func init() { mountCmd, sshCmd, kubectlCmd, + nodeCmd, }, }, { @@ -266,22 +263,6 @@ func setupViper() { setFlagsUsingViper() } -// getClusterBootstrapper returns a new bootstrapper for the cluster -func getClusterBootstrapper(api libmachine.API, bootstrapperName string) (bootstrapper.Bootstrapper, error) { - var b bootstrapper.Bootstrapper - var err error - switch bootstrapperName { - case bootstrapper.Kubeadm: - b, err = kubeadm.NewBootstrapper(api) - if err != nil { - return nil, errors.Wrap(err, "getting a new kubeadm bootstrapper") - } - default: - return nil, fmt.Errorf("unknown bootstrapper: %s", bootstrapperName) - } - return b, nil -} - func addToPath(dir string) { new := fmt.Sprintf("%s:%s", dir, os.Getenv("PATH")) glog.Infof("Updating PATH: %s", dir) diff --git a/cmd/minikube/cmd/service.go b/cmd/minikube/cmd/service.go index bcb11759d0c0..0fabfbc32b4c 100644 --- a/cmd/minikube/cmd/service.go +++ b/cmd/minikube/cmd/service.go @@ -27,7 +27,6 @@ import ( "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" @@ -74,7 +73,7 @@ var serviceCmd = &cobra.Command{ defer api.Close() profileName := viper.GetString(pkg_config.MachineProfile) - if !cluster.IsHostRunning(api, profileName) { + if !machine.IsHostRunning(api, profileName) { os.Exit(1) } diff --git a/cmd/minikube/cmd/ssh.go b/cmd/minikube/cmd/ssh.go index 340cbd601076..84dead06e104 100644 --- a/cmd/minikube/cmd/ssh.go +++ b/cmd/minikube/cmd/ssh.go @@ -23,7 +23,6 @@ import ( "github.com/spf13/cobra" "github.com/spf13/viper" - "k8s.io/minikube/pkg/minikube/cluster" "k8s.io/minikube/pkg/minikube/config" "k8s.io/minikube/pkg/minikube/driver" "k8s.io/minikube/pkg/minikube/exit" @@ -46,7 +45,7 @@ var sshCmd = &cobra.Command{ if err != nil { exit.WithError("Error getting config", err) } - host, err := cluster.CheckIfHostExistsAndLoad(api, cc.Name) + host, err := machine.CheckIfHostExistsAndLoad(api, cc.Name) if err != nil { exit.WithError("Error getting host", err) } @@ -59,7 +58,7 @@ var sshCmd = &cobra.Command{ ssh.SetDefaultClient(ssh.External) } - err = cluster.CreateSSHShell(api, args) + err = machine.CreateSSHShell(api, args) if err != nil { // This is typically due to a non-zero exit code, so no need for flourish. out.ErrLn("ssh: %v", err) diff --git a/cmd/minikube/cmd/start.go b/cmd/minikube/cmd/start.go index 1e949d280174..de5002a4c932 100644 --- a/cmd/minikube/cmd/start.go +++ b/cmd/minikube/cmd/start.go @@ -25,15 +25,11 @@ import ( "os" "os/exec" "os/user" - "path/filepath" "runtime" - "strconv" "strings" "time" "github.com/blang/semver" - "github.com/docker/machine/libmachine" - "github.com/docker/machine/libmachine/host" "github.com/docker/machine/libmachine/ssh" "github.com/golang/glog" "github.com/google/go-containerregistry/pkg/authn" @@ -44,14 +40,10 @@ import ( gopshost "github.com/shirou/gopsutil/host" "github.com/spf13/cobra" "github.com/spf13/viper" - "golang.org/x/sync/errgroup" cmdcfg "k8s.io/minikube/cmd/minikube/cmd/config" - "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" "k8s.io/minikube/pkg/minikube/cluster" - "k8s.io/minikube/pkg/minikube/command" "k8s.io/minikube/pkg/minikube/config" "k8s.io/minikube/pkg/minikube/constants" "k8s.io/minikube/pkg/minikube/cruntime" @@ -59,16 +51,14 @@ import ( "k8s.io/minikube/pkg/minikube/exit" "k8s.io/minikube/pkg/minikube/kubeconfig" "k8s.io/minikube/pkg/minikube/localpath" - "k8s.io/minikube/pkg/minikube/logs" "k8s.io/minikube/pkg/minikube/machine" + "k8s.io/minikube/pkg/minikube/node" "k8s.io/minikube/pkg/minikube/notify" "k8s.io/minikube/pkg/minikube/out" "k8s.io/minikube/pkg/minikube/proxy" "k8s.io/minikube/pkg/minikube/registry" "k8s.io/minikube/pkg/minikube/translate" pkgutil "k8s.io/minikube/pkg/util" - "k8s.io/minikube/pkg/util/lock" - "k8s.io/minikube/pkg/util/retry" "k8s.io/minikube/pkg/version" ) @@ -132,13 +122,9 @@ const ( var ( registryMirror []string - dockerEnv []string - dockerOpt []string insecureRegistry []string apiServerNames []string - addonList []string apiServerIPs []net.IP - extraOptions config.ExtraOptionSlice ) func init() { @@ -174,7 +160,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(&node.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\".") @@ -188,7 +174,7 @@ func initMinikubeFlags() { // initKubernetesFlags inits the commandline flags for kubernetes related options func initKubernetesFlags() { startCmd.Flags().String(kubernetesVersion, "", "The kubernetes version that the minikube VM will use (ex: v1.2.3)") - startCmd.Flags().Var(&extraOptions, "extra-config", + startCmd.Flags().Var(&node.ExtraOptions, "extra-config", `A set of key=value pairs that describe configuration that may be passed to different components. The key should be '.' separated, and the first part before the dot is the component to apply the configuration to. Valid components are: kubelet, kubeadm, apiserver, controller-manager, etcd, proxy, scheduler @@ -240,8 +226,8 @@ func initNetworkingFlags() { startCmd.Flags().String(imageRepository, "", "Alternative image repository to pull docker images from. This can be used when you have limited access to gcr.io. Set it to \"auto\" to let minikube decide one for you. For Chinese mainland users, you may use local gcr.io mirrors such as registry.cn-hangzhou.aliyuncs.com/google_containers") startCmd.Flags().String(imageMirrorCountry, "", "Country code of the image mirror to be used. Leave empty to use the global one. For Chinese mainland users, set it to cn.") startCmd.Flags().String(serviceCIDR, constants.DefaultServiceCIDR, "The CIDR to be used for service cluster IPs.") - startCmd.Flags().StringArrayVar(&dockerEnv, "docker-env", nil, "Environment variables to pass to the Docker daemon. (format: key=value)") - startCmd.Flags().StringArrayVar(&dockerOpt, "docker-opt", nil, "Specify arbitrary flags to pass to the Docker daemon. (format: key=value)") + startCmd.Flags().StringArrayVar(&node.DockerEnv, "docker-env", nil, "Environment variables to pass to the Docker daemon. (format: key=value)") + startCmd.Flags().StringArrayVar(&node.DockerOpt, "docker-opt", nil, "Specify arbitrary flags to pass to the Docker daemon. (format: key=value)") } // startCmd represents the start command @@ -342,62 +328,15 @@ func runStart(cmd *cobra.Command, args []string) { ssh.SetDefaultClient(ssh.External) } - // Now that the ISO is downloaded, pull images in the background while the VM boots. - var cacheGroup errgroup.Group - beginCacheRequiredImages(&cacheGroup, mc.KubernetesConfig.ImageRepository, k8sVersion) - - // Abstraction leakage alert: startHost requires the config to be saved, to satistfy pkg/provision/buildroot. - // Hence, saveConfig must be called before startHost, and again afterwards when we know the IP. - if err := saveConfig(&mc); err != nil { - exit.WithError("Failed to save config", err) + existingAddons := map[string]bool{} + if existing != nil && existing.Addons != nil { + existingAddons = existing.Addons } - - // exits here in case of --download-only option. - handleDownloadOnly(&cacheGroup, k8sVersion) - mRunner, preExists, machineAPI, host := startMachine(&mc, &n) - defer machineAPI.Close() - // configure the runtime (docker, containerd, crio) - cr := configureRuntimes(mRunner, driverName, mc.KubernetesConfig) - showVersionInfo(k8sVersion, cr) - waitCacheRequiredImages(&cacheGroup) - - // Must be written before bootstrap, otherwise health checks may flake due to stale IP - kubeconfig, err := setupKubeconfig(host, &mc, &n, mc.Name) + kubeconfig, err := node.Start(mc, n, true, existingAddons) if err != nil { - exit.WithError("Failed to setup kubeconfig", err) - } - - // setup kubeadm (must come after setupKubeconfig) - bs := setupKubeAdm(machineAPI, mc, n) - - // pull images or restart cluster - bootstrapCluster(bs, cr, mRunner, mc) - configureMounts() - - // enable addons, both old and new! - if viper.GetBool(installAddons) { - 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.") + exit.WithError("Starting node", err) } - // special ops for none , like change minikube directory. - if driverName == driver.None { - prepareNone() - } - - // Skip pre-existing, because we already waited for health - if viper.GetBool(waitUntilHealthy) && !preExists { - if err := bs.WaitForCluster(mc, viper.GetDuration(waitTimeout)); err != nil { - exit.WithError("Wait failed", err) - } - } if err := showKubectlInfo(kubeconfig, k8sVersion, mc.Name); err != nil { glog.Errorf("kubectl info: %v", err) } @@ -446,95 +385,6 @@ func displayEnviron(env []string) { } } -func setupKubeconfig(h *host.Host, c *config.MachineConfig, n *config.Node, clusterName string) (*kubeconfig.Settings, error) { - addr, err := h.Driver.GetURL() - if err != nil { - exit.WithError("Failed to get driver URL", err) - } - if !driver.IsKIC(h.DriverName) { - addr = strings.Replace(addr, "tcp://", "https://", -1) - addr = strings.Replace(addr, ":2376", ":"+strconv.Itoa(n.Port), -1) - } - - if c.KubernetesConfig.APIServerName != constants.APIServerName { - addr = strings.Replace(addr, n.IP, c.KubernetesConfig.APIServerName, -1) - } - kcs := &kubeconfig.Settings{ - ClusterName: clusterName, - ClusterServerAddress: addr, - ClientCertificate: localpath.MakeMiniPath("client.crt"), - ClientKey: localpath.MakeMiniPath("client.key"), - CertificateAuthority: localpath.MakeMiniPath("ca.crt"), - KeepContext: viper.GetBool(keepContext), - EmbedCerts: viper.GetBool(embedCerts), - } - - kcs.SetPath(kubeconfig.PathFromEnv()) - if err := kubeconfig.Update(kcs); err != nil { - return kcs, err - } - return kcs, nil -} - -func handleDownloadOnly(cacheGroup *errgroup.Group, k8sVersion string) { - // If --download-only, complete the remaining downloads and exit. - if !viper.GetBool(downloadOnly) { - return - } - if err := doCacheBinaries(k8sVersion); err != nil { - exit.WithError("Failed to cache binaries", err) - } - if _, err := cacheKubectlBinary(k8sVersion); err != nil { - exit.WithError("Failed to cache kubectl", err) - } - waitCacheRequiredImages(cacheGroup) - if err := saveImagesToTarFromConfig(); err != nil { - exit.WithError("Failed to cache images to tar", err) - } - out.T(out.Check, "Download complete!") - os.Exit(0) - -} - -func startMachine(cfg *config.MachineConfig, node *config.Node) (runner command.Runner, preExists bool, machineAPI libmachine.API, host *host.Host) { - m, err := machine.NewAPIClient() - if err != nil { - exit.WithError("Failed to get machine client", err) - } - host, preExists = startHost(m, *cfg) - runner, err = machine.CommandRunner(host) - if err != nil { - exit.WithError("Failed to get command runner", err) - } - - ip := validateNetwork(host, runner) - - // Bypass proxy for minikube's vm host ip - err = proxy.ExcludeIP(ip) - if err != nil { - out.ErrT(out.FailureType, "Failed to set NO_PROXY Env. Please use `export NO_PROXY=$NO_PROXY,{{.ip}}`.", out.V{"ip": ip}) - } - // Save IP to configuration file for subsequent use - node.IP = ip - - if err := saveNodeToConfig(cfg, node); err != nil { - exit.WithError("Failed to save config", err) - } - - return runner, preExists, m, host -} - -func showVersionInfo(k8sVersion string, cr cruntime.Manager) { - version, _ := cr.Version() - out.T(cr.Style(), "Preparing Kubernetes {{.k8sVersion}} on {{.runtime}} {{.runtimeVersion}} ...", out.V{"k8sVersion": k8sVersion, "runtime": cr.Name(), "runtimeVersion": version}) - for _, v := range dockerOpt { - out.T(out.Option, "opt {{.docker_option}}", out.V{"docker_option": v}) - } - for _, v := range dockerEnv { - out.T(out.Option, "env {{.docker_env}}", out.V{"docker_env": v}) - } -} - func showKubectlInfo(kcs *kubeconfig.Settings, k8sVersion string, machineName string) error { if kcs.KeepContext { out.T(out.Kubectl, "To connect to this cluster, use: kubectl --context={{.name}}", out.V{"name": kcs.ClusterName}) @@ -590,8 +440,8 @@ func selectDriver(existing *config.MachineConfig) registry.DriverState { } // By default, the driver is whatever we used last time - if existing != nil && existing.VMDriver != "" { - ds := driver.Status(existing.VMDriver) + if existing != nil && existing.Driver != "" { + ds := driver.Status(existing.Driver) out.T(out.Sparkle, `Using the {{.driver}} driver based on existing profile`, out.V{"driver": ds.String()}) return ds } @@ -635,7 +485,7 @@ func validateDriver(ds registry.DriverState, existing *config.MachineConfig) { out.ErrLn("") if !st.Installed && !viper.GetBool(force) { - if existing != nil && name == existing.VMDriver { + if existing != nil && name == existing.Driver { exit.WithCodeT(exit.Unavailable, "{{.driver}} does not appear to be installed, but is specified by an existing profile. Please run 'minikube delete' or install {{.driver}}", out.V{"driver": name}) } exit.WithCodeT(exit.Unavailable, "{{.driver}} does not appear to be installed", out.V{"driver": name}) @@ -838,7 +688,7 @@ func validateFlags(cmd *cobra.Command, drvName string) { validateCPUCount(driver.BareMetal(drvName)) // check that kubeadm extra args contain only whitelisted parameters - for param := range extraOptions.AsMap().Get(bsutil.Kubeadm) { + for param := range node.ExtraOptions.AsMap().Get(bsutil.Kubeadm) { if !config.ContainsParam(bsutil.KubeadmExtraArgsWhitelist[bsutil.KubeadmCmdParam], param) && !config.ContainsParam(bsutil.KubeadmExtraArgsWhitelist[bsutil.KubeadmConfigParam], param) { exit.UsageT("Sorry, the kubeadm.{{.parameter_name}} parameter is currently not supported by --extra-config", out.V{"parameter_name": param}) @@ -866,32 +716,6 @@ func validateRegistryMirror() { } } -// doCacheBinaries caches Kubernetes binaries in the foreground -func doCacheBinaries(k8sVersion string) error { - return machine.CacheBinariesForBootstrapper(k8sVersion, viper.GetString(cmdcfg.Bootstrapper)) -} - -// beginCacheRequiredImages caches images required for kubernetes version in the background -func beginCacheRequiredImages(g *errgroup.Group, imageRepository string, k8sVersion string) { - if !viper.GetBool(cacheImages) { - return - } - - g.Go(func() error { - return machine.CacheImagesForBootstrapper(imageRepository, k8sVersion, viper.GetString(cmdcfg.Bootstrapper)) - }) -} - -// waitCacheRequiredImages blocks until the required images are all cached. -func waitCacheRequiredImages(g *errgroup.Group) { - if !viper.GetBool(cacheImages) { - return - } - if err := g.Wait(); err != nil { - glog.Errorln("Error caching images: ", err) - } -} - // generateCfgFromFlags generates config.Config based on flags and supplied arguments func generateCfgFromFlags(cmd *cobra.Command, k8sVersion string, drvName string) (config.MachineConfig, config.Node, error) { r, err := cruntime.New(cruntime.Config{Type: viper.GetString(containerRuntime)}) @@ -959,13 +783,13 @@ func generateCfgFromFlags(cmd *cobra.Command, k8sVersion string, drvName string) Memory: pkgutil.CalculateSizeInMB(viper.GetString(memory)), CPUs: viper.GetInt(cpus), DiskSize: pkgutil.CalculateSizeInMB(viper.GetString(humanReadableDiskSize)), - VMDriver: drvName, + Driver: drvName, HyperkitVpnKitSock: viper.GetString(vpnkitSock), HyperkitVSockPorts: viper.GetStringSlice(vsockPorts), NFSShare: viper.GetStringSlice(nfsShare), NFSSharesRoot: viper.GetString(nfsSharesRoot), - DockerEnv: dockerEnv, - DockerOpt: dockerOpt, + DockerEnv: node.DockerEnv, + DockerOpt: node.DockerOpt, InsecureRegistry: insecureRegistry, RegistryMirror: registryMirror, HostOnlyCIDR: viper.GetString(hostOnlyCIDR), @@ -997,7 +821,7 @@ func generateCfgFromFlags(cmd *cobra.Command, k8sVersion string, drvName string) NetworkPlugin: selectedNetworkPlugin, ServiceCIDR: viper.GetString(serviceCIDR), ImageRepository: repository, - ExtraOptions: extraOptions, + ExtraOptions: node.ExtraOptions, ShouldLoadCachedImages: viper.GetBool(cacheImages), EnableDefaultCNI: selectedEnableDefaultCNI, }, @@ -1019,7 +843,7 @@ func setDockerProxy() { continue } } - dockerEnv = append(dockerEnv, fmt.Sprintf("%s=%s", k, v)) + node.DockerEnv = append(node.DockerEnv, fmt.Sprintf("%s=%s", k, v)) } } } @@ -1031,7 +855,7 @@ func autoSetDriverOptions(cmd *cobra.Command, drvName string) (err error) { if !cmd.Flags().Changed("extra-config") && len(hints.ExtraOptions) > 0 { for _, eo := range hints.ExtraOptions { glog.Infof("auto setting extra-config to %q.", eo) - err = extraOptions.Set(eo) + err = node.ExtraOptions.Set(eo) if err != nil { err = errors.Wrapf(err, "setting extra option %s", eo) } @@ -1056,158 +880,6 @@ func autoSetDriverOptions(cmd *cobra.Command, drvName string) (err error) { return err } -// prepareNone prepares the user and host for the joy of the "none" driver -func prepareNone() { - out.T(out.StartingNone, "Configuring local host environment ...") - if viper.GetBool(config.WantNoneDriverWarning) { - out.T(out.Empty, "") - out.WarningT("The 'none' driver provides limited isolation and may reduce system security and reliability.") - out.WarningT("For more information, see:") - out.T(out.URL, "https://minikube.sigs.k8s.io/docs/reference/drivers/none/") - out.T(out.Empty, "") - } - - if os.Getenv("CHANGE_MINIKUBE_NONE_USER") == "" { - home := os.Getenv("HOME") - out.WarningT("kubectl and minikube configuration will be stored in {{.home_folder}}", out.V{"home_folder": home}) - out.WarningT("To use kubectl or minikube commands as your own user, you may need to relocate them. For example, to overwrite your own settings, run:") - - out.T(out.Empty, "") - out.T(out.Command, "sudo mv {{.home_folder}}/.kube {{.home_folder}}/.minikube $HOME", out.V{"home_folder": home}) - out.T(out.Command, "sudo chown -R $USER $HOME/.kube $HOME/.minikube") - out.T(out.Empty, "") - - out.T(out.Tip, "This can also be done automatically by setting the env var CHANGE_MINIKUBE_NONE_USER=true") - } - - if err := pkgutil.MaybeChownDirRecursiveToMinikubeUser(localpath.MiniPath()); err != nil { - exit.WithCodeT(exit.Permissions, "Failed to change permissions for {{.minikube_dir_path}}: {{.error}}", out.V{"minikube_dir_path": localpath.MiniPath(), "error": err}) - } -} - -// startHost starts a new minikube host using a VM or None -func startHost(api libmachine.API, mc config.MachineConfig) (*host.Host, bool) { - exists, err := api.Exists(mc.Name) - if err != nil { - exit.WithError("Failed to check if machine exists", err) - } - - host, err := cluster.StartHost(api, mc) - if err != nil { - // If virtual machine does not exist due to user interrupt cancel(i.e. Ctrl + C), initialize exists flag - if err == cluster.ErrorMachineNotExist { - // If Machine does not exist, of course the machine does not have kubeadm config files - // In order not to determine the machine has kubeadm config files, initialize exists flag - // ※ If exists flag is true, minikube determines the machine has kubeadm config files - return host, false - } - exit.WithError("Unable to start VM. Please investigate and run 'minikube delete' if possible", err) - } - return host, exists -} - -// validateNetwork tries to catch network problems as soon as possible -func validateNetwork(h *host.Host, r command.Runner) string { - ip, err := h.Driver.GetIP() - if err != nil { - exit.WithError("Unable to get VM IP address", err) - } - - optSeen := false - warnedOnce := false - for _, k := range proxy.EnvVars { - if v := os.Getenv(k); v != "" { - if !optSeen { - out.T(out.Internet, "Found network options:") - optSeen = true - } - out.T(out.Option, "{{.key}}={{.value}}", out.V{"key": k, "value": v}) - ipExcluded := proxy.IsIPExcluded(ip) // Skip warning if minikube ip is already in NO_PROXY - k = strings.ToUpper(k) // for http_proxy & https_proxy - if (k == "HTTP_PROXY" || k == "HTTPS_PROXY") && !ipExcluded && !warnedOnce { - out.WarningT("You appear to be using a proxy, but your NO_PROXY environment does not include the minikube IP ({{.ip_address}}). Please see {{.documentation_url}} for more details", out.V{"ip_address": ip, "documentation_url": "https://minikube.sigs.k8s.io/docs/reference/networking/proxy/"}) - warnedOnce = true - } - } - } - - if !driver.BareMetal(h.Driver.DriverName()) && !driver.IsKIC(h.Driver.DriverName()) { - trySSH(h, ip) - } - - tryLookup(r) - tryRegistry(r) - return ip -} - -func trySSH(h *host.Host, ip string) { - if viper.GetBool(force) { - return - } - - sshAddr := net.JoinHostPort(ip, "22") - - dial := func() (err error) { - d := net.Dialer{Timeout: 3 * time.Second} - conn, err := d.Dial("tcp", sshAddr) - if err != nil { - out.WarningT("Unable to verify SSH connectivity: {{.error}}. Will retry...", out.V{"error": err}) - return err - } - _ = conn.Close() - return nil - } - - if err := retry.Expo(dial, time.Second, 13*time.Second); err != nil { - exit.WithCodeT(exit.IO, `minikube is unable to connect to the VM: {{.error}} - - This is likely due to one of two reasons: - - - VPN or firewall interference - - {{.hypervisor}} network configuration issue - - Suggested workarounds: - - - Disable your local VPN or firewall software - - Configure your local VPN or firewall to allow access to {{.ip}} - - Restart or reinstall {{.hypervisor}} - - Use an alternative --vm-driver - - Use --force to override this connectivity check - `, out.V{"error": err, "hypervisor": h.Driver.DriverName(), "ip": ip}) - } -} - -func tryLookup(r command.Runner) { - // DNS check - 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") - opts := []string{"-sS"} - if proxy != "" && !strings.HasPrefix(proxy, "localhost") && !strings.HasPrefix(proxy, "127.0") { - opts = append([]string{"-x", proxy}, opts...) - } - - repo := viper.GetString(imageRepository) - if repo == "" { - repo = images.DefaultKubernetesRepo - } - - opts = append(opts, fmt.Sprintf("https://%s/", repo)) - if rr, err := r.RunCmd(exec.Command("curl", opts...)); err != nil { - glog.Warningf("%s failed: %v", rr.Args, err) - out.WarningT("VM is unable to access {{.repository}}, you may need to configure a proxy or set --image-repository", out.V{"repository": repo}) - } -} - // getKubernetesVersion ensures that the requested version is reasonable func getKubernetesVersion(old *config.MachineConfig) string { paramVersion := viper.GetString(kubernetesVersion) @@ -1272,91 +944,3 @@ func getKubernetesVersion(old *config.MachineConfig) string { } return nv } - -// setupKubeAdm adds any requested files into the VM before Kubernetes is started -func setupKubeAdm(mAPI libmachine.API, cfg config.MachineConfig, node config.Node) bootstrapper.Bootstrapper { - bs, err := getClusterBootstrapper(mAPI, viper.GetString(cmdcfg.Bootstrapper)) - if err != nil { - exit.WithError("Failed to get bootstrapper", err) - } - for _, eo := range extraOptions { - out.T(out.Option, "{{.extra_option_component_name}}.{{.key}}={{.value}}", out.V{"extra_option_component_name": eo.Component, "key": eo.Key, "value": eo.Value}) - } - // Loads cached images, generates config files, download binaries - if err := bs.UpdateCluster(cfg); err != nil { - exit.WithError("Failed to update cluster", err) - } - if err := bs.SetupCerts(cfg.KubernetesConfig, node); err != nil { - exit.WithError("Failed to setup certs", err) - } - return bs -} - -// configureRuntimes does what needs to happen to get a runtime going. -func configureRuntimes(runner cruntime.CommandRunner, drvName string, k8s config.KubernetesConfig) cruntime.Manager { - config := cruntime.Config{Type: viper.GetString(containerRuntime), Runner: runner, ImageRepository: k8s.ImageRepository, KubernetesVersion: k8s.KubernetesVersion} - cr, err := cruntime.New(config) - if err != nil { - exit.WithError("Failed runtime", err) - } - - disableOthers := true - if driver.BareMetal(drvName) { - disableOthers = false - } - err = cr.Enable(disableOthers) - if err != nil { - exit.WithError("Failed to enable container runtime", err) - } - - return cr -} - -// bootstrapCluster starts Kubernetes using the chosen bootstrapper -func bootstrapCluster(bs bootstrapper.Bootstrapper, r cruntime.Manager, runner command.Runner, mc config.MachineConfig) { - out.T(out.Launch, "Launching Kubernetes ... ") - if err := bs.StartCluster(mc); err != nil { - exit.WithLogEntries("Error starting cluster", err, logs.FindProblems(r, bs, runner)) - } -} - -// configureMounts configures any requested filesystem mounts -func configureMounts() { - if !viper.GetBool(createMount) { - return - } - - out.T(out.Mounting, "Creating mount {{.name}} ...", out.V{"name": viper.GetString(mountString)}) - path := os.Args[0] - mountDebugVal := 0 - if glog.V(8) { - mountDebugVal = 1 - } - mountCmd := exec.Command(path, "mount", fmt.Sprintf("--v=%d", mountDebugVal), viper.GetString(mountString)) - mountCmd.Env = append(os.Environ(), constants.IsMinikubeChildProcess+"=true") - if glog.V(8) { - mountCmd.Stdout = os.Stdout - mountCmd.Stderr = os.Stderr - } - if err := mountCmd.Start(); err != nil { - exit.WithError("Error starting mount", err) - } - if err := lock.WriteFile(filepath.Join(localpath.MiniPath(), constants.MountProcessFileName), []byte(strconv.Itoa(mountCmd.Process.Pid)), 0644); err != nil { - exit.WithError("Error writing mount pid", err) - } -} - -// saveConfig saves profile cluster configuration in $MINIKUBE_HOME/profiles//config.json -func saveConfig(clusterCfg *config.MachineConfig) error { - return config.SaveProfile(viper.GetString(config.MachineProfile), clusterCfg) -} - -func saveNodeToConfig(cfg *config.MachineConfig, node *config.Node) error { - for i, n := range cfg.Nodes { - if n.Name == node.Name { - cfg.Nodes[i] = *node - break - } - } - return saveConfig(cfg) -} diff --git a/cmd/minikube/cmd/status.go b/cmd/minikube/cmd/status.go index b554647b3241..c529ff15054d 100644 --- a/cmd/minikube/cmd/status.go +++ b/cmd/minikube/cmd/status.go @@ -137,7 +137,7 @@ func status(api libmachine.API, name string) (*Status, error) { Kubeconfig: Nonexistent, } - hs, err := cluster.GetHostStatus(api, name) + hs, err := machine.GetHostStatus(api, name) glog.Infof("%s host status = %q (err=%v)", name, hs, err) if err != nil { return st, errors.Wrap(err, "host") @@ -179,7 +179,7 @@ func status(api libmachine.API, name string) (*Status, error) { st.Kubeconfig = Configured } - host, err := cluster.CheckIfHostExistsAndLoad(api, name) + host, err := machine.CheckIfHostExistsAndLoad(api, name) if err != nil { return st, err } diff --git a/cmd/minikube/cmd/stop.go b/cmd/minikube/cmd/stop.go index 5bf8894f6702..0c5ae89e71d1 100644 --- a/cmd/minikube/cmd/stop.go +++ b/cmd/minikube/cmd/stop.go @@ -24,7 +24,6 @@ import ( "github.com/pkg/errors" "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/kubeconfig" @@ -53,7 +52,7 @@ func runStop(cmd *cobra.Command, args []string) { nonexistent := false stop := func() (err error) { - err = cluster.StopHost(api) + err = machine.StopHost(api, profile) if err == nil { return nil } @@ -61,7 +60,7 @@ func runStop(cmd *cobra.Command, args []string) { 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}) + out.T(out.Meh, `"{{.profile_name}}" does not exist, nothing to stop`, out.V{"profile_name": profile}) nonexistent = true return nil default: diff --git a/cmd/minikube/cmd/unpause.go b/cmd/minikube/cmd/unpause.go index 4a3356edffbd..c62165c35671 100644 --- a/cmd/minikube/cmd/unpause.go +++ b/cmd/minikube/cmd/unpause.go @@ -54,7 +54,7 @@ var unpauseCmd = &cobra.Command{ os.Exit(1) } glog.Infof("config: %+v", cc) - host, err := cluster.CheckIfHostExistsAndLoad(api, cname) + host, err := machine.CheckIfHostExistsAndLoad(api, cname) if err != nil { exit.WithError("Error getting host", err) } diff --git a/pkg/addons/addons.go b/pkg/addons/addons.go index 790dbcb4fd09..c1042e45bed2 100644 --- a/pkg/addons/addons.go +++ b/pkg/addons/addons.go @@ -28,7 +28,6 @@ import ( "github.com/pkg/errors" "github.com/spf13/viper" "k8s.io/minikube/pkg/minikube/assets" - "k8s.io/minikube/pkg/minikube/cluster" "k8s.io/minikube/pkg/minikube/command" "k8s.io/minikube/pkg/minikube/config" "k8s.io/minikube/pkg/minikube/exit" @@ -143,8 +142,8 @@ func enableOrDisableAddon(name, val, profile string) error { exit.WithCodeT(exit.Data, "Unable to load config: {{.error}}", out.V{"error": err}) } - host, err := cluster.CheckIfHostExistsAndLoad(api, profile) - if err != nil || !cluster.IsHostRunning(api, profile) { + host, err := machine.CheckIfHostExistsAndLoad(api, profile) + if err != nil || !machine.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 } @@ -244,7 +243,7 @@ func enableOrDisableStorageClasses(name, val, profile string) error { } defer api.Close() - if !cluster.IsHostRunning(api, profile) { + if !machine.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) } diff --git a/pkg/minikube/bootstrapper/kubeadm/kubeadm.go b/pkg/minikube/bootstrapper/kubeadm/kubeadm.go index a083b02617cf..9eb428d8fa1e 100644 --- a/pkg/minikube/bootstrapper/kubeadm/kubeadm.go +++ b/pkg/minikube/bootstrapper/kubeadm/kubeadm.go @@ -194,12 +194,12 @@ func (k *Bootstrapper) StartCluster(cfg config.MachineConfig) error { // Allow older kubeadm versions to function with newer Docker releases. // For kic on linux example error: "modprobe: FATAL: Module configs not found in directory /lib/modules/5.2.17-1rodete3-amd64" - if version.LT(semver.MustParse("1.13.0")) || driver.IsKIC(cfg.VMDriver) { + if version.LT(semver.MustParse("1.13.0")) || driver.IsKIC(cfg.Driver) { glog.Infof("Older Kubernetes release detected (%s), disabling SystemVerification check.", version) ignore = append(ignore, "SystemVerification") } - if driver.IsKIC(cfg.VMDriver) { // to bypass this error: /proc/sys/net/bridge/bridge-nf-call-iptables does not exist + if driver.IsKIC(cfg.Driver) { // to bypass this error: /proc/sys/net/bridge/bridge-nf-call-iptables does not exist ignore = append(ignore, "FileContent--proc-sys-net-bridge-bridge-nf-call-iptables") } @@ -210,13 +210,13 @@ func (k *Bootstrapper) StartCluster(cfg config.MachineConfig) error { return errors.Wrapf(err, "init failed. output: %q", rr.Output()) } - if cfg.VMDriver == driver.Docker { + if cfg.Driver == driver.Docker { if err := k.applyKicOverlay(cfg); err != nil { return errors.Wrap(err, "apply kic overlay") } } - if !driver.IsKIC(cfg.VMDriver) { // TODO: skip for both after verifications https://github.com/kubernetes/minikube/issues/6239 + if !driver.IsKIC(cfg.Driver) { // TODO: skip for both after verifications https://github.com/kubernetes/minikube/issues/6239 glog.Infof("Configuring cluster permissions ...") elevate := func() error { client, err := k.client(cp.IP, cp.Port) @@ -275,9 +275,9 @@ func (k *Bootstrapper) WaitForCluster(cfg config.MachineConfig, timeout time.Dur ip := cp.IP port := cp.Port - if driver.IsKIC(cfg.VMDriver) { + if driver.IsKIC(cfg.Driver) { ip = oci.DefaultBindIPV4 - port, err = oci.HostPortBinding(cfg.VMDriver, cfg.Name, port) + port, err = oci.HostPortBinding(cfg.Driver, cfg.Name, port) if err != nil { return errors.Wrapf(err, "get host-bind port %d for container %s", port, cfg.Name) } @@ -343,9 +343,9 @@ func (k *Bootstrapper) restartCluster(cfg config.MachineConfig) error { for _, n := range cfg.Nodes { ip := n.IP port := n.Port - if driver.IsKIC(cfg.VMDriver) { + if driver.IsKIC(cfg.Driver) { ip = oci.DefaultBindIPV4 - port, err = oci.HostPortBinding(cfg.VMDriver, cfg.Name, port) + port, err = oci.HostPortBinding(cfg.Driver, cfg.Name, port) if err != nil { return errors.Wrapf(err, "get host-bind port %d for container %s", port, cfg.Name) } diff --git a/pkg/minikube/cluster/cluster.go b/pkg/minikube/cluster/cluster.go index ee7ca7f05576..481bbe3cc30d 100644 --- a/pkg/minikube/cluster/cluster.go +++ b/pkg/minikube/cluster/cluster.go @@ -18,9 +18,14 @@ package cluster import ( "flag" + "fmt" + "github.com/docker/machine/libmachine" "github.com/docker/machine/libmachine/ssh" + "github.com/pkg/errors" + "k8s.io/minikube/pkg/minikube/bootstrapper" + "k8s.io/minikube/pkg/minikube/bootstrapper/kubeadm" "k8s.io/minikube/pkg/minikube/exit" ) @@ -35,3 +40,19 @@ func init() { // Setting the default client to native gives much better performance. ssh.SetDefaultClient(ssh.Native) } + +// Bootstrapper returns a new bootstrapper for the cluster +func Bootstrapper(api libmachine.API, bootstrapperName string) (bootstrapper.Bootstrapper, error) { + var b bootstrapper.Bootstrapper + var err error + switch bootstrapperName { + case bootstrapper.Kubeadm: + b, err = kubeadm.NewBootstrapper(api) + if err != nil { + return nil, errors.Wrap(err, "getting a new kubeadm bootstrapper") + } + default: + return nil, fmt.Errorf("unknown bootstrapper: %s", bootstrapperName) + } + return b, nil +} diff --git a/pkg/minikube/cluster/ip.go b/pkg/minikube/cluster/ip.go index e1d8e97db2f8..1fa837b9c818 100644 --- a/pkg/minikube/cluster/ip.go +++ b/pkg/minikube/cluster/ip.go @@ -27,6 +27,7 @@ import ( "github.com/pkg/errors" "k8s.io/minikube/pkg/drivers/kic/oci" "k8s.io/minikube/pkg/minikube/driver" + "k8s.io/minikube/pkg/minikube/machine" ) // GetVMHostIP gets the ip address to be used for mapping host -> VM and VM -> host @@ -74,7 +75,7 @@ func GetVMHostIP(host *host.Host) (net.IP, error) { // 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) + host, err := machine.CheckIfHostExistsAndLoad(api, machineName) if err != nil { return nil, err } diff --git a/pkg/minikube/cluster/iso.go b/pkg/minikube/cluster/iso.go index 2f78587a214f..253acbd37081 100644 --- a/pkg/minikube/cluster/iso.go +++ b/pkg/minikube/cluster/iso.go @@ -23,7 +23,7 @@ import ( // CacheISO downloads and caches ISO. func CacheISO(cfg config.MachineConfig) error { - if driver.BareMetal(cfg.VMDriver) { + if driver.BareMetal(cfg.Driver) { return nil } return cfg.Downloader.CacheMinikubeISOFromURL(cfg.MinikubeISO) diff --git a/pkg/minikube/cluster/ssh.go b/pkg/minikube/cluster/ssh.go deleted file mode 100644 index 0f3c28c841d8..000000000000 --- a/pkg/minikube/cluster/ssh.go +++ /dev/null @@ -1,49 +0,0 @@ -/* -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...) -} diff --git a/pkg/minikube/config/config.go b/pkg/minikube/config/config.go index 14a6aa5d3340..89e285201781 100644 --- a/pkg/minikube/config/config.go +++ b/pkg/minikube/config/config.go @@ -54,6 +54,7 @@ var ( ErrKeyNotFound = errors.New("specified key could not be found in config") ) +// ErrNotExist is the error returned when a config does not exist type ErrNotExist struct { s string } diff --git a/pkg/minikube/config/profile.go b/pkg/minikube/config/profile.go index bb74a88dba9e..c37eabac4ea9 100644 --- a/pkg/minikube/config/profile.go +++ b/pkg/minikube/config/profile.go @@ -40,7 +40,7 @@ func (p *Profile) IsValid() bool { if p.Config == nil { return false } - if p.Config.VMDriver == "" { + if p.Config.Driver == "" { return false } for _, n := range p.Config.Nodes { diff --git a/pkg/minikube/config/profile_test.go b/pkg/minikube/config/profile_test.go index aaf6ad575556..aecb4c2f8126 100644 --- a/pkg/minikube/config/profile_test.go +++ b/pkg/minikube/config/profile_test.go @@ -54,8 +54,8 @@ func TestListProfiles(t *testing.T) { if val[tt.index].Name != tt.expectName { t.Errorf("expected %s got %v", tt.expectName, val[tt.index].Name) } - if val[tt.index].Config.VMDriver != tt.vmDriver { - t.Errorf("expected %s got %v", tt.vmDriver, val[tt.index].Config.VMDriver) + if val[tt.index].Config.Driver != tt.vmDriver { + t.Errorf("expected %s got %v", tt.vmDriver, val[tt.index].Config.Driver) } } diff --git a/pkg/minikube/config/testdata/.minikube2/profiles/p1/config.json b/pkg/minikube/config/testdata/.minikube2/profiles/p1/config.json index 86699a29bb9e..766e9c04c1a4 100644 --- a/pkg/minikube/config/testdata/.minikube2/profiles/p1/config.json +++ b/pkg/minikube/config/testdata/.minikube2/profiles/p1/config.json @@ -5,7 +5,7 @@ "Memory": 2000, "CPUs": 2, "DiskSize": 20000, - "VMDriver": "hyperkit", + "Driver": "hyperkit", "ContainerRuntime": "docker", "HyperkitVpnKitSock": "", "HyperkitVSockPorts": [], diff --git a/pkg/minikube/config/testdata/.minikube2/profiles/p2/config.json b/pkg/minikube/config/testdata/.minikube2/profiles/p2/config.json index d77e0221d298..99e4b167a50b 100644 --- a/pkg/minikube/config/testdata/.minikube2/profiles/p2/config.json +++ b/pkg/minikube/config/testdata/.minikube2/profiles/p2/config.json @@ -5,7 +5,7 @@ "Memory": 2000, "CPUs": 2, "DiskSize": 20000, - "VMDriver": "virtualbox", + "Driver": "virtualbox", "ContainerRuntime": "docker", "HyperkitVpnKitSock": "", "HyperkitVSockPorts": [], diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p1/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p1/config.json index 00655266e652..b0e1b5710543 100644 --- a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p1/config.json +++ b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p1/config.json @@ -5,7 +5,7 @@ "Memory": 2000, "CPUs": 2, "DiskSize": 20000, - "VMDriver": "hyperkit", + "Driver": "hyperkit", "ContainerRuntime": "docker", "HyperkitVpnKitSock": "", "HyperkitVSockPorts": [], diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p5_missing_machine_config/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p5_missing_machine_config/config.json index 1e0980752aa7..c1cf21b26fe8 100644 --- a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p5_missing_machine_config/config.json +++ b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p5_missing_machine_config/config.json @@ -5,7 +5,7 @@ "Memory": 2000, "CPUs": 2, "DiskSize": 20000, - "VMDriver": "hyperkit", + "Driver": "hyperkit", "ContainerRuntime": "docker", "HyperkitVpnKitSock": "", "HyperkitVSockPorts": [], diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p6_empty_machine_config/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p6_empty_machine_config/config.json index a1557f6df1b4..667cbd7652e3 100644 --- a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p6_empty_machine_config/config.json +++ b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p6_empty_machine_config/config.json @@ -5,7 +5,7 @@ "Memory": 2000, "CPUs": 2, "DiskSize": 20000, - "VMDriver": "hyperkit", + "Driver": "hyperkit", "ContainerRuntime": "docker", "HyperkitVpnKitSock": "", "HyperkitVSockPorts": [], diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p7_invalid_machine_config/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p7_invalid_machine_config/config.json index ea47981d2928..7cbd2e409fbd 100644 --- a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p7_invalid_machine_config/config.json +++ b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p7_invalid_machine_config/config.json @@ -5,7 +5,7 @@ "Memory": 2000, "CPUs": 2, "DiskSize": 20000, - "VMDriver": "hyperkit", + "Driver": "hyperkit", "ContainerRuntime": "docker", "HyperkitVpnKitSock": "", "HyperkitVSockPorts": [], diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p8_partial_machine_config/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p8_partial_machine_config/config.json index 789b9b55576f..855b31af906c 100644 --- a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p8_partial_machine_config/config.json +++ b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p8_partial_machine_config/config.json @@ -5,7 +5,7 @@ "Memory": 2000, "CPUs": 2, "DiskSize": 20000, - "VMDriver": "hyperkit", + "Driver": "hyperkit", "ContainerRuntime": "docker", "HyperkitVpnKitSock": "", "HyperkitVSockPorts": [], diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p1/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p1/config.json index 00655266e652..b0e1b5710543 100644 --- a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p1/config.json +++ b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p1/config.json @@ -5,7 +5,7 @@ "Memory": 2000, "CPUs": 2, "DiskSize": 20000, - "VMDriver": "hyperkit", + "Driver": "hyperkit", "ContainerRuntime": "docker", "HyperkitVpnKitSock": "", "HyperkitVSockPorts": [], diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p5_missing_machine_config/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p5_missing_machine_config/config.json index 1e0980752aa7..c1cf21b26fe8 100644 --- a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p5_missing_machine_config/config.json +++ b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p5_missing_machine_config/config.json @@ -5,7 +5,7 @@ "Memory": 2000, "CPUs": 2, "DiskSize": 20000, - "VMDriver": "hyperkit", + "Driver": "hyperkit", "ContainerRuntime": "docker", "HyperkitVpnKitSock": "", "HyperkitVSockPorts": [], diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p6_empty_machine_config/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p6_empty_machine_config/config.json index a1557f6df1b4..667cbd7652e3 100644 --- a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p6_empty_machine_config/config.json +++ b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p6_empty_machine_config/config.json @@ -5,7 +5,7 @@ "Memory": 2000, "CPUs": 2, "DiskSize": 20000, - "VMDriver": "hyperkit", + "Driver": "hyperkit", "ContainerRuntime": "docker", "HyperkitVpnKitSock": "", "HyperkitVSockPorts": [], diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p7_invalid_machine_config/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p7_invalid_machine_config/config.json index ea47981d2928..7cbd2e409fbd 100644 --- a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p7_invalid_machine_config/config.json +++ b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p7_invalid_machine_config/config.json @@ -5,7 +5,7 @@ "Memory": 2000, "CPUs": 2, "DiskSize": 20000, - "VMDriver": "hyperkit", + "Driver": "hyperkit", "ContainerRuntime": "docker", "HyperkitVpnKitSock": "", "HyperkitVSockPorts": [], diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p8_partial_machine_config/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p8_partial_machine_config/config.json index 789b9b55576f..855b31af906c 100644 --- a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p8_partial_machine_config/config.json +++ b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p8_partial_machine_config/config.json @@ -5,7 +5,7 @@ "Memory": 2000, "CPUs": 2, "DiskSize": 20000, - "VMDriver": "hyperkit", + "Driver": "hyperkit", "ContainerRuntime": "docker", "HyperkitVpnKitSock": "", "HyperkitVSockPorts": [], diff --git a/pkg/minikube/config/testdata/profile/.minikube/profiles/p1/config.json b/pkg/minikube/config/testdata/profile/.minikube/profiles/p1/config.json index ea2d8210b4e4..a48578f8eee1 100644 --- a/pkg/minikube/config/testdata/profile/.minikube/profiles/p1/config.json +++ b/pkg/minikube/config/testdata/profile/.minikube/profiles/p1/config.json @@ -5,7 +5,7 @@ "Memory": 2000, "CPUs": 2, "DiskSize": 20000, - "VMDriver": "hyperkit", + "Driver": "hyperkit", "ContainerRuntime": "docker", "HyperkitVpnKitSock": "", "HyperkitVSockPorts": [], diff --git a/pkg/minikube/config/testdata/profile/.minikube/profiles/p2/config.json b/pkg/minikube/config/testdata/profile/.minikube/profiles/p2/config.json index 00619fc815ed..a7bbd19b3f0a 100644 --- a/pkg/minikube/config/testdata/profile/.minikube/profiles/p2/config.json +++ b/pkg/minikube/config/testdata/profile/.minikube/profiles/p2/config.json @@ -5,7 +5,7 @@ "Memory": 2000, "CPUs": 2, "DiskSize": 20000, - "VMDriver": "virtualbox", + "Driver": "virtualbox", "ContainerRuntime": "docker", "HyperkitVpnKitSock": "", "HyperkitVSockPorts": [], diff --git a/pkg/minikube/config/types.go b/pkg/minikube/config/types.go index b05ff2e970a3..6513efd2d99c 100644 --- a/pkg/minikube/config/types.go +++ b/pkg/minikube/config/types.go @@ -39,7 +39,7 @@ type MachineConfig struct { Memory int CPUs int DiskSize int - VMDriver string + Driver string HyperkitVpnKitSock string // Only used by the Hyperkit driver HyperkitVSockPorts []string // Only used by the Hyperkit driver DockerEnv []string // Each entry is formatted as KEY=VALUE. diff --git a/pkg/minikube/driver/install.go b/pkg/minikube/driver/install.go index 2732fe6f36f0..8a49e833faed 100644 --- a/pkg/minikube/driver/install.go +++ b/pkg/minikube/driver/install.go @@ -124,17 +124,17 @@ func validateDriver(executable string, v semver.Version) (string, error) { return path, err } - ev := extractVMDriverVersion(string(output)) + ev := extractDriverVersion(string(output)) if len(ev) == 0 { return path, fmt.Errorf("%s: unable to extract version from %q", executable, output) } - vmDriverVersion, err := semver.Make(ev) + driverVersion, err := semver.Make(ev) if err != nil { return path, errors.Wrap(err, "can't parse driver version") } - if vmDriverVersion.LT(v) { - return path, fmt.Errorf("%s is version %s, want %s", executable, vmDriverVersion, v) + if driverVersion.LT(v) { + return path, fmt.Errorf("%s is version %s, want %s", executable, driverVersion, v) } return path, nil } @@ -164,12 +164,12 @@ func download(name string, destination string, v semver.Version) error { return os.Chmod(destination, 0755) } -// extractVMDriverVersion extracts the driver version. +// extractDriverVersion extracts the driver version. // KVM and Hyperkit drivers support the 'version' command, that display the information as: // version: vX.X.X // commit: XXXX // This method returns the version 'vX.X.X' or empty if the version isn't found. -func extractVMDriverVersion(s string) string { +func extractDriverVersion(s string) string { versionRegex := regexp.MustCompile(`version:(.*)`) matches := versionRegex.FindStringSubmatch(s) diff --git a/pkg/minikube/driver/install_test.go b/pkg/minikube/driver/install_test.go index f57e1f541e3b..6cd8cd010d95 100644 --- a/pkg/minikube/driver/install_test.go +++ b/pkg/minikube/driver/install_test.go @@ -20,25 +20,25 @@ import ( "testing" ) -func TestExtractVMDriverVersion(t *testing.T) { - v := extractVMDriverVersion("") +func TestExtractDriverVersion(t *testing.T) { + v := extractDriverVersion("") if len(v) != 0 { t.Error("Expected empty string") } - v = extractVMDriverVersion("random text") + v = extractDriverVersion("random text") if len(v) != 0 { t.Error("Expected empty string") } expectedVersion := "1.2.3" - v = extractVMDriverVersion("version: v1.2.3") + v = extractDriverVersion("version: v1.2.3") if expectedVersion != v { t.Errorf("Expected version: %s, got: %s", expectedVersion, v) } - v = extractVMDriverVersion("version: 1.2.3") + v = extractDriverVersion("version: 1.2.3") if expectedVersion != v { t.Errorf("Expected version: %s, got: %s", expectedVersion, v) } diff --git a/pkg/minikube/machine/cache_images.go b/pkg/minikube/machine/cache_images.go index 3e426a90c820..29d61b244fa3 100644 --- a/pkg/minikube/machine/cache_images.go +++ b/pkg/minikube/machine/cache_images.go @@ -31,7 +31,6 @@ import ( "golang.org/x/sync/errgroup" "k8s.io/minikube/pkg/minikube/assets" "k8s.io/minikube/pkg/minikube/bootstrapper" - "k8s.io/minikube/pkg/minikube/cluster" "k8s.io/minikube/pkg/minikube/command" "k8s.io/minikube/pkg/minikube/config" "k8s.io/minikube/pkg/minikube/constants" @@ -139,7 +138,7 @@ func CacheAndLoadImages(images []string) error { } for _, p := range profiles { // loading images to all running profiles pName := p.Name // capture the loop variable - status, err := cluster.GetHostStatus(api, pName) + status, err := GetHostStatus(api, pName) if err != nil { glog.Warningf("skipping loading cache for profile %s", pName) glog.Errorf("error getting status for %s: %v", pName, err) diff --git a/pkg/minikube/cluster/cluster_test.go b/pkg/minikube/machine/cluster_test.go similarity index 97% rename from pkg/minikube/cluster/cluster_test.go rename to pkg/minikube/machine/cluster_test.go index 4c81ed58b6a6..bf38656062a3 100644 --- a/pkg/minikube/cluster/cluster_test.go +++ b/pkg/minikube/machine/cluster_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package cluster +package machine import ( "fmt" @@ -61,7 +61,7 @@ func RegisterMockDriver(t *testing.T) { } var defaultMachineConfig = config.MachineConfig{ - VMDriver: driver.Mock, + Driver: driver.Mock, MinikubeISO: constants.DefaultISOURL, Downloader: MockDownloader{}, DockerEnv: []string{"MOCK_MAKE_IT_PROVISION=true"}, @@ -262,7 +262,7 @@ func TestStartHostConfig(t *testing.T) { provision.SetDetector(md) config := config.MachineConfig{ - VMDriver: driver.Mock, + Driver: driver.Mock, DockerEnv: []string{"FOO=BAR"}, DockerOpt: []string{"param=value"}, Downloader: MockDownloader{}, @@ -290,7 +290,7 @@ func TestStartHostConfig(t *testing.T) { func TestStopHostError(t *testing.T) { RegisterMockDriver(t) api := tests.NewMockAPI(t) - if err := StopHost(api); err == nil { + if err := StopHost(api, viper.GetString("profile")); err == nil { t.Fatal("An error should be thrown when stopping non-existing machine.") } } @@ -303,7 +303,7 @@ func TestStopHost(t *testing.T) { t.Errorf("createHost failed: %v", err) } - if err := StopHost(api); err != nil { + if err := StopHost(api, viper.GetString("profile")); err != nil { t.Fatal("An error should be thrown when stopping non-existing machine.") } if s, _ := h.Driver.GetState(); s != state.Stopped { @@ -389,7 +389,7 @@ func TestGetHostStatus(t *testing.T) { checkState(state.Running.String()) - if err := StopHost(api); err != nil { + if err := StopHost(api, viper.GetString("profile")); err != nil { t.Errorf("StopHost failed: %v", err) } checkState(state.Stopped.String()) diff --git a/pkg/minikube/cluster/delete.go b/pkg/minikube/machine/delete.go similarity index 96% rename from pkg/minikube/cluster/delete.go rename to pkg/minikube/machine/delete.go index f11f0e4c25f5..9a7fa00a815b 100644 --- a/pkg/minikube/cluster/delete.go +++ b/pkg/minikube/machine/delete.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package cluster +package machine import ( "os/exec" @@ -43,7 +43,7 @@ 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 + // Keep going even if minikube does not know about the host } // Get the status of the host. Ensure that it exists before proceeding ahead. diff --git a/pkg/minikube/cluster/filesync.go b/pkg/minikube/machine/filesync.go similarity index 97% rename from pkg/minikube/cluster/filesync.go rename to pkg/minikube/machine/filesync.go index 6bf4559335ee..fba2ba5c2c2c 100644 --- a/pkg/minikube/cluster/filesync.go +++ b/pkg/minikube/machine/filesync.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package cluster +package machine import ( "fmt" @@ -62,7 +62,7 @@ func localAssets() ([]assets.CopyableFile, error) { return fs, nil } -// assetsFromDir generates assets from a local filepath, with/without a flattened hierarchy +// AssetsFromDir generates assets from a local filepath, with/without a flattened hierarchy func assetsFromDir(localRoot string, destRoot string, flatten bool) ([]assets.CopyableFile, error) { glog.Infof("Scanning %s for local assets ...", localRoot) fs := []assets.CopyableFile{} diff --git a/pkg/minikube/cluster/filesync_test.go b/pkg/minikube/machine/filesync_test.go similarity index 99% rename from pkg/minikube/cluster/filesync_test.go rename to pkg/minikube/machine/filesync_test.go index 5898afbf6692..c3ad3308179e 100644 --- a/pkg/minikube/cluster/filesync_test.go +++ b/pkg/minikube/machine/filesync_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package cluster +package machine import ( "io/ioutil" diff --git a/pkg/minikube/cluster/fix.go b/pkg/minikube/machine/fix.go similarity index 93% rename from pkg/minikube/cluster/fix.go rename to pkg/minikube/machine/fix.go index 061be57c40fe..2a69a37472ca 100644 --- a/pkg/minikube/cluster/fix.go +++ b/pkg/minikube/machine/fix.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package cluster +package machine import ( "fmt" @@ -101,9 +101,9 @@ func fixHost(api libmachine.API, mc config.MachineConfig) (*host.Host, error) { } 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}) + out.T(out.Running, `Using the running {{.driver_name}} "{{.profile_name}}" VM ...`, out.V{"driver_name": mc.Driver, "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}) + out.T(out.Restarting, `Starting existing {{.driver_name}} VM for "{{.profile_name}}" ...`, out.V{"driver_name": mc.Driver, "profile_name": mc.Name}) if err := h.Driver.Start(); err != nil { return h, errors.Wrap(err, "driver start") } @@ -142,7 +142,7 @@ func fixHost(api libmachine.API, mc config.MachineConfig) (*host.Host, error) { if err := h.ConfigureAuth(); err != nil { return h, &retry.RetriableError{Err: errors.Wrap(err, "Error configuring auth on host")} } - return h, ensureSyncedGuestClock(h, mc.VMDriver) + return h, ensureSyncedGuestClock(h, mc.Driver) } // ensureGuestClockSync ensures that the guest system clock is relatively in-sync @@ -198,10 +198,10 @@ func adjustGuestClock(h hostRunner, t time.Time) error { // machineExists checks if virtual machine does not exist // if the virtual machine exists, return true -func machineExists(vmDriver string, s state.State, err error) (bool, error) { - switch vmDriver { +func machineExists(d string, s state.State, err error) (bool, error) { + switch d { case driver.HyperKit: - if s == state.Stopped || err.Error() == "connection is shut down" { + if s == state.None || (err != nil && err.Error() == "connection is shut down") { return false, ErrorMachineNotExist } return true, err @@ -211,17 +211,17 @@ func machineExists(vmDriver string, s state.State, err error) (bool, error) { } return true, err case driver.KVM2: - if s == state.None || s == state.Stopped { + if s == state.None { return false, ErrorMachineNotExist } return true, err case driver.None: - if s == state.Stopped { + if s == state.None { return false, ErrorMachineNotExist } return true, err case driver.Parallels: - if err.Error() == "machine does not exist" { + if err != nil && err.Error() == "machine does not exist" { return false, ErrorMachineNotExist } return true, err @@ -231,12 +231,12 @@ func machineExists(vmDriver string, s state.State, err error) (bool, error) { } return true, err case driver.VMware: - if s == state.None || s == state.Stopped { + if s == state.None { return false, ErrorMachineNotExist } return true, err case driver.VMwareFusion: - if s == state.Stopped { + if s == state.None { return false, ErrorMachineNotExist } return true, err diff --git a/pkg/minikube/cluster/info.go b/pkg/minikube/machine/info.go similarity index 66% rename from pkg/minikube/cluster/info.go rename to pkg/minikube/machine/info.go index cad29adb160c..99330d38502e 100644 --- a/pkg/minikube/cluster/info.go +++ b/pkg/minikube/machine/info.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package cluster +package machine import ( "io/ioutil" @@ -25,8 +25,6 @@ import ( "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" ) @@ -97,22 +95,3 @@ func logRemoteOsRelease(drv drivers.Driver) { 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}) - } - return - } - 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}) - } - return - } - 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}) -} diff --git a/pkg/minikube/machine/machine.go b/pkg/minikube/machine/machine.go index cd29bb715fc7..7295b33dabc8 100644 --- a/pkg/minikube/machine/machine.go +++ b/pkg/minikube/machine/machine.go @@ -20,10 +20,13 @@ import ( "io/ioutil" "path/filepath" + "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" - "k8s.io/minikube/pkg/minikube/cluster" + "github.com/spf13/viper" + "k8s.io/minikube/pkg/minikube/config" "k8s.io/minikube/pkg/minikube/localpath" ) @@ -90,7 +93,7 @@ func Load(name string) (*Machine, error) { return nil, err } - h, err := cluster.CheckIfHostExistsAndLoad(api, name) + h, err := CheckIfHostExistsAndLoad(api, name) if err != nil { return nil, err } @@ -119,3 +122,27 @@ func machineDirs(miniHome ...string) (dirs []string, err error) { } return dirs, err } + +// 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...) +} diff --git a/pkg/minikube/cluster/start.go b/pkg/minikube/machine/start.go similarity index 81% rename from pkg/minikube/cluster/start.go rename to pkg/minikube/machine/start.go index c7669e99661b..33687dc151c1 100644 --- a/pkg/minikube/cluster/start.go +++ b/pkg/minikube/machine/start.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package cluster +package machine import ( "encoding/json" @@ -97,22 +97,22 @@ func engineOptions(cfg config.MachineConfig) *engine.Options { } func createHost(api libmachine.API, cfg config.MachineConfig) (*host.Host, error) { - glog.Infof("createHost starting for %q (driver=%q)", cfg.Name, cfg.VMDriver) + glog.Infof("createHost starting for %q (driver=%q)", cfg.Name, cfg.Driver) start := time.Now() defer func() { glog.Infof("createHost completed in %s", time.Since(start)) }() - if cfg.VMDriver == driver.VMwareFusion && viper.GetBool(config.ShowDriverDeprecationNotification) { + if cfg.Driver == 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) + def := registry.Driver(cfg.Driver) if def.Empty() { - return nil, fmt.Errorf("unsupported/missing driver: %s", cfg.VMDriver) + return nil, fmt.Errorf("unsupported/missing driver: %s", cfg.Driver) } dd, err := def.Config(cfg) if err != nil { @@ -123,7 +123,7 @@ func createHost(api libmachine.API, cfg config.MachineConfig) (*host.Host, error return nil, errors.Wrap(err, "marshal") } - h, err := api.NewHost(cfg.VMDriver, data) + h, err := api.NewHost(cfg.Driver, data) if err != nil { return nil, errors.Wrap(err, "new host") } @@ -133,7 +133,7 @@ func createHost(api libmachine.API, cfg config.MachineConfig) (*host.Host, error h.HostOptions.EngineOptions = engineOptions(cfg) cstart := time.Now() - glog.Infof("libmachine.API.Create for %q (driver=%q)", cfg.Name, cfg.VMDriver) + glog.Infof("libmachine.API.Create for %q (driver=%q)", cfg.Name, cfg.Driver) if err := api.Create(h); err != nil { // Wait for all the logs to reach the client time.Sleep(2 * time.Second) @@ -174,10 +174,10 @@ func postStartSetup(h *host.Host, mc config.MachineConfig) error { return errors.Wrapf(err, "sudo mkdir (%s)", h.DriverName) } - if driver.BareMetal(mc.VMDriver) { + if driver.BareMetal(mc.Driver) { showLocalOsRelease() } - if driver.IsVM(mc.VMDriver) { + if driver.IsVM(mc.Driver) { logRemoteOsRelease(h.Driver) } return syncLocalAssets(r) @@ -223,3 +223,22 @@ func acquireMachinesLock(name string) (mutex.Releaser, error) { } return r, err } + +// showHostInfo shows host information +func showHostInfo(cfg config.MachineConfig) { + if driver.BareMetal(cfg.Driver) { + 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}) + } + return + } + if driver.IsKIC(cfg.Driver) { + 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.Driver, "number_of_cpus": cfg.CPUs, "number_of_host_cpus": info.CPUs, "memory_size": cfg.Memory, "host_memory_size": info.Memory}) + } + return + } + 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.Driver, "number_of_cpus": cfg.CPUs, "memory_size": cfg.Memory, "disk_size": cfg.DiskSize}) +} diff --git a/pkg/minikube/cluster/status.go b/pkg/minikube/machine/status.go similarity index 99% rename from pkg/minikube/cluster/status.go rename to pkg/minikube/machine/status.go index 889389be4750..141d6a9bd055 100644 --- a/pkg/minikube/cluster/status.go +++ b/pkg/minikube/machine/status.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package cluster +package machine import ( "github.com/docker/machine/libmachine" diff --git a/pkg/minikube/cluster/stop.go b/pkg/minikube/machine/stop.go similarity index 92% rename from pkg/minikube/cluster/stop.go rename to pkg/minikube/machine/stop.go index ba4e717697d5..97931a2b0078 100644 --- a/pkg/minikube/cluster/stop.go +++ b/pkg/minikube/machine/stop.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package cluster +package machine import ( "github.com/docker/machine/libmachine" @@ -23,16 +23,13 @@ import ( "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) +func StopHost(api libmachine.API, machineName string) error { host, err := api.Load(machineName) if err != nil { return errors.Wrapf(err, "load") diff --git a/pkg/minikube/node/cache.go b/pkg/minikube/node/cache.go new file mode 100644 index 000000000000..b1d5ad8d128e --- /dev/null +++ b/pkg/minikube/node/cache.go @@ -0,0 +1,131 @@ +/* +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 node + +import ( + "os" + "runtime" + + "github.com/golang/glog" + "github.com/spf13/viper" + "golang.org/x/sync/errgroup" + cmdcfg "k8s.io/minikube/cmd/minikube/cmd/config" + "k8s.io/minikube/pkg/minikube/config" + "k8s.io/minikube/pkg/minikube/constants" + "k8s.io/minikube/pkg/minikube/exit" + "k8s.io/minikube/pkg/minikube/image" + "k8s.io/minikube/pkg/minikube/localpath" + "k8s.io/minikube/pkg/minikube/machine" + "k8s.io/minikube/pkg/minikube/out" +) + +// beginCacheRequiredImages caches images required for kubernetes version in the background +func beginCacheRequiredImages(g *errgroup.Group, imageRepository string, k8sVersion string) { + if !viper.GetBool("cache-images") { + return + } + + g.Go(func() error { + return machine.CacheImagesForBootstrapper(imageRepository, k8sVersion, viper.GetString(cmdcfg.Bootstrapper)) + }) +} + +func handleDownloadOnly(cacheGroup *errgroup.Group, k8sVersion string) { + // If --download-only, complete the remaining downloads and exit. + if !viper.GetBool("download-only") { + return + } + if err := doCacheBinaries(k8sVersion); err != nil { + exit.WithError("Failed to cache binaries", err) + } + if _, err := CacheKubectlBinary(k8sVersion); err != nil { + exit.WithError("Failed to cache kubectl", err) + } + waitCacheRequiredImages(cacheGroup) + if err := saveImagesToTarFromConfig(); err != nil { + exit.WithError("Failed to cache images to tar", err) + } + out.T(out.Check, "Download complete!") + os.Exit(0) + +} + +// CacheKubectlBinary caches the kubectl binary +func CacheKubectlBinary(k8sVerison string) (string, error) { + binary := "kubectl" + if runtime.GOOS == "windows" { + binary = "kubectl.exe" + } + + return machine.CacheBinary(binary, k8sVerison, runtime.GOOS, runtime.GOARCH) +} + +// doCacheBinaries caches Kubernetes binaries in the foreground +func doCacheBinaries(k8sVersion string) error { + return machine.CacheBinariesForBootstrapper(k8sVersion, viper.GetString(cmdcfg.Bootstrapper)) +} + +// waitCacheRequiredImages blocks until the required images are all cached. +func waitCacheRequiredImages(g *errgroup.Group) { + if !viper.GetBool(cacheImages) { + return + } + if err := g.Wait(); err != nil { + glog.Errorln("Error caching images: ", err) + } +} + +// saveImagesToTarFromConfig saves images to tar in cache which specified in config file. +// currently only used by download-only option +func saveImagesToTarFromConfig() error { + images, err := imagesInConfigFile() + if err != nil { + return err + } + if len(images) == 0 { + return nil + } + return image.SaveToDir(images, constants.ImageCacheDir) +} + +func imagesInConfigFile() ([]string, error) { + configFile, err := config.ReadConfig(localpath.ConfigFile) + if err != nil { + return nil, err + } + if values, ok := configFile[cacheImageConfigKey]; ok { + var images []string + for key := range values.(map[string]interface{}) { + images = append(images, key) + } + return images, nil + } + return []string{}, nil +} + +// CacheAndLoadImagesInConfig loads the images currently in the config file +// called by 'start' and 'cache reload' commands. +func CacheAndLoadImagesInConfig() error { + images, err := imagesInConfigFile() + if err != nil { + return err + } + if len(images) == 0 { + return nil + } + return machine.CacheAndLoadImages(images) +} diff --git a/pkg/minikube/node/config.go b/pkg/minikube/node/config.go new file mode 100644 index 000000000000..ba4c7f52751d --- /dev/null +++ b/pkg/minikube/node/config.go @@ -0,0 +1,156 @@ +/* +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 node + +import ( + "fmt" + "os" + "os/exec" + "path/filepath" + "strconv" + "strings" + + "github.com/docker/machine/libmachine" + "github.com/docker/machine/libmachine/host" + "github.com/golang/glog" + "github.com/spf13/viper" + cmdcfg "k8s.io/minikube/cmd/minikube/cmd/config" + "k8s.io/minikube/pkg/minikube/bootstrapper" + "k8s.io/minikube/pkg/minikube/cluster" + "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" + "k8s.io/minikube/pkg/minikube/localpath" + "k8s.io/minikube/pkg/minikube/out" + "k8s.io/minikube/pkg/util/lock" +) + +var ( + DockerEnv []string + DockerOpt []string + ExtraOptions config.ExtraOptionSlice + AddonList []string +) + +// configureRuntimes does what needs to happen to get a runtime going. +func configureRuntimes(runner cruntime.CommandRunner, drvName string, k8s config.KubernetesConfig) cruntime.Manager { + config := cruntime.Config{Type: viper.GetString(containerRuntime), Runner: runner, ImageRepository: k8s.ImageRepository, KubernetesVersion: k8s.KubernetesVersion} + cr, err := cruntime.New(config) + if err != nil { + exit.WithError("Failed runtime", err) + } + + disableOthers := true + if driver.BareMetal(drvName) { + disableOthers = false + } + err = cr.Enable(disableOthers) + if err != nil { + exit.WithError("Failed to enable container runtime", err) + } + + return cr +} + +func showVersionInfo(k8sVersion string, cr cruntime.Manager) { + version, _ := cr.Version() + out.T(cr.Style(), "Preparing Kubernetes {{.k8sVersion}} on {{.runtime}} {{.runtimeVersion}} ...", out.V{"k8sVersion": k8sVersion, "runtime": cr.Name(), "runtimeVersion": version}) + for _, v := range DockerOpt { + out.T(out.Option, "opt {{.docker_option}}", out.V{"docker_option": v}) + } + for _, v := range DockerEnv { + out.T(out.Option, "env {{.docker_env}}", out.V{"docker_env": v}) + } +} + +// setupKubeAdm adds any requested files into the VM before Kubernetes is started +func setupKubeAdm(mAPI libmachine.API, cfg config.MachineConfig, node config.Node) bootstrapper.Bootstrapper { + bs, err := cluster.Bootstrapper(mAPI, viper.GetString(cmdcfg.Bootstrapper)) + if err != nil { + exit.WithError("Failed to get bootstrapper", err) + } + for _, eo := range ExtraOptions { + out.T(out.Option, "{{.extra_option_component_name}}.{{.key}}={{.value}}", out.V{"extra_option_component_name": eo.Component, "key": eo.Key, "value": eo.Value}) + } + // Loads cached images, generates config files, download binaries + if err := bs.UpdateCluster(cfg); err != nil { + exit.WithError("Failed to update cluster", err) + } + if err := bs.SetupCerts(cfg.KubernetesConfig, node); err != nil { + exit.WithError("Failed to setup certs", err) + } + return bs +} + +func setupKubeconfig(h *host.Host, c *config.MachineConfig, n *config.Node, clusterName string) (*kubeconfig.Settings, error) { + addr, err := h.Driver.GetURL() + if err != nil { + exit.WithError("Failed to get driver URL", err) + } + if !driver.IsKIC(h.DriverName) { + addr = strings.Replace(addr, "tcp://", "https://", -1) + addr = strings.Replace(addr, ":2376", ":"+strconv.Itoa(n.Port), -1) + } + + if c.KubernetesConfig.APIServerName != constants.APIServerName { + addr = strings.Replace(addr, n.IP, c.KubernetesConfig.APIServerName, -1) + } + kcs := &kubeconfig.Settings{ + ClusterName: clusterName, + ClusterServerAddress: addr, + ClientCertificate: localpath.MakeMiniPath("client.crt"), + ClientKey: localpath.MakeMiniPath("client.key"), + CertificateAuthority: localpath.MakeMiniPath("ca.crt"), + KeepContext: viper.GetBool(keepContext), + EmbedCerts: viper.GetBool(embedCerts), + } + + kcs.SetPath(kubeconfig.PathFromEnv()) + if err := kubeconfig.Update(kcs); err != nil { + return kcs, err + } + return kcs, nil +} + +// configureMounts configures any requested filesystem mounts +func configureMounts() { + if !viper.GetBool(createMount) { + return + } + + out.T(out.Mounting, "Creating mount {{.name}} ...", out.V{"name": viper.GetString(mountString)}) + path := os.Args[0] + mountDebugVal := 0 + if glog.V(8) { + mountDebugVal = 1 + } + mountCmd := exec.Command(path, "mount", fmt.Sprintf("--v=%d", mountDebugVal), viper.GetString(mountString)) + mountCmd.Env = append(os.Environ(), constants.IsMinikubeChildProcess+"=true") + if glog.V(8) { + mountCmd.Stdout = os.Stdout + mountCmd.Stderr = os.Stderr + } + if err := mountCmd.Start(); err != nil { + exit.WithError("Error starting mount", err) + } + if err := lock.WriteFile(filepath.Join(localpath.MiniPath(), constants.MountProcessFileName), []byte(strconv.Itoa(mountCmd.Process.Pid)), 0644); err != nil { + exit.WithError("Error writing mount pid", err) + } +} diff --git a/pkg/minikube/node/machine.go b/pkg/minikube/node/machine.go new file mode 100644 index 000000000000..d66e61510ebd --- /dev/null +++ b/pkg/minikube/node/machine.go @@ -0,0 +1,184 @@ +/* +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 node + +import ( + "fmt" + "net" + "os" + "os/exec" + "strings" + "time" + + "github.com/docker/machine/libmachine" + "github.com/docker/machine/libmachine/host" + "github.com/golang/glog" + "github.com/spf13/viper" + "k8s.io/minikube/pkg/minikube/bootstrapper/images" + "k8s.io/minikube/pkg/minikube/command" + "k8s.io/minikube/pkg/minikube/config" + "k8s.io/minikube/pkg/minikube/driver" + "k8s.io/minikube/pkg/minikube/exit" + "k8s.io/minikube/pkg/minikube/machine" + "k8s.io/minikube/pkg/minikube/out" + "k8s.io/minikube/pkg/minikube/proxy" + "k8s.io/minikube/pkg/util/retry" +) + +func startMachine(cfg *config.MachineConfig, node *config.Node) (runner command.Runner, preExists bool, machineAPI libmachine.API, host *host.Host) { + m, err := machine.NewAPIClient() + if err != nil { + exit.WithError("Failed to get machine client", err) + } + host, preExists = startHost(m, *cfg) + runner, err = machine.CommandRunner(host) + if err != nil { + exit.WithError("Failed to get command runner", err) + } + + ip := validateNetwork(host, runner) + + // Bypass proxy for minikube's vm host ip + err = proxy.ExcludeIP(ip) + if err != nil { + out.ErrT(out.FailureType, "Failed to set NO_PROXY Env. Please use `export NO_PROXY=$NO_PROXY,{{.ip}}`.", out.V{"ip": ip}) + } + // Save IP to configuration file for subsequent use + node.IP = ip + + if err := Save(cfg, node); err != nil { + exit.WithError("Failed to save config", err) + } + + return runner, preExists, m, host +} + +// startHost starts a new minikube host using a VM or None +func startHost(api libmachine.API, mc config.MachineConfig) (*host.Host, bool) { + exists, err := api.Exists(mc.Name) + if err != nil { + exit.WithError("Failed to check if machine exists", err) + } + + host, err := machine.StartHost(api, mc) + if err != nil { + exit.WithError("Unable to start VM. Please investigate and run 'minikube delete' if possible", err) + } + return host, exists +} + +// validateNetwork tries to catch network problems as soon as possible +func validateNetwork(h *host.Host, r command.Runner) string { + ip, err := h.Driver.GetIP() + if err != nil { + exit.WithError("Unable to get VM IP address", err) + } + + optSeen := false + warnedOnce := false + for _, k := range proxy.EnvVars { + if v := os.Getenv(k); v != "" { + if !optSeen { + out.T(out.Internet, "Found network options:") + optSeen = true + } + out.T(out.Option, "{{.key}}={{.value}}", out.V{"key": k, "value": v}) + ipExcluded := proxy.IsIPExcluded(ip) // Skip warning if minikube ip is already in NO_PROXY + k = strings.ToUpper(k) // for http_proxy & https_proxy + if (k == "HTTP_PROXY" || k == "HTTPS_PROXY") && !ipExcluded && !warnedOnce { + out.WarningT("You appear to be using a proxy, but your NO_PROXY environment does not include the minikube IP ({{.ip_address}}). Please see {{.documentation_url}} for more details", out.V{"ip_address": ip, "documentation_url": "https://minikube.sigs.k8s.io/docs/reference/networking/proxy/"}) + warnedOnce = true + } + } + } + + if !driver.BareMetal(h.Driver.DriverName()) && !driver.IsKIC(h.Driver.DriverName()) { + trySSH(h, ip) + } + + tryLookup(r) + tryRegistry(r) + return ip +} + +func trySSH(h *host.Host, ip string) { + if viper.GetBool("force") { + return + } + + sshAddr := net.JoinHostPort(ip, "22") + + dial := func() (err error) { + d := net.Dialer{Timeout: 3 * time.Second} + conn, err := d.Dial("tcp", sshAddr) + if err != nil { + out.WarningT("Unable to verify SSH connectivity: {{.error}}. Will retry...", out.V{"error": err}) + return err + } + _ = conn.Close() + return nil + } + + if err := retry.Expo(dial, time.Second, 13*time.Second); err != nil { + exit.WithCodeT(exit.IO, `minikube is unable to connect to the VM: {{.error}} + + This is likely due to one of two reasons: + + - VPN or firewall interference + - {{.hypervisor}} network configuration issue + + Suggested workarounds: + + - Disable your local VPN or firewall software + - Configure your local VPN or firewall to allow access to {{.ip}} + - Restart or reinstall {{.hypervisor}} + - Use an alternative --vm-driver + - Use --force to override this connectivity check + `, out.V{"error": err, "hypervisor": h.Driver.DriverName(), "ip": ip}) + } +} + +func tryLookup(r command.Runner) { + // DNS check + 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") + opts := []string{"-sS"} + if proxy != "" && !strings.HasPrefix(proxy, "localhost") && !strings.HasPrefix(proxy, "127.0") { + opts = append([]string{"-x", proxy}, opts...) + } + + repo := viper.GetString(imageRepository) + if repo == "" { + repo = images.DefaultKubernetesRepo + } + + opts = append(opts, fmt.Sprintf("https://%s/", repo)) + if rr, err := r.RunCmd(exec.Command("curl", opts...)); err != nil { + glog.Warningf("%s failed: %v", rr.Args, err) + out.WarningT("VM is unable to access {{.repository}}, you may need to configure a proxy or set --image-repository", out.V{"repository": repo}) + } +} diff --git a/pkg/minikube/node/node.go b/pkg/minikube/node/node.go new file mode 100644 index 000000000000..19b51d1770b2 --- /dev/null +++ b/pkg/minikube/node/node.go @@ -0,0 +1,123 @@ +/* +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 ( + "errors" + + "github.com/spf13/viper" + "k8s.io/minikube/pkg/minikube/config" + "k8s.io/minikube/pkg/minikube/machine" +) + +const ( + imageRepository = "image-repository" + cacheImages = "cache-images" + waitUntilHealthy = "wait" + cacheImageConfigKey = "cache" + containerRuntime = "container-runtime" + embedCerts = "embed-certs" + keepContext = "keep-context" + mountString = "mount-string" + createMount = "mount" + waitTimeout = "wait-timeout" +) + +// Add adds a new node config to an existing cluster. +func Add(cc *config.MachineConfig, name string, controlPlane bool, worker bool, k8sVersion string, profileName string) (*config.Node, error) { + n := config.Node{ + Name: name, + Worker: true, + } + + if controlPlane { + n.ControlPlane = true + } + + if worker { + n.Worker = true + } + + if k8sVersion != "" { + n.KubernetesVersion = k8sVersion + } else { + n.KubernetesVersion = cc.KubernetesConfig.KubernetesVersion + } + + cc.Nodes = append(cc.Nodes, n) + err := config.SaveProfile(profileName, cc) + if err != nil { + return nil, err + } + + _, err = Start(*cc, n, false, nil) + return &n, err +} + +// Delete stops and deletes the given node from the given cluster +func Delete(cc config.MachineConfig, name string) error { + _, index, err := Retrieve(&cc, name) + if err != nil { + return err + } + + /*err = Stop(cc, nd) + if err != nil { + glog.Warningf("Failed to stop node %s. Will still try to delete.", name) + }*/ + + api, err := machine.NewAPIClient() + if err != nil { + return err + } + + err = machine.DeleteHost(api, name) + if err != nil { + return err + } + + cc.Nodes = append(cc.Nodes[:index], cc.Nodes[index+1:]...) + return config.SaveProfile(viper.GetString(config.MachineProfile), &cc) +} + +// Retrieve finds the node by name in the given cluster +func Retrieve(cc *config.MachineConfig, name string) (*config.Node, int, error) { + for i, n := range cc.Nodes { + if n.Name == name { + return &n, i, nil + } + } + + return nil, -1, errors.New("Could not find node " + name) +} + +// Save saves a node to a cluster +func Save(cfg *config.MachineConfig, node *config.Node) error { + update := false + for i, n := range cfg.Nodes { + if n.Name == node.Name { + cfg.Nodes[i] = *node + update = true + break + } + } + + if !update { + cfg.Nodes = append(cfg.Nodes, *node) + } + return config.SaveProfile(viper.GetString(config.MachineProfile), cfg) +} diff --git a/pkg/minikube/node/start.go b/pkg/minikube/node/start.go new file mode 100644 index 000000000000..07d14d452596 --- /dev/null +++ b/pkg/minikube/node/start.go @@ -0,0 +1,129 @@ +/* +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 node + +import ( + "os" + + "github.com/spf13/viper" + "golang.org/x/sync/errgroup" + "k8s.io/minikube/pkg/addons" + "k8s.io/minikube/pkg/minikube/config" + "k8s.io/minikube/pkg/minikube/driver" + "k8s.io/minikube/pkg/minikube/exit" + "k8s.io/minikube/pkg/minikube/kubeconfig" + "k8s.io/minikube/pkg/minikube/localpath" + "k8s.io/minikube/pkg/minikube/logs" + "k8s.io/minikube/pkg/minikube/out" + "k8s.io/minikube/pkg/util" +) + +// Start spins up a guest and starts the kubernetes node. +func Start(mc config.MachineConfig, n config.Node, primary bool, existingAddons map[string]bool) (*kubeconfig.Settings, error) { + // Now that the ISO is downloaded, pull images in the background while the VM boots. + var cacheGroup errgroup.Group + beginCacheRequiredImages(&cacheGroup, mc.KubernetesConfig.ImageRepository, n.KubernetesVersion) + + // Abstraction leakage alert: startHost requires the config to be saved, to satistfy pkg/provision/buildroot. + // Hence, saveConfig must be called before startHost, and again afterwards when we know the IP. + if err := config.SaveProfile(viper.GetString(config.MachineProfile), &mc); err != nil { + exit.WithError("Failed to save config", err) + } + + k8sVersion := mc.KubernetesConfig.KubernetesVersion + driverName := mc.Driver + // exits here in case of --download-only option. + handleDownloadOnly(&cacheGroup, k8sVersion) + mRunner, preExists, machineAPI, host := startMachine(&mc, &n) + defer machineAPI.Close() + // configure the runtime (docker, containerd, crio) + cr := configureRuntimes(mRunner, driverName, mc.KubernetesConfig) + showVersionInfo(k8sVersion, cr) + waitCacheRequiredImages(&cacheGroup) + + //TODO(sharifelgamal): Part out the cluster-wide operations, perhaps using the "primary" param + + // Must be written before bootstrap, otherwise health checks may flake due to stale IP + kubeconfig, err := setupKubeconfig(host, &mc, &n, mc.Name) + if err != nil { + exit.WithError("Failed to setup kubeconfig", err) + } + + // setup kubeadm (must come after setupKubeconfig) + bs := setupKubeAdm(machineAPI, mc, n) + + // pull images or restart cluster + out.T(out.Launch, "Launching Kubernetes ... ") + if err := bs.StartCluster(mc); err != nil { + exit.WithLogEntries("Error starting cluster", err, logs.FindProblems(cr, bs, mRunner)) + } + configureMounts() + + // enable addons, both old and new! + ea := map[string]bool{} + if existingAddons != nil { + ea = existingAddons + } + addons.Start(viper.GetString(config.MachineProfile), ea, AddonList) + + if err = CacheAndLoadImagesInConfig(); err != nil { + out.T(out.FailureType, "Unable to load cached images from config file.") + } + + // special ops for none , like change minikube directory. + if driverName == driver.None { + prepareNone() + } + + // Skip pre-existing, because we already waited for health + if viper.GetBool(waitUntilHealthy) && !preExists { + if err := bs.WaitForCluster(mc, viper.GetDuration(waitTimeout)); err != nil { + exit.WithError("Wait failed", err) + } + } + + return kubeconfig, nil +} + +// prepareNone prepares the user and host for the joy of the "none" driver +func prepareNone() { + out.T(out.StartingNone, "Configuring local host environment ...") + if viper.GetBool(config.WantNoneDriverWarning) { + out.T(out.Empty, "") + out.WarningT("The 'none' driver provides limited isolation and may reduce system security and reliability.") + out.WarningT("For more information, see:") + out.T(out.URL, "https://minikube.sigs.k8s.io/docs/reference/drivers/none/") + out.T(out.Empty, "") + } + + if os.Getenv("CHANGE_MINIKUBE_NONE_USER") == "" { + home := os.Getenv("HOME") + out.WarningT("kubectl and minikube configuration will be stored in {{.home_folder}}", out.V{"home_folder": home}) + out.WarningT("To use kubectl or minikube commands as your own user, you may need to relocate them. For example, to overwrite your own settings, run:") + + out.T(out.Empty, "") + out.T(out.Command, "sudo mv {{.home_folder}}/.kube {{.home_folder}}/.minikube $HOME", out.V{"home_folder": home}) + out.T(out.Command, "sudo chown -R $USER $HOME/.kube $HOME/.minikube") + out.T(out.Empty, "") + + out.T(out.Tip, "This can also be done automatically by setting the env var CHANGE_MINIKUBE_NONE_USER=true") + } + + if err := util.MaybeChownDirRecursiveToMinikubeUser(localpath.MiniPath()); err != nil { + exit.WithCodeT(exit.Permissions, "Failed to change permissions for {{.minikube_dir_path}}: {{.error}}", out.V{"minikube_dir_path": localpath.MiniPath(), "error": err}) + } +} diff --git a/pkg/minikube/service/service.go b/pkg/minikube/service/service.go index 7f6c64663ffd..8a695f70721c 100644 --- a/pkg/minikube/service/service.go +++ b/pkg/minikube/service/service.go @@ -38,8 +38,8 @@ import ( typed_core "k8s.io/client-go/kubernetes/typed/core/v1" "k8s.io/client-go/tools/clientcmd" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" - "k8s.io/minikube/pkg/minikube/cluster" "k8s.io/minikube/pkg/minikube/config" + "k8s.io/minikube/pkg/minikube/machine" "k8s.io/minikube/pkg/minikube/out" "k8s.io/minikube/pkg/minikube/proxy" "k8s.io/minikube/pkg/util/retry" @@ -119,7 +119,7 @@ type URLs []SvcURL // GetServiceURLs returns a SvcURL object for every service in a particular namespace. // Accepts a template for formatting func GetServiceURLs(api libmachine.API, namespace string, t *template.Template) (URLs, error) { - host, err := cluster.CheckIfHostExistsAndLoad(api, viper.GetString(config.MachineProfile)) + host, err := machine.CheckIfHostExistsAndLoad(api, viper.GetString(config.MachineProfile)) if err != nil { return nil, err } @@ -155,7 +155,7 @@ func GetServiceURLs(api libmachine.API, namespace string, t *template.Template) // GetServiceURLsForService returns a SvcUrl object for a service in a namespace. Supports optional formatting. func GetServiceURLsForService(api libmachine.API, namespace, service string, t *template.Template) (SvcURL, error) { - host, err := cluster.CheckIfHostExistsAndLoad(api, viper.GetString(config.MachineProfile)) + host, err := machine.CheckIfHostExistsAndLoad(api, viper.GetString(config.MachineProfile)) if err != nil { return SvcURL{}, errors.Wrap(err, "Error checking if api exist and loading it") } diff --git a/pkg/minikube/tunnel/cluster_inspector.go b/pkg/minikube/tunnel/cluster_inspector.go index fd1637b7a418..bb86db778ab6 100644 --- a/pkg/minikube/tunnel/cluster_inspector.go +++ b/pkg/minikube/tunnel/cluster_inspector.go @@ -24,8 +24,8 @@ import ( "github.com/docker/machine/libmachine/host" "github.com/docker/machine/libmachine/state" "github.com/pkg/errors" - "k8s.io/minikube/pkg/minikube/cluster" "k8s.io/minikube/pkg/minikube/config" + "k8s.io/minikube/pkg/minikube/machine" "k8s.io/minikube/pkg/util" ) @@ -37,7 +37,7 @@ type clusterInspector struct { func (m *clusterInspector) getStateAndHost() (HostState, *host.Host, error) { - h, err := cluster.CheckIfHostExistsAndLoad(m.machineAPI, m.machineName) + h, err := machine.CheckIfHostExistsAndLoad(m.machineAPI, m.machineName) if err != nil { err = errors.Wrapf(err, "error loading docker-machine host for: %s", m.machineName) diff --git a/test/integration/aaa_download_only_test.go b/test/integration/aaa_download_only_test.go index d253cd7d8e1b..a22212a00f43 100644 --- a/test/integration/aaa_download_only_test.go +++ b/test/integration/aaa_download_only_test.go @@ -126,7 +126,7 @@ func TestDownloadOnly(t *testing.T) { got := "" for _, p := range ps["valid"] { if p.Name == profile { - got = p.Config.VMDriver + got = p.Config.Driver } } diff --git a/test/integration/version_upgrade_test.go b/test/integration/version_upgrade_test.go index f4caae450a82..366d16127440 100644 --- a/test/integration/version_upgrade_test.go +++ b/test/integration/version_upgrade_test.go @@ -37,9 +37,9 @@ import ( pkgutil "k8s.io/minikube/pkg/util" ) -// TestVersionUpgrade downloads latest version of minikube and runs with -// the odlest supported k8s version and then runs the current head minikube -// and it tries to upgrade from the older supported k8s to news supported k8s +// TestVersionUpgrade downloads the latest version of minikube and runs with +// the oldest supported k8s version and then runs the current head minikube +// and tries to upgrade from the oldest supported k8s to newest supported k8s func TestVersionUpgrade(t *testing.T) { MaybeParallel(t) profile := UniqueProfileName("vupgrade") diff --git a/translations/de.json b/translations/de.json index e268a479cf07..441d5f3c701c 100644 --- a/translations/de.json +++ b/translations/de.json @@ -7,8 +7,10 @@ "\"{{.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 podman-env' command": "", "'none' driver does not support 'minikube ssh' command": "", "'{{.driver}}' driver reported an issue: {{.error}}": "", + "'{{.profile}}' is not running": "", "- {{.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 the minikube VM from reaching the internet. You may need to configure it to use a proxy.": "", @@ -24,8 +26,11 @@ "Add an image to local cache.": "", "Add machine IP to NO_PROXY environment variable": "", "Add or delete an image from the local cache.": "", + "Adding node {{.name}} to cluster {{.profile}}": "", "Additional help topics": "", "Additional mount options, such as cache=fscache": "", + "Adds a node to the given cluster config, and starts it.": "", + "Adds a node to the given cluster.": "", "Advanced Commands:": "", "Aliases": "", "Allow user prompts for more information": "", @@ -35,8 +40,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 {{.driver}} driver": "", + "Automatically selected the {{.driver}} driver. Other choices: {{.alternates}}": "", "Available Commands": "", "Basic Commands:": "", "Block until the apiserver is servicing API requests": "", @@ -70,6 +75,7 @@ "Deletes a local kubernetes cluster": "", "Deletes a local kubernetes cluster. This command deletes the VM, and removes all\nassociated files.": "", "Deletes a local kubernetes cluster. This command deletes the VM, and removes all associated files.": "Damit wird ein lokaler Kubernetes-Cluster gelöscht. Mit diesem Befehl wird die VM entfernt und alle zugehörigen Dateien gelöscht.", + "Deletes a node from a cluster.": "", "Deleting \"{{.profile_name}}\" in {{.driver_name}} ...": "{{.profile_name}}\" in {{.driver_name}} wird gelöscht...", "Disable checking for the availability of hardware virtualization before the vm is started (virtualbox driver only)": "Deaktivieren Sie die Überprüfung der Verfügbarkeit der Hardwarevirtualisierung vor dem Starten der VM (nur Virtualbox-Treiber)", "Disable dynamic memory in your VM manager, or pass in a larger --memory value": "", @@ -92,6 +98,7 @@ "Downloading VM boot image ...": "", "Downloading driver {{.driver}}:": "", "Downloading {{.name}} {{.version}}": "", + "ERROR creating `registry-creds-acr` secret": "", "ERROR creating `registry-creds-dpr` secret": "", "ERROR creating `registry-creds-ecr` secret: {{.error}}": "", "ERROR creating `registry-creds-gcr` secret: {{.error}}": "", @@ -112,12 +119,15 @@ "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 adding node to cluster": "", "Error checking driver version: {{.error}}": "Fehler beim Prüfen der Treiberversion: {{.error}}", "Error creating minikube directory": "", "Error creating view template": "", - "Error executing template": "", + "Error detecting shell": "", "Error executing view template": "", "Error finding port for mount": "", + "Error generating set output": "", + "Error generating unset output": "", "Error getting IP": "", "Error getting client": "", "Error getting client: {{.error}}": "", @@ -125,11 +135,13 @@ "Error getting cluster bootstrapper": "", "Error getting config": "", "Error getting host": "", + "Error getting host IP": "", "Error getting host status": "", "Error getting machine logs": "", "Error getting profiles to delete": "", "Error getting service status": "", "Error getting service with namespace: {{.namespace}} and labels {{.labelName}}:{{.addonName}}: {{.error}}": "", + "Error getting ssh client": "", "Error getting the host IP address to use from within the VM": "", "Error host driver ip status": "", "Error killing mount process": "", @@ -138,13 +150,12 @@ "Error loading profile config: {{.error}}": "", "Error loading profile {{.name}}: {{.error}}": "Fehler beim Laden des Profils {{.name}}: {{.error}}", "Error opening service": "", + "Error parsing Driver version: {{.error}}": "Fehler beim Parsen der Driver-Version: {{.error}}", "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 setting shell variables": "", "Error starting cluster": "", "Error starting mount": "", - "Error unsetting shell variables": "", + "Error starting node": "", "Error while setting kubectl current context : {{.error}}": "", "Error writing mount pid": "", "Error: You have selected Kubernetes v{{.new}}, but the existing cluster for your profile is running Kubernetes v{{.old}}. Non-destructive downgrades are not supported, but you can proceed by performing one of the following options:\n\n* Recreate the cluster using Kubernetes v{{.new}}: Run \"minikube delete {{.profile}}\", then \"minikube start {{.profile}} --kubernetes-version={{.new}}\"\n* Create a second cluster with Kubernetes v{{.new}}: Run \"minikube start -p \u003cnew name\u003e --kubernetes-version={{.new}}\"\n* Reuse the existing cluster with Kubernetes v{{.old}} or newer: Run \"minikube start {{.profile}} --kubernetes-version={{.old}}\"": "", @@ -153,6 +164,7 @@ "Examples": "", "Exiting": "Wird beendet", "Exiting.": "", + "External Adapter on which external switch will be created if no external switch is found. (hyperv driver only)": "", "Failed runtime": "", "Failed to cache ISO": "", "Failed to cache and load images": "", @@ -212,11 +224,14 @@ "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, install addons. 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.", + "If true, the added node will be marked for work. Defaults to true.": "", + "If true, the node added will also be a control plane in addition to a worker.": "", "If using the none driver, ensure that systemctl is installed": "", "If you are running minikube within a VM, consider using --vm-driver=none:": "", "Images Commands:": "", @@ -259,6 +274,7 @@ "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": "", + "Node operations": "", "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.": "", @@ -272,6 +288,7 @@ "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": "", + "Operations on nodes": "", "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": "", @@ -296,7 +313,6 @@ "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, verify that VirtualBox is not blocked by your system, and/or use another hypervisor": "", "Rebuild libvirt with virt-network support": "", "Received {{.name}} signal": "", @@ -326,8 +342,6 @@ "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.": "", @@ -335,6 +349,8 @@ "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)'.": "", + "Sets up podman env variables; similar to '$(podman-machine env)'": "", + "Sets up podman env variables; similar to '$(podman-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": "", @@ -352,9 +368,13 @@ "Specify the ip that the mount should be setup on": "", "Specify the mount filesystem type (supported types: 9p)": "", "Starting existing {{.driver_name}} VM for \"{{.profile_name}}\" ...": "", + "Starting node": "", "Starts a local kubernetes cluster": "Startet einen lokalen Kubernetes-Cluster", + "Starts a node.": "", + "Starts an existing stopped node in a cluster.": "", "Stopping \"{{.profile_name}}\" in {{.driver_name}} ...": "", "Stops a local kubernetes cluster running in Virtualbox. This command stops the VM\nitself, leaving all files intact. The cluster can be started again with the \"start\" command.": "", + "Stops a node in a cluster.": "", "Stops a running local kubernetes cluster": "", "Successfully deleted all profiles": "", "Successfully mounted {{.sourcePath}} to {{.destinationPath}}": "", @@ -392,8 +412,7 @@ "The container runtime to be used (docker, crio, containerd).": "", "The cri socket path to be used": "Der zu verwendende Cri-Socket-Pfad", "The cri socket path to be used.": "", - "The docker host is currently not running": "", - "The docker service is currently not active": "", + "The docker service within '{{.profile}}' is 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.": "", @@ -405,9 +424,12 @@ "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 name of the node to add.": "", + "The name of the node to delete": "", "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 podman service within '{{.profile}}' is not active": "", "The service namespace": "", "The services namespace": "", "The time interval for each check that wait performs in seconds": "", @@ -471,6 +493,7 @@ "Usage: minikube completion SHELL": "", "Usage: minikube delete": "", "Usage: minikube delete --all --purge": "", + "Usage: minikube node [add|start|stop|delete]": "", "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": "", @@ -482,6 +505,8 @@ "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 ...": "", + "Using the {{.driver}} driver based on existing profile": "", + "Using the {{.driver}} driver based on user configuration": "", "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.": "", @@ -500,6 +525,7 @@ "Wait until Kubernetes core services are healthy before exiting": "Warten Sie vor dem Beenden, bis die Kerndienste von Kubernetes fehlerfrei arbeiten", "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)", + "Whether to use external switch over Default Switch if virtual switch not explicitly specified. (hyperv 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": "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):": "", "You may need to manually remove the \"{{.name}}\" VM from your hypervisor": "Möglicherweise müssen Sie die VM \"{{.name}}\" manuell von Ihrem Hypervisor entfernen", @@ -518,6 +544,7 @@ "command runner": "", "config modifies minikube config files using subcommands like \"minikube config set vm-driver kvm\"\nConfigurable fields:\\n\\n": "", "config view failed": "", + "creating api client": "", "dashboard service is not running: {{.error}}": "", "disable failed": "", "dry-run mode. Validates configuration, but does not mutate system state": "", @@ -533,18 +560,21 @@ "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": "", + "loading config": "", "logdir set failed": "", + "machine '{{.name}}' does not exist. Proceeding ahead with recreating VM.": "", "max time to wait per Kubernetes core services to be healthy.": "", "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 is unable to connect to the VM: {{.error}}\n\n\tThis is likely due to one of two reasons:\n\n\t- VPN or firewall interference\n\t- {{.hypervisor}} network configuration issue\n\n\tSuggested workarounds:\n\n\t- Disable your local VPN or firewall software\n\t- Configure your local VPN or firewall to allow access to {{.ip}}\n\t- Restart or reinstall {{.hypervisor}}\n\t- Use an alternative --vm-driver\n\t- Use --force to override this connectivity check": "", "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": "", + "name is required": "", "namespaces to pause": "", "namespaces to unpause": "", "not enough arguments ({{.ArgCount}}).\\nusage: minikube config set PROPERTY_NAME PROPERTY_VALUE": "", @@ -552,6 +582,7 @@ "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": "", + "retrieving node": "", "service {{.namespace_name}}/{{.service_name}} has no node port": "", "stat failed": "", "status json failure": "", @@ -585,6 +616,8 @@ "{{.machine}} IP was already correctly configured for {{.ip}}": "", "{{.name}} cluster does not exist": "", "{{.name}} has no available configuration options": "", + "{{.name}} is already running": "", + "{{.name}} is already stopped": "", "{{.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": "", diff --git a/translations/es.json b/translations/es.json index a664dfaae3f7..d16163072bb8 100644 --- a/translations/es.json +++ b/translations/es.json @@ -7,8 +7,10 @@ "\"{{.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 podman-env' command": "", "'none' driver does not support 'minikube ssh' command": "", "'{{.driver}}' driver reported an issue: {{.error}}": "", + "'{{.profile}}' is not running": "", "- {{.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 the minikube VM from reaching the internet. You may need to configure it to use a proxy.": "", @@ -24,8 +26,11 @@ "Add an image to local cache.": "", "Add machine IP to NO_PROXY environment variable": "", "Add or delete an image from the local cache.": "", + "Adding node {{.name}} to cluster {{.profile}}": "", "Additional help topics": "", "Additional mount options, such as cache=fscache": "", + "Adds a node to the given cluster config, and starts it.": "", + "Adds a node to the given cluster.": "", "Advanced Commands:": "", "Aliases": "", "Allow user prompts for more information": "", @@ -35,8 +40,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 {{.driver}} driver": "", + "Automatically selected the {{.driver}} driver. Other choices: {{.alternates}}": "", "Available Commands": "", "Basic Commands:": "", "Block until the apiserver is servicing API requests": "", @@ -70,6 +75,7 @@ "Deletes a local kubernetes cluster": "", "Deletes a local kubernetes cluster. This command deletes the VM, and removes all\nassociated files.": "", "Deletes a local kubernetes cluster. This command deletes the VM, and removes all associated files.": "Elimina un clúster local de Kubernetes. Este comando borra la VM y todos los archivos asociados.", + "Deletes a node from a cluster.": "", "Deleting \"{{.profile_name}}\" in {{.driver_name}} ...": "Eliminando \"{{.profile_name}}\" en {{.driver_name}}...", "Disable checking for the availability of hardware virtualization before the vm is started (virtualbox driver only)": "Permite inhabilitar la comprobación de disponibilidad de la virtualización de hardware antes de iniciar la VM (solo con el controlador de Virtualbox)", "Disable dynamic memory in your VM manager, or pass in a larger --memory value": "", @@ -92,6 +98,7 @@ "Downloading VM boot image ...": "", "Downloading driver {{.driver}}:": "", "Downloading {{.name}} {{.version}}": "", + "ERROR creating `registry-creds-acr` secret": "", "ERROR creating `registry-creds-dpr` secret": "", "ERROR creating `registry-creds-ecr` secret: {{.error}}": "", "ERROR creating `registry-creds-gcr` secret: {{.error}}": "", @@ -112,12 +119,15 @@ "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 adding node to cluster": "", "Error checking driver version: {{.error}}": "No se ha podido comprobar la versión del controlador: {{.error}}", "Error creating minikube directory": "", "Error creating view template": "", - "Error executing template": "", + "Error detecting shell": "", "Error executing view template": "", "Error finding port for mount": "", + "Error generating set output": "", + "Error generating unset output": "", "Error getting IP": "", "Error getting client": "", "Error getting client: {{.error}}": "", @@ -125,11 +135,13 @@ "Error getting cluster bootstrapper": "", "Error getting config": "", "Error getting host": "", + "Error getting host IP": "", "Error getting host status": "", "Error getting machine logs": "", "Error getting profiles to delete": "", "Error getting service status": "", "Error getting service with namespace: {{.namespace}} and labels {{.labelName}}:{{.addonName}}: {{.error}}": "", + "Error getting ssh client": "", "Error getting the host IP address to use from within the VM": "", "Error host driver ip status": "", "Error killing mount process": "", @@ -138,13 +150,12 @@ "Error loading profile config: {{.error}}": "", "Error loading profile {{.name}}: {{.error}}": "No se ha podido cargar el perfil {{.name}}: {{.error}}", "Error opening service": "", + "Error parsing Driver version: {{.error}}": "No se ha podido analizar la versión de Driver: {{.error}}", "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 setting shell variables": "", "Error starting cluster": "", "Error starting mount": "", - "Error unsetting shell variables": "", + "Error starting node": "", "Error while setting kubectl current context : {{.error}}": "", "Error writing mount pid": "", "Error: You have selected Kubernetes v{{.new}}, but the existing cluster for your profile is running Kubernetes v{{.old}}. Non-destructive downgrades are not supported, but you can proceed by performing one of the following options:\n\n* Recreate the cluster using Kubernetes v{{.new}}: Run \"minikube delete {{.profile}}\", then \"minikube start {{.profile}} --kubernetes-version={{.new}}\"\n* Create a second cluster with Kubernetes v{{.new}}: Run \"minikube start -p \u003cnew name\u003e --kubernetes-version={{.new}}\"\n* Reuse the existing cluster with Kubernetes v{{.old}} or newer: Run \"minikube start {{.profile}} --kubernetes-version={{.old}}\"": "", @@ -153,6 +164,7 @@ "Examples": "", "Exiting": "Saliendo", "Exiting.": "", + "External Adapter on which external switch will be created if no external switch is found. (hyperv driver only)": "", "Failed runtime": "", "Failed to cache ISO": "", "Failed to cache and load images": "", @@ -212,11 +224,14 @@ "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, install addons. 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).", + "If true, the added node will be marked for work. Defaults to true.": "", + "If true, the node added will also be a control plane in addition to a worker.": "", "If using the none driver, ensure that systemctl is installed": "", "If you are running minikube within a VM, consider using --vm-driver=none:": "", "Images Commands:": "", @@ -259,6 +274,7 @@ "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": "", + "Node operations": "", "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.": "", @@ -272,6 +288,7 @@ "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": "", + "Operations on nodes": "", "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": "", @@ -296,7 +313,6 @@ "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, verify that VirtualBox is not blocked by your system, and/or use another hypervisor": "", "Rebuild libvirt with virt-network support": "", "Received {{.name}} signal": "", @@ -326,8 +342,6 @@ "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.": "", @@ -335,6 +349,8 @@ "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)'.": "", + "Sets up podman env variables; similar to '$(podman-machine env)'": "", + "Sets up podman env variables; similar to '$(podman-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": "", @@ -352,9 +368,13 @@ "Specify the ip that the mount should be setup on": "", "Specify the mount filesystem type (supported types: 9p)": "", "Starting existing {{.driver_name}} VM for \"{{.profile_name}}\" ...": "", + "Starting node": "", "Starts a local kubernetes cluster": "Inicia un clúster de Kubernetes local", + "Starts a node.": "", + "Starts an existing stopped node in a cluster.": "", "Stopping \"{{.profile_name}}\" in {{.driver_name}} ...": "", "Stops a local kubernetes cluster running in Virtualbox. This command stops the VM\nitself, leaving all files intact. The cluster can be started again with the \"start\" command.": "", + "Stops a node in a cluster.": "", "Stops a running local kubernetes cluster": "", "Successfully deleted all profiles": "", "Successfully mounted {{.sourcePath}} to {{.destinationPath}}": "", @@ -392,8 +412,7 @@ "The container runtime to be used (docker, crio, containerd).": "", "The cri socket path to be used": "La ruta del socket de cri", "The cri socket path to be used.": "", - "The docker host is currently not running": "", - "The docker service is currently not active": "", + "The docker service within '{{.profile}}' is 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.": "", @@ -405,9 +424,12 @@ "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 name of the node to add.": "", + "The name of the node to delete": "", "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 podman service within '{{.profile}}' is not active": "", "The service namespace": "", "The services namespace": "", "The time interval for each check that wait performs in seconds": "", @@ -471,6 +493,7 @@ "Usage: minikube completion SHELL": "", "Usage: minikube delete": "", "Usage: minikube delete --all --purge": "", + "Usage: minikube node [add|start|stop|delete]": "", "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": "", @@ -482,6 +505,8 @@ "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 ...": "", + "Using the {{.driver}} driver based on existing profile": "", + "Using the {{.driver}} driver based on user configuration": "", "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.": "", @@ -500,6 +525,7 @@ "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", "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)", + "Whether to use external switch over Default Switch if virtual switch not explicitly specified. (hyperv 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": "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):": "", "You may need to manually remove the \"{{.name}}\" VM from your hypervisor": "Puede que tengas que retirar manualmente la VM \"{{.name}}\" de tu hipervisor", @@ -518,6 +544,7 @@ "command runner": "", "config modifies minikube config files using subcommands like \"minikube config set vm-driver kvm\"\nConfigurable fields:\\n\\n": "", "config view failed": "", + "creating api client": "", "dashboard service is not running: {{.error}}": "", "disable failed": "", "dry-run mode. Validates configuration, but does not mutate system state": "", @@ -533,18 +560,21 @@ "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": "", + "loading config": "", "logdir set failed": "", + "machine '{{.name}}' does not exist. Proceeding ahead with recreating VM.": "", "max time to wait per Kubernetes core services to be healthy.": "", "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 is unable to connect to the VM: {{.error}}\n\n\tThis is likely due to one of two reasons:\n\n\t- VPN or firewall interference\n\t- {{.hypervisor}} network configuration issue\n\n\tSuggested workarounds:\n\n\t- Disable your local VPN or firewall software\n\t- Configure your local VPN or firewall to allow access to {{.ip}}\n\t- Restart or reinstall {{.hypervisor}}\n\t- Use an alternative --vm-driver\n\t- Use --force to override this connectivity check": "", "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": "", + "name is required": "", "namespaces to pause": "", "namespaces to unpause": "", "not enough arguments ({{.ArgCount}}).\\nusage: minikube config set PROPERTY_NAME PROPERTY_VALUE": "", @@ -552,6 +582,7 @@ "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": "", + "retrieving node": "", "service {{.namespace_name}}/{{.service_name}} has no node port": "", "stat failed": "", "status json failure": "", @@ -585,6 +616,8 @@ "{{.machine}} IP was already correctly configured for {{.ip}}": "", "{{.name}} cluster does not exist": "", "{{.name}} has no available configuration options": "", + "{{.name}} is already running": "", + "{{.name}} is already stopped": "", "{{.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}}", diff --git a/translations/fr.json b/translations/fr.json index ffb83b230b6a..94f3b3185cb6 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -7,8 +7,10 @@ "\"{{.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 podman-env' command": "", "'none' driver does not support 'minikube ssh' command": "", "'{{.driver}}' driver reported an issue: {{.error}}": "", + "'{{.profile}}' is not running": "", "- {{.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 the minikube VM from reaching the internet. You may need to configure it to use a proxy.": "", @@ -24,8 +26,11 @@ "Add an image to local cache.": "", "Add machine IP to NO_PROXY environment variable": "", "Add or delete an image from the local cache.": "", + "Adding node {{.name}} to cluster {{.profile}}": "", "Additional help topics": "", "Additional mount options, such as cache=fscache": "", + "Adds a node to the given cluster config, and starts it.": "", + "Adds a node to the given cluster.": "", "Advanced Commands:": "", "Aliases": "", "Allow user prompts for more information": "", @@ -35,8 +40,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 {{.driver}} driver": "", + "Automatically selected the {{.driver}} driver. Other choices: {{.alternates}}": "", "Available Commands": "", "Basic Commands:": "", "Block until the apiserver is servicing API requests": "", @@ -71,6 +76,7 @@ "Deletes a local kubernetes cluster": "", "Deletes a local kubernetes cluster. This command deletes the VM, and removes all\nassociated files.": "", "Deletes a local kubernetes cluster. This command deletes the VM, and removes all associated files.": "Supprime le cluster Kubernetes local. Cette commande supprime la VM ainsi que tous les fichiers associés.", + "Deletes a node from a cluster.": "", "Deleting \"{{.profile_name}}\" in {{.driver_name}} ...": "Suppression de \"{{.profile_name}}\" dans {{.driver_name}}...", "Disable checking for the availability of hardware virtualization before the vm is started (virtualbox driver only)": "Désactive la vérification de la disponibilité de la virtualisation du matériel avant le démarrage de la VM (pilote virtualbox uniquement).", "Disable dynamic memory in your VM manager, or pass in a larger --memory value": "", @@ -92,6 +98,7 @@ "Downloading VM boot image ...": "", "Downloading driver {{.driver}}:": "", "Downloading {{.name}} {{.version}}": "", + "ERROR creating `registry-creds-acr` secret": "", "ERROR creating `registry-creds-dpr` secret": "", "ERROR creating `registry-creds-ecr` secret: {{.error}}": "", "ERROR creating `registry-creds-gcr` secret: {{.error}}": "", @@ -112,12 +119,15 @@ "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 adding node to cluster": "", "Error checking driver version: {{.error}}": "Erreur lors de la vérification de la version du driver : {{.error}}", "Error creating minikube directory": "", "Error creating view template": "", - "Error executing template": "", + "Error detecting shell": "", "Error executing view template": "", "Error finding port for mount": "", + "Error generating set output": "", + "Error generating unset output": "", "Error getting IP": "", "Error getting client": "", "Error getting client: {{.error}}": "", @@ -125,11 +135,13 @@ "Error getting cluster bootstrapper": "", "Error getting config": "", "Error getting host": "", + "Error getting host IP": "", "Error getting host status": "", "Error getting machine logs": "", "Error getting profiles to delete": "", "Error getting service status": "", "Error getting service with namespace: {{.namespace}} and labels {{.labelName}}:{{.addonName}}: {{.error}}": "", + "Error getting ssh client": "", "Error getting the host IP address to use from within the VM": "", "Error host driver ip status": "", "Error killing mount process": "", @@ -138,13 +150,12 @@ "Error loading profile config: {{.error}}": "", "Error loading profile {{.name}}: {{.error}}": "Erreur lors du chargement du profil {{.name}} : {{.error}}", "Error opening service": "", + "Error parsing Driver version: {{.error}}": "Erreur lors de l'analyse de la version du pilote de la VM : {{.error}}", "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 setting shell variables": "", "Error starting cluster": "", "Error starting mount": "", - "Error unsetting shell variables": "", + "Error starting node": "", "Error while setting kubectl current context : {{.error}}": "", "Error writing mount pid": "", "Error: You have selected Kubernetes v{{.new}}, but the existing cluster for your profile is running Kubernetes v{{.old}}. Non-destructive downgrades are not supported, but you can proceed by performing one of the following options:\n\n* Recreate the cluster using Kubernetes v{{.new}}: Run \"minikube delete {{.profile}}\", then \"minikube start {{.profile}} --kubernetes-version={{.new}}\"\n* Create a second cluster with Kubernetes v{{.new}}: Run \"minikube start -p \u003cnew name\u003e --kubernetes-version={{.new}}\"\n* Reuse the existing cluster with Kubernetes v{{.old}} or newer: Run \"minikube start {{.profile}} --kubernetes-version={{.old}}\"": "", @@ -153,6 +164,7 @@ "Examples": "", "Exiting": "Fermeture…", "Exiting.": "", + "External Adapter on which external switch will be created if no external switch is found. (hyperv driver only)": "", "Failed runtime": "", "Failed to cache ISO": "", "Failed to cache and load images": "", @@ -212,11 +224,14 @@ "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, install addons. 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.", + "If true, the added node will be marked for work. Defaults to true.": "", + "If true, the node added will also be a control plane in addition to a worker.": "", "If using the none driver, ensure that systemctl is installed": "", "If you are running minikube within a VM, consider using --vm-driver=none:": "", "Images Commands:": "", @@ -259,6 +274,7 @@ "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": "", + "Node operations": "", "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.": "", @@ -272,6 +288,7 @@ "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": "", + "Operations on nodes": "", "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": "", @@ -326,8 +343,6 @@ "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.": "", @@ -335,6 +350,8 @@ "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)'.": "", + "Sets up podman env variables; similar to '$(podman-machine env)'": "", + "Sets up podman env variables; similar to '$(podman-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": "", @@ -352,9 +369,13 @@ "Specify the ip that the mount should be setup on": "", "Specify the mount filesystem type (supported types: 9p)": "", "Starting existing {{.driver_name}} VM for \"{{.profile_name}}\" ...": "", + "Starting node": "", "Starts a local kubernetes cluster": "Démarre un cluster Kubernetes local.", + "Starts a node.": "", + "Starts an existing stopped node in a cluster.": "", "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 node in a cluster.": "", "Stops a running local kubernetes cluster": "", "Successfully deleted all profiles": "", "Successfully mounted {{.sourcePath}} to {{.destinationPath}}": "", @@ -391,8 +412,7 @@ "The container runtime to be used (docker, crio, containerd).": "", "The cri socket path to be used": "Chemin d'accès au socket CRI à utiliser.", "The cri socket path to be used.": "", - "The docker host is currently not running": "", - "The docker service is currently not active": "", + "The docker service within '{{.profile}}' is 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.": "", @@ -404,9 +424,12 @@ "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 name of the node to add.": "", + "The name of the node to delete": "", "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 podman service within '{{.profile}}' is not active": "", "The service namespace": "", "The services namespace": "", "The time interval for each check that wait performs in seconds": "", @@ -470,6 +493,7 @@ "Usage: minikube completion SHELL": "", "Usage: minikube delete": "", "Usage: minikube delete --all --purge": "", + "Usage: minikube node [add|start|stop|delete]": "", "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": "", @@ -481,6 +505,8 @@ "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 ...": "", + "Using the {{.driver}} driver based on existing profile": "", + "Using the {{.driver}} driver based on user configuration": "", "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.": "", @@ -502,6 +528,7 @@ "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).", + "Whether to use external switch over Default Switch if virtual switch not explicitly specified. (hyperv 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": "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.", "You can delete them using the following command(s):": "", "You may need to manually remove the \"{{.name}}\" VM from your hypervisor": "Vous devrez peut-être supprimer la VM \"{{.name}}\" manuellement de votre hyperviseur.", @@ -520,6 +547,7 @@ "command runner": "", "config modifies minikube config files using subcommands like \"minikube config set vm-driver kvm\"\nConfigurable fields:\\n\\n": "", "config view failed": "", + "creating api client": "", "dashboard service is not running: {{.error}}": "", "disable failed": "", "dry-run mode. Validates configuration, but does not mutate system state": "", @@ -535,18 +563,21 @@ "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": "", + "loading config": "", "logdir set failed": "", + "machine '{{.name}}' does not exist. Proceeding ahead with recreating VM.": "", "max time to wait per Kubernetes core services to be healthy.": "", "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 is unable to connect to the VM: {{.error}}\n\n\tThis is likely due to one of two reasons:\n\n\t- VPN or firewall interference\n\t- {{.hypervisor}} network configuration issue\n\n\tSuggested workarounds:\n\n\t- Disable your local VPN or firewall software\n\t- Configure your local VPN or firewall to allow access to {{.ip}}\n\t- Restart or reinstall {{.hypervisor}}\n\t- Use an alternative --vm-driver\n\t- Use --force to override this connectivity check": "", "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": "", + "name is required": "", "namespaces to pause": "", "namespaces to unpause": "", "not enough arguments ({{.ArgCount}}).\\nusage: minikube config set PROPERTY_NAME PROPERTY_VALUE": "", @@ -554,6 +585,7 @@ "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": "", + "retrieving node": "", "service {{.namespace_name}}/{{.service_name}} has no node port": "", "stat failed": "", "status json failure": "", @@ -587,6 +619,8 @@ "{{.machine}} IP was already correctly configured for {{.ip}}": "", "{{.name}} cluster does not exist": "", "{{.name}} has no available configuration options": "", + "{{.name}} is already running": "", + "{{.name}} is already stopped": "", "{{.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}}", diff --git a/translations/ja.json b/translations/ja.json index b0a1a213a847..7ad4dd59295e 100644 --- a/translations/ja.json +++ b/translations/ja.json @@ -9,8 +9,10 @@ "\"{{.profile_name}}\" stopped.": "「{{.profile_name}}」が停止しました。", "'none' driver does not support 'minikube docker-env' command": "「none」ドライバーは「minikube docker-env」コマンドをサポートしていません", "'none' driver does not support 'minikube mount' command": "「none」ドライバーは「minikube mount」コマンドをサポートしていません", + "'none' driver does not support 'minikube podman-env' command": "", "'none' driver does not support 'minikube ssh' command": "「none」ドライバーは「minikube ssh」コマンドをサポートしていません", "'{{.driver}}' driver reported an issue: {{.error}}": "「{{.driver}}」ドライバーがエラーを報告しました: {{.error}}", + "'{{.profile}}' is not running": "", "- {{.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 the minikube VM from reaching the internet. You may need to configure it to use a proxy.": "", @@ -26,8 +28,11 @@ "Add an image to local cache.": "イメージをローカルキャッシュに追加します", "Add machine IP to NO_PROXY environment variable": "", "Add or delete an image from the local cache.": "", + "Adding node {{.name}} to cluster {{.profile}}": "", "Additional help topics": "", "Additional mount options, such as cache=fscache": "", + "Adds a node to the given cluster config, and starts it.": "", + "Adds a node to the given cluster.": "", "Advanced Commands:": "", "Aliases": "", "Allow user prompts for more information": "", @@ -37,8 +42,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 {{.driver}} driver": "", + "Automatically selected the {{.driver}} driver. Other choices: {{.alternates}}": "", "Available Commands": "", "Basic Commands:": "", "Block until the apiserver is servicing API requests": "", @@ -72,6 +77,7 @@ "Deletes a local kubernetes cluster": "", "Deletes a local kubernetes cluster. This command deletes the VM, and removes all\nassociated files.": "", "Deletes a local kubernetes cluster. This command deletes the VM, and removes all associated files.": "ローカルの Kubernetes クラスタを削除します。このコマンドによって、VM とそれに関連付けられているすべてのファイルが削除されます。", + "Deletes a node from a cluster.": "", "Deleting \"{{.profile_name}}\" in {{.driver_name}} ...": "{{.driver_name}} の「{{.profile_name}}」を削除しています...", "Disable checking for the availability of hardware virtualization before the vm is started (virtualbox driver only)": "VM が起動する前にハードウェアの仮想化の可用性チェックを無効にします(virtualbox ドライバのみ)", "Disable dynamic memory in your VM manager, or pass in a larger --memory value": "", @@ -94,6 +100,7 @@ "Downloading VM boot image ...": "", "Downloading driver {{.driver}}:": "", "Downloading {{.name}} {{.version}}": "", + "ERROR creating `registry-creds-acr` secret": "", "ERROR creating `registry-creds-dpr` secret": "", "ERROR creating `registry-creds-ecr` secret: {{.error}}": "", "ERROR creating `registry-creds-gcr` secret: {{.error}}": "", @@ -114,12 +121,15 @@ "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)": "Docker デーモンに渡す環境変数(形式: Key=Value)", + "Error adding node to cluster": "", "Error checking driver version: {{.error}}": "ドライバのバージョンの確認中にエラーが発生しました。{{.error}}", "Error creating minikube directory": "", "Error creating view template": "", - "Error executing template": "", + "Error detecting shell": "", "Error executing view template": "", "Error finding port for mount": "", + "Error generating set output": "", + "Error generating unset output": "", "Error getting IP": "", "Error getting client": "", "Error getting client: {{.error}}": "", @@ -127,11 +137,13 @@ "Error getting cluster bootstrapper": "", "Error getting config": "", "Error getting host": "", + "Error getting host IP": "", "Error getting host status": "", "Error getting machine logs": "", "Error getting profiles to delete": "", "Error getting service status": "", "Error getting service with namespace: {{.namespace}} and labels {{.labelName}}:{{.addonName}}: {{.error}}": "", + "Error getting ssh client": "", "Error getting the host IP address to use from within the VM": "", "Error host driver ip status": "", "Error killing mount process": "", @@ -140,13 +152,12 @@ "Error loading profile config: {{.error}}": "", "Error loading profile {{.name}}: {{.error}}": "プロファイル {{.name}} の読み込み中にエラーが発生しました。{{.error}}", "Error opening service": "", + "Error parsing Driver version: {{.error}}": "Driver バージョンの解析中にエラーが発生しました。{{.error}}", "Error parsing minikube version: {{.error}}": "minikube バージョンの解析中にエラーが発生しました。{{.error}}", - "Error parsing vmDriver version: {{.error}}": "vmDriver バージョンの解析中にエラーが発生しました。{{.error}}", "Error reading {{.path}}: {{.error}}": "", - "Error setting shell variables": "", "Error starting cluster": "", "Error starting mount": "", - "Error unsetting shell variables": "", + "Error starting node": "", "Error while setting kubectl current context : {{.error}}": "", "Error writing mount pid": "", "Error: You have selected Kubernetes v{{.new}}, but the existing cluster for your profile is running Kubernetes v{{.old}}. Non-destructive downgrades are not supported, but you can proceed by performing one of the following options:\n\n* Recreate the cluster using Kubernetes v{{.new}}: Run \"minikube delete {{.profile}}\", then \"minikube start {{.profile}} --kubernetes-version={{.new}}\"\n* Create a second cluster with Kubernetes v{{.new}}: Run \"minikube start -p \u003cnew name\u003e --kubernetes-version={{.new}}\"\n* Reuse the existing cluster with Kubernetes v{{.old}} or newer: Run \"minikube start {{.profile}} --kubernetes-version={{.old}}\"": "", @@ -155,6 +166,7 @@ "Examples": "", "Exiting": "終了しています", "Exiting.": "終了しています。", + "External Adapter on which external switch will be created if no external switch is found. (hyperv driver only)": "", "Failed runtime": "", "Failed to cache ISO": "", "Failed to cache and load images": "", @@ -214,11 +226,14 @@ "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, install addons. 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 の場合、後で使用できるようにファイルのダウンロードとキャッシュ保存だけが行われます。インストールも起動も行われません。", + "If true, the added node will be marked for work. Defaults to true.": "", + "If true, the node added will also be a control plane in addition to a worker.": "", "If using the none driver, ensure that systemctl is installed": "", "If you are running minikube within a VM, consider using --vm-driver=none:": "", "Images Commands:": "", @@ -261,6 +276,7 @@ "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": "", + "Node operations": "", "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.": "", @@ -274,6 +290,7 @@ "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": "", + "Operations on nodes": "", "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": "", @@ -298,7 +315,6 @@ "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)": "MAC アドレスを復元するための VM UUID を指定します(hyperkit ドライバのみ)", - "Pulling images ...": "", "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": "", @@ -328,8 +344,6 @@ "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.": "", @@ -337,6 +351,8 @@ "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)'.": "", + "Sets up podman env variables; similar to '$(podman-machine env)'": "", + "Sets up podman env variables; similar to '$(podman-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": "", @@ -354,9 +370,13 @@ "Specify the ip that the mount should be setup on": "", "Specify the mount filesystem type (supported types: 9p)": "", "Starting existing {{.driver_name}} VM for \"{{.profile_name}}\" ...": "", + "Starting node": "", "Starts a local kubernetes cluster": "ローカルの Kubernetes クラスタを起動します", + "Starts a node.": "", + "Starts an existing stopped node in a cluster.": "", "Stopping \"{{.profile_name}}\" in {{.driver_name}} ...": "", "Stops a local kubernetes cluster running in Virtualbox. This command stops the VM\nitself, leaving all files intact. The cluster can be started again with the \"start\" command.": "", + "Stops a node in a cluster.": "", "Stops a running local kubernetes cluster": "", "Successfully deleted all profiles": "", "Successfully mounted {{.sourcePath}} to {{.destinationPath}}": "", @@ -394,8 +414,7 @@ "The container runtime to be used (docker, crio, containerd).": "", "The cri socket path to be used": "使用される CRI ソケットパス", "The cri socket path to be used.": "", - "The docker host is currently not running": "", - "The docker service is currently not active": "", + "The docker service within '{{.profile}}' is not active": "", "The driver '{{.driver}}' is not supported on {{.os}}": "ドライバ「{{.driver}}」は、{{.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.": "", @@ -407,9 +426,12 @@ "The minikube VM is offline. Please run 'minikube start' to start it again.": "", "The name of the network plugin": "ネットワーク プラグインの名前", "The name of the network plugin.": "", + "The name of the node to add.": "", + "The name of the node to delete": "", "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 podman service within '{{.profile}}' is not active": "", "The service namespace": "", "The services namespace": "", "The time interval for each check that wait performs in seconds": "", @@ -473,6 +495,7 @@ "Usage: minikube completion SHELL": "", "Usage: minikube delete": "", "Usage: minikube delete --all --purge": "", + "Usage: minikube node [add|start|stop|delete]": "", "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": "", @@ -484,6 +507,8 @@ "Using image repository {{.name}}": "イメージ リポジトリ {{.name}} を使用しています", "Using the '{{.runtime}}' runtime with the 'none' driver is an untested configuration!": "", "Using the running {{.driver_name}} \"{{.profile_name}}\" VM ...": "", + "Using the {{.driver}} driver based on existing profile": "", + "Using the {{.driver}} driver based on user configuration": "", "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": "", "Verify that your HTTP_PROXY and HTTPS_PROXY environment variables are set correctly.": "", @@ -502,6 +527,7 @@ "Wait until Kubernetes core services are healthy before exiting": "Kubernetes コアサービスが正常になるまで待機してから終了してください", "Waiting for cluster to come online ...": "", "Where to root the NFS Shares, defaults to /nfsshares (hyperkit driver only)": "NFS 共有のルートに指定する場所。デフォルトは /nfsshares(hyperkit ドライバのみ)", + "Whether to use external switch over Default Switch if virtual switch not explicitly specified. (hyperv 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": "プロキシを使用しようとしていますが、現在の NO_PROXY 環境に minikube IP({{.ip_address}})は含まれていません。詳細については、{{.documentation_url}} をご覧ください", "You can delete them using the following command(s):": "", "You may need to manually remove the \"{{.name}}\" VM from your hypervisor": "ハイパーバイザから「{{.name}}」VM を手動で削除することが必要な可能性があります", @@ -520,6 +546,7 @@ "command runner": "", "config modifies minikube config files using subcommands like \"minikube config set vm-driver kvm\"\nConfigurable fields:\\n\\n": "", "config view failed": "", + "creating api client": "", "dashboard service is not running: {{.error}}": "", "disable failed": "", "dry-run mode. Validates configuration, but does not mutate system state": "", @@ -535,18 +562,21 @@ "kubectl and minikube configuration will be stored in {{.home_folder}}": "kubectl と minikube の構成は {{.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": "", + "loading config": "", "logdir set failed": "", + "machine '{{.name}}' does not exist. Proceeding ahead with recreating VM.": "", "max time to wait per Kubernetes core services to be healthy.": "", "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 is unable to connect to the VM: {{.error}}\n\n\tThis is likely due to one of two reasons:\n\n\t- VPN or firewall interference\n\t- {{.hypervisor}} network configuration issue\n\n\tSuggested workarounds:\n\n\t- Disable your local VPN or firewall software\n\t- Configure your local VPN or firewall to allow access to {{.ip}}\n\t- Restart or reinstall {{.hypervisor}}\n\t- Use an alternative --vm-driver\n\t- Use --force to override this connectivity check": "", "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": "", + "name is required": "", "namespaces to pause": "", "namespaces to unpause": "", "not enough arguments ({{.ArgCount}}).\\nusage: minikube config set PROPERTY_NAME PROPERTY_VALUE": "", @@ -554,6 +584,7 @@ "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": "", + "retrieving node": "", "service {{.namespace_name}}/{{.service_name}} has no node port": "", "stat failed": "", "status json failure": "", @@ -587,6 +618,8 @@ "{{.machine}} IP was already correctly configured for {{.ip}}": "", "{{.name}} cluster does not exist": "", "{{.name}} has no available configuration options": "", + "{{.name}} is already running": "", + "{{.name}} is already stopped": "", "{{.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}}": "{{.platform}} 上の {{.prefix}}minikube {{.version}}", diff --git a/translations/pl.json b/translations/pl.json index a9b8da947c28..7c3cfbd8f621 100644 --- a/translations/pl.json +++ b/translations/pl.json @@ -8,8 +8,10 @@ "\"{{.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 podman-env' command": "", "'none' driver does not support 'minikube ssh' command": "sterownik 'none' nie wspiera komendy 'minikube ssh'", "'{{.driver}}' driver reported an issue: {{.error}}": "", + "'{{.profile}}' is not running": "", "- {{.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 the minikube VM from reaching the internet. You may need to configure it to use a proxy.": "", @@ -22,8 +24,11 @@ "Add an image to local cache.": "", "Add machine IP to NO_PROXY environment variable": "", "Add or delete an image from the local cache.": "", + "Adding node {{.name}} to cluster {{.profile}}": "", "Additional help topics": "Dodatkowe tematy pomocy", "Additional mount options, such as cache=fscache": "Dodatkowe opcje montowania, jak na przykład cache=fscache", + "Adds a node to the given cluster config, and starts it.": "", + "Adds a node to the given cluster.": "", "Advanced Commands:": "Zaawansowane komendy", "Aliases": "Aliasy", "Allow user prompts for more information": "", @@ -33,8 +38,8 @@ "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}})": "", + "Automatically selected the {{.driver}} driver": "", + "Automatically selected the {{.driver}} driver. Other choices: {{.alternates}}": "", "Available Commands": "Dostępne polecenia", "Basic Commands:": "Podstawowe polecenia", "Block until the apiserver is servicing API requests": "", @@ -69,6 +74,7 @@ "Deletes a local kubernetes cluster": "Usuwa lokalny klaster kubernetesa", "Deletes a local kubernetes cluster. This command deletes the VM, and removes all\nassociated files.": "Usuwa lokalny klaster kubernetesa. Ta komenda usuwa maszynę wirtualna i wszystkie powiązane pliki.", "Deletes a local kubernetes cluster. This command deletes the VM, and removes all associated files.": "Usuwa lokalny klaster kubernetesa. Ta komenda usuwa maszynę wirtualna i wszystkie powiązane pliki.", + "Deletes a node from a cluster.": "", "Deleting \"{{.profile_name}}\" in {{.driver_name}} ...": "Usuwanie \"{{.profile_name}}\" - {{.driver_name}}...", "Disable checking for the availability of hardware virtualization before the vm is started (virtualbox driver only)": "", "Disable dynamic memory in your VM manager, or pass in a larger --memory value": "", @@ -89,6 +95,7 @@ "Downloading VM boot image ...": "Pobieranie obrazu maszyny wirtualnej ...", "Downloading driver {{.driver}}:": "", "Downloading {{.name}} {{.version}}": "Pobieranie {{.name}} {{.version}}", + "ERROR creating `registry-creds-acr` secret": "", "ERROR creating `registry-creds-dpr` secret": "", "ERROR creating `registry-creds-ecr` secret: {{.error}}": "", "ERROR creating `registry-creds-gcr` secret: {{.error}}": "", @@ -108,12 +115,15 @@ "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 adding node to cluster": "", "Error checking driver version: {{.error}}": "Błąd podczas sprawdzania wersij sterownika : {{.error}}", "Error creating minikube directory": "", "Error creating view template": "", - "Error executing template": "", + "Error detecting shell": "", "Error executing view template": "", "Error finding port for mount": "", + "Error generating set output": "", + "Error generating unset output": "", "Error getting IP": "", "Error getting client": "", "Error getting client: {{.error}}": "", @@ -121,11 +131,13 @@ "Error getting cluster bootstrapper": "", "Error getting config": "", "Error getting host": "", + "Error getting host IP": "", "Error getting host status": "", "Error getting machine logs": "", "Error getting profiles to delete": "", "Error getting service status": "", "Error getting service with namespace: {{.namespace}} and labels {{.labelName}}:{{.addonName}}: {{.error}}": "", + "Error getting ssh client": "", "Error getting the host IP address to use from within the VM": "", "Error host driver ip status": "", "Error killing mount process": "", @@ -133,14 +145,14 @@ "Error loading profile config": "", "Error loading profile config: {{.error}}": "", "Error opening service": "", + "Error parsing Driver version: {{.error}}": "Błąd parsowania wersji Driver: {{.error}}", "Error parsing minikube version: {{.error}}": "Bład parsowania wersji minikube: {{.error}}", - "Error parsing vmDriver version: {{.error}}": "Błąd parsowania wersji vmDriver: {{.error}}", "Error reading {{.path}}: {{.error}}": "Błąd odczytu {{.path}} {{.error}}", "Error restarting cluster": "Błąd podczas restartowania klastra", "Error setting shell variables": "Błąd podczas ustawiania zmiennych powłoki(shell)", "Error starting cluster": "Błąd podczas uruchamiania klastra", "Error starting mount": "", - "Error unsetting shell variables": "", + "Error starting node": "", "Error while setting kubectl current context : {{.error}}": "Błąd podczas ustawiania kontekstu kubectl: {{.error}}", "Error writing mount pid": "", "Error: You have selected Kubernetes v{{.new}}, but the existing cluster for your profile is running Kubernetes v{{.old}}. Non-destructive downgrades are not supported, but you can proceed by performing one of the following options:\n\n* Recreate the cluster using Kubernetes v{{.new}}: Run \"minikube delete {{.profile}}\", then \"minikube start {{.profile}} --kubernetes-version={{.new}}\"\n* Create a second cluster with Kubernetes v{{.new}}: Run \"minikube start -p \u003cnew name\u003e --kubernetes-version={{.new}}\"\n* Reuse the existing cluster with Kubernetes v{{.old}} or newer: Run \"minikube start {{.profile}} --kubernetes-version={{.old}}\"": "", @@ -149,6 +161,7 @@ "Examples": "Przykłady", "Exiting": "", "Exiting.": "", + "External Adapter on which external switch will be created if no external switch is found. (hyperv driver only)": "", "Failed runtime": "", "Failed to cache ISO": "", "Failed to cache and load images": "", @@ -206,11 +219,14 @@ "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, install addons. 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.": "", + "If true, the added node will be marked for work. Defaults to true.": "", + "If true, the node added will also be a control plane in addition to a worker.": "", "If using the none driver, ensure that systemctl is installed": "Jeśli użyto sterownika 'none', upewnij się że systemctl jest zainstalowany", "If you are running minikube within a VM, consider using --vm-driver=none:": "", "Images Commands:": "", @@ -252,6 +268,7 @@ "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": "", + "Node operations": "", "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.": "", @@ -265,6 +282,7 @@ "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": "", + "Operations on nodes": "", "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": "", @@ -289,7 +307,6 @@ "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": "", @@ -319,8 +336,6 @@ "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.": "", @@ -328,6 +343,8 @@ "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)`", + "Sets up podman env variables; similar to '$(podman-machine env)'": "", + "Sets up podman env variables; similar to '$(podman-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", @@ -345,9 +362,13 @@ "Specify the ip that the mount should be setup on": "", "Specify the mount filesystem type (supported types: 9p)": "", "Starting existing {{.driver_name}} VM for \"{{.profile_name}}\" ...": "", + "Starting node": "", "Starts a local kubernetes cluster": "Uruchamianie lokalnego klastra kubernetesa", + "Starts a node.": "", + "Starts an existing stopped node in a cluster.": "", "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 node in a cluster.": "", "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}}", @@ -381,8 +402,8 @@ "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 docker host is currently not running": "", "The docker service is currently not active": "Serwis docker jest nieaktywny", + "The docker service within '{{.profile}}' is not active": "", "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.": "", @@ -394,9 +415,12 @@ "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 name of the node to add.": "", + "The name of the node to delete": "", "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 podman service within '{{.profile}}' is not active": "", "The service namespace": "", "The services namespace": "", "The time interval for each check that wait performs in seconds": "", @@ -438,7 +462,6 @@ "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": "", @@ -457,6 +480,7 @@ "Usage: minikube completion SHELL": "", "Usage: minikube delete": "", "Usage: minikube delete --all --purge": "", + "Usage: minikube node [add|start|stop|delete]": "", "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": "", @@ -468,6 +492,8 @@ "Using image repository {{.name}}": "", "Using the '{{.runtime}}' runtime with the 'none' driver is an untested configuration!": "", "Using the running {{.driver_name}} \"{{.profile_name}}\" VM ...": "", + "Using the {{.driver}} driver based on existing profile": "", + "Using the {{.driver}} driver based on user configuration": "", "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", @@ -488,6 +514,7 @@ "Waiting for cluster to come online ...": "", "Waiting for:": "Oczekiwanie na :", "Where to root the NFS Shares, defaults to /nfsshares (hyperkit driver only)": "", + "Whether to use external switch over Default Switch if virtual switch not explicitly specified. (hyperv 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": "", "You can delete them using the following command(s):": "", "You may need to manually remove the \"{{.name}}\" VM from your hypervisor": "", @@ -506,6 +533,7 @@ "command runner": "", "config modifies minikube config files using subcommands like \"minikube config set vm-driver kvm\"\nConfigurable fields:\\n\\n": "", "config view failed": "", + "creating api client": "", "dashboard service is not running: {{.error}}": "", "disable failed": "", "dry-run mode. Validates configuration, but does not mutate system state": "", @@ -521,18 +549,21 @@ "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": "", + "loading config": "", "logdir set failed": "", + "machine '{{.name}}' does not exist. Proceeding ahead with recreating VM.": "", "max time to wait per Kubernetes core services to be healthy.": "", "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 is unable to connect to the VM: {{.error}}\n\n\tThis is likely due to one of two reasons:\n\n\t- VPN or firewall interference\n\t- {{.hypervisor}} network configuration issue\n\n\tSuggested workarounds:\n\n\t- Disable your local VPN or firewall software\n\t- Configure your local VPN or firewall to allow access to {{.ip}}\n\t- Restart or reinstall {{.hypervisor}}\n\t- Use an alternative --vm-driver\n\t- Use --force to override this connectivity check": "", "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", + "name is required": "", "namespaces to pause": "", "namespaces to unpause": "", "not enough arguments ({{.ArgCount}}).\\nusage: minikube config set PROPERTY_NAME PROPERTY_VALUE": "", @@ -540,6 +571,7 @@ "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": "", + "retrieving node": "", "service {{.namespace_name}}/{{.service_name}} has no node port": "", "stat failed": "", "status json failure": "", @@ -575,6 +607,8 @@ "{{.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}} is already running": "", + "{{.name}} is already stopped": "", "{{.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}}", diff --git a/translations/zh-CN.json b/translations/zh-CN.json index 45b4b035fe8c..4b6ce53343c5 100644 --- a/translations/zh-CN.json +++ b/translations/zh-CN.json @@ -9,8 +9,10 @@ "\"{{.profile_name}}\" stopped.": "\"{{.profile_name}}\" 已停止", "'none' driver does not support 'minikube docker-env' command": "'none' 驱动不支持 'minikube docker-env' 命令", "'none' driver does not support 'minikube mount' command": "'none' 驱动不支持 'minikube mount' 命令", + "'none' driver does not support 'minikube podman-env' command": "", "'none' driver does not support 'minikube ssh' command": "'none' 驱动不支持 'minikube ssh' 命令", "'{{.driver}}' driver reported an issue: {{.error}}": "'{{.driver}}' 驱动程序报告了一个问题: {{.error}}", + "'{{.profile}}' is not running": "", "- {{.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/": "VPN 或者防火墙正在干扰对 minikube 虚拟机的 HTTP 访问。或者,您可以使用其它的虚拟机驱动:https://minikube.sigs.k8s.io/docs/start/", "A firewall is blocking Docker the minikube VM from reaching the internet. You may need to configure it to use a proxy.": "防火墙正在阻止 minikube 虚拟机中的 Docker 访问互联网。您可能需要对其进行配置为使用代理", @@ -27,8 +29,11 @@ "Add an image to local cache.": "将 image 添加到本地缓存。", "Add machine IP to NO_PROXY environment variable": "将机器IP添加到环境变量 NO_PROXY 中", "Add or delete an image from the local cache.": "在本地缓存中添加或删除 image。", + "Adding node {{.name}} to cluster {{.profile}}": "", "Additional help topics": "其他帮助", "Additional mount options, such as cache=fscache": "其他挂载选项,例如:cache=fscache", + "Adds a node to the given cluster config, and starts it.": "", + "Adds a node to the given cluster.": "", "Advanced Commands:": "高级命令:", "Aliases": "别名", "Allow user prompts for more information": "允许用户提示以获取更多信息", @@ -40,8 +45,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}})": "", + "Automatically selected the {{.driver}} driver": "", + "Automatically selected the {{.driver}} driver. Other choices: {{.alternates}}": "", "Available Commands": "可用命令", "Basic Commands:": "基本命令:", "Block until the apiserver is servicing API requests": "阻塞直到 apiserver 为 API 请求提供服务", @@ -77,6 +82,7 @@ "Deletes a local kubernetes cluster": "删除本地的 kubernetes 集群", "Deletes a local kubernetes cluster. This command deletes the VM, and removes all\nassociated files.": "删除本地的 kubernetes 集群。此命令还将删除虚拟机,并删除所有的\n相关文件", "Deletes a local kubernetes cluster. This command deletes the VM, and removes all associated files.": "删除本地 kubernetes 集群。此命令会删除虚拟机并移除所有关联的文件。", + "Deletes a node from a cluster.": "", "Deleting \"{{.profile_name}}\" in {{.driver_name}} ...": "正在删除 {{.driver_name}} 中的“{{.profile_name}}”…", "Disable checking for the availability of hardware virtualization before the vm is started (virtualbox driver only)": "禁用在启动虚拟机之前检查硬件虚拟化的可用性(仅限 virtualbox 驱动程序)", "Disable dynamic memory in your VM manager, or pass in a larger --memory value": "禁用虚拟机管理器中的动态内存,或者使用 --memory 传入更大的值", @@ -98,6 +104,7 @@ "Downloading VM boot image ...": "正在下载 VM boot image...", "Downloading driver {{.driver}}:": "正在下载驱动 {{.driver}}:", "Downloading {{.name}} {{.version}}": "正在下载 {{.name}} {{.version}}", + "ERROR creating `registry-creds-acr` secret": "", "ERROR creating `registry-creds-dpr` secret": "创建 `registry-creds-dpr` secret 时出错", "ERROR creating `registry-creds-ecr` secret: {{.error}}": "创建 `registry-creds-ecr` secret 时出错:{{.error}}", "ERROR creating `registry-creds-gcr` secret: {{.error}}": "创建 `registry-creds-gcr` secret 时出错:{{.error}}", @@ -118,17 +125,21 @@ "Ensure that the user listed in /etc/libvirt/qemu.conf has access to your home directory": "确保 /etc/libvirt/qemu.conf 中列出的用户具备访问您 home 目录的权限", "Ensure that your value for HTTPS_PROXY points to an HTTPS proxy rather than an HTTP proxy": "确保您配置的 HTTPS_PROXY 指向了 HTTPS 代理而不是 HTTP 代理", "Environment variables to pass to the Docker daemon. (format: key=value)": "传递给 Docker 守护进程的环境变量。(格式:键值对)", + "Error adding node to cluster": "", "Error checking driver version: {{.error}}": "检查驱动程序版本时出错:{{.error}}", "Error converting status to json": "转换状态为 json 时出错", "Error creating list template": "创建 list template 时出错", "Error creating minikube directory": "创建 minikube 目录时出错", "Error creating status template": "创建 status template 时出错", "Error creating view template": "创建 view template 时出错", + "Error detecting shell": "", "Error executing list template": "执行 list template 时出错", "Error executing status template": "执行 status template 时出错", "Error executing template": "执行 template 时出错", "Error executing view template": "执行 view template 时出错", "Error finding port for mount": "查找 mount 端口时出错", + "Error generating set output": "", + "Error generating unset output": "", "Error getting IP": "获取 IP 时出错", "Error getting addons status": "获取插件状态时出错", "Error getting bootstrapper": "获取 bootstrapper 时出错", @@ -138,12 +149,14 @@ "Error getting cluster bootstrapper": "获取 cluster bootstrapper 时出错", "Error getting config": "获取 config 时出错", "Error getting host": "获取 host 时出错", + "Error getting host IP": "", "Error getting host status": "获取 host status 时出错", "Error getting machine logs": "获取 machine logs 时出错", "Error getting machine status": "获取 machine status 时出错", "Error getting profiles to delete": "获取待删除配置文件时出错", "Error getting service status": "获取 service status 时出错", "Error getting service with namespace: {{.namespace}} and labels {{.labelName}}:{{.addonName}}: {{.error}}": "使用 namespace: {{.namespace}} 和 labels {{.labelName}}:{{.addonName}} 获取 service 时出错:{{.error}}", + "Error getting ssh client": "", "Error getting the host IP address to use from within the VM": "从虚拟机中获取 host IP 地址时出错", "Error host driver ip status": "", "Error killing mount process": "杀死 mount 进程时出错", @@ -152,13 +165,14 @@ "Error loading profile config: {{.error}}": "加载配置文件的配置时出错:{{.error}}", "Error loading profile {{.name}}: {{.error}}": "加载配置文件 {{.name}} 时出错:{{.error}}", "Error opening service": "开启 service 时出错", + "Error parsing Driver version: {{.error}}": "解析 Driver 版本时出错:{{.error}}", "Error parsing minikube version: {{.error}}": "解析 minikube 版本时出错:{{.error}}", - "Error parsing vmDriver version: {{.error}}": "解析 vmDriver 版本时出错:{{.error}}", "Error reading {{.path}}: {{.error}}": "读取 {{.path}} 时出错:{{.error}}", "Error restarting cluster": "重启 cluster 时出错", "Error setting shell variables": "设置 shell 变量时出错", "Error starting cluster": "开启 cluster 时出错", "Error starting mount": "开启 mount 时出错", + "Error starting node": "", "Error unsetting shell variables": "取消设置 shell 变量时出错", "Error while setting kubectl current context : {{.error}}": "设置 kubectl 上下文时出错 :{{.error}}", "Error writing mount pid": "写入 mount pid 时出错", @@ -169,6 +183,7 @@ "Exiting": "正在退出", "Exiting due to driver incompatibility": "由于驱动程序不兼容而退出", "Exiting.": "正在退出。", + "External Adapter on which external switch will be created if no external switch is found. (hyperv driver only)": "", "Failed runtime": "", "Failed to cache ISO": "缓存ISO 时失败", "Failed to cache and load images": "缓存以及导入镜像失败", @@ -230,11 +245,14 @@ "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, install addons. 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,仅会下载和缓存文件以备后用 - 不会安装或启动任何项。", + "If true, the added node will be marked for work. Defaults to true.": "", + "If true, the node added will also be a control plane in addition to a worker.": "", "If using the none driver, ensure that systemctl is installed": "", "If you are running minikube within a VM, consider using --vm-driver=none:": "", "Images Commands:": "", @@ -278,6 +296,7 @@ "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": "", + "Node operations": "", "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.": "", @@ -291,6 +310,7 @@ "Opening service {{.namespace_name}}/{{.service_name}} in default browser...": "正通过默认浏览器打开服务 {{.namespace_name}}/{{.service_name}}...", "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": "", + "Operations on nodes": "", "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": "", @@ -347,8 +367,6 @@ "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' 文件夹。", @@ -356,6 +374,8 @@ "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)'.": "", + "Sets up podman env variables; similar to '$(podman-machine env)'": "", + "Sets up podman env variables; similar to '$(podman-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": "", @@ -373,9 +393,13 @@ "Specify the ip that the mount should be setup on": "", "Specify the mount filesystem type (supported types: 9p)": "", "Starting existing {{.driver_name}} VM for \"{{.profile_name}}\" ...": "", + "Starting node": "", "Starts a local kubernetes cluster": "启动本地 kubernetes 集群", + "Starts a node.": "", + "Starts an existing stopped node in a cluster.": "", "Stopping \"{{.profile_name}}\" in {{.driver_name}} ...": "", "Stops a local kubernetes cluster running in Virtualbox. This command stops the VM\nitself, leaving all files intact. The cluster can be started again with the \"start\" command.": "", + "Stops a node in a cluster.": "", "Stops a running local kubernetes cluster": "", "Successfully deleted all profiles": "成功删除所有配置文件", "Successfully deleted profile \\\"{{.name}}\\\"": "成功删除配置文件 \\\"{{.name}}\\\"", @@ -414,8 +438,7 @@ "The container runtime to be used (docker, crio, containerd).": "", "The cri socket path to be used": "需要使用的 cri 套接字路径", "The cri socket path to be used.": "", - "The docker host is currently not running": "", - "The docker service is currently not active": "", + "The docker service within '{{.profile}}' is 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.": "", @@ -427,9 +450,12 @@ "The minikube VM is offline. Please run 'minikube start' to start it again.": "", "The name of the network plugin": "网络插件的名称", "The name of the network plugin.": "", + "The name of the node to add.": "", + "The name of the node to delete": "", "The number of bytes to use for 9p packet payload": "", "The output format. One of 'json', 'table'": "输出的格式。'json' 或者 'table'", "The path on the file system where the docs in markdown need to be saved": "", + "The podman service within '{{.profile}}' is not active": "", "The service namespace": "", "The services namespace": "", "The time interval for each check that wait performs in seconds": "", @@ -493,6 +519,7 @@ "Usage: minikube completion SHELL": "", "Usage: minikube delete": "", "Usage: minikube delete --all --purge": "使用方法:minikube delete --all --purge", + "Usage: minikube node [add|start|stop|delete]": "", "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": "", @@ -504,6 +531,8 @@ "Using image repository {{.name}}": "正在使用镜像存储库 {{.name}}", "Using the '{{.runtime}}' runtime with the 'none' driver is an untested configuration!": "同时使用 'none' 驱动以及 '{{.runtime}}' 运行时是未经测试过的配置!", "Using the running {{.driver_name}} \"{{.profile_name}}\" VM ...": "", + "Using the {{.driver}} driver based on existing profile": "", + "Using the {{.driver}} driver based on user configuration": "", "VM driver is one of: %v": "虚拟机驱动程序是以下项之一:%v", "VM is unable to access {{.repository}}, you may need to configure a proxy or set --image-repository": "虚拟机无权访问 {{.repository}},或许您需要配置代理或者设置 --image-repository", "VM may be unable to resolve external DNS records": "虚拟机可能无法解析外部 DNS 记录", @@ -526,6 +555,7 @@ "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`": "警告:您的 kubectl 指向了过时的 minikube-vm。执行 `minikube update-context` 来修复 kubectl 上下文。", "Where to root the NFS Shares, defaults to /nfsshares (hyperkit driver only)": "NFS 共享的根目录位置,默认为 /nfsshares(仅限 hyperkit 驱动程序)", + "Whether to use external switch over Default Switch if virtual switch not explicitly specified. (hyperv 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": "您似乎正在使用代理,但您的 NO_PROXY 环境不包含 minikube IP ({{.ip_address}})。如需了解详情,请参阅 {{.documentation_url}}", "You can delete them using the following command(s):": "", "You may need to manually remove the \"{{.name}}\" VM from your hypervisor": "您可能需要从管理程序中手动移除“{{.name}}”虚拟机", @@ -545,6 +575,7 @@ "command runner": "", "config modifies minikube config files using subcommands like \"minikube config set vm-driver kvm\"\nConfigurable fields:\\n\\n": "", "config view failed": "", + "creating api client": "", "dashboard service is not running: {{.error}}": "", "disable failed": "", "dry-run mode. Validates configuration, but does not mutate system state": "", @@ -560,11 +591,14 @@ "kubectl and minikube configuration will be stored in {{.home_folder}}": "kubectl 和 minikube 配置将存储在 {{.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": "", + "loading config": "", "logdir set failed": "", + "machine '{{.name}}' does not exist. Proceeding ahead with recreating VM.": "", "max time to wait per Kubernetes core services to be healthy.": "", "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 正在退出。如果以上信息没有帮助,请提交问题反馈:", "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\n\tThis is likely due to one of two reasons:\n\n\t- VPN or firewall interference\n\t- {{.hypervisor}} network configuration issue\n\n\tSuggested workarounds:\n\n\t- Disable your local VPN or firewall software\n\t- Configure your local VPN or firewall to allow access to {{.ip}}\n\t- Restart or reinstall {{.hypervisor}}\n\t- Use an alternative --vm-driver\n\t- Use --force to override this connectivity check": "", "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 无法连接到虚拟机:{{.error}}\n\n可能是由于以下两个原因之一导致:\n\n-VPN 或防火墙冲突\n- {{.hypervisor}} 网络配置问题\n建议的方案:\n\n- 禁用本地的 VPN 或者防火墙软件\n- 配置本地 VPN 或防火墙软件,放行 {{.ip}}\n- 重启或者重装 {{.hypervisor}}\n- 使用另外的 --vm-driver", "minikube profile was successfully set to {{.profile_name}}": "", "minikube status --output OUTPUT. json, text": "", @@ -572,6 +606,7 @@ "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": "", + "name is required": "", "namespaces to pause": "", "namespaces to unpause": "", "not enough arguments ({{.ArgCount}}).\\nusage: minikube config set PROPERTY_NAME PROPERTY_VALUE": "", @@ -579,6 +614,7 @@ "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' 添加的镜像", + "retrieving node": "", "service {{.namespace_name}}/{{.service_name}} has no node port": "", "stat failed": "", "status json failure": "", @@ -612,6 +648,8 @@ "{{.machine}} IP was already correctly configured for {{.ip}}": "", "{{.name}} cluster does not exist": "", "{{.name}} has no available configuration options": "", + "{{.name}} is already running": "", + "{{.name}} is already stopped": "", "{{.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": "{{.path}} 的版本是 {{.client_version}},且与 Kubernetes {{.cluster_version}} 不兼容。您需要更新 {{.path}} 或者使用 'minikube kubectl' 连接到这个集群", "{{.prefix}}minikube {{.version}} on {{.platform}}": "{{.platform}} 上的 {{.prefix}}minikube {{.version}}",