Rebased on master

pull/6376/head
Priya Wadhwa 2020-01-22 13:10:50 -08:00
commit de4ecb9706
27 changed files with 394 additions and 1049 deletions

View File

@ -15,7 +15,7 @@
# Bump these on release - and please check ISO_VERSION for correctness.
VERSION_MAJOR ?= 1
VERSION_MINOR ?= 7
VERSION_BUILD ?= 0-beta.0
VERSION_BUILD ?= 0-beta.1
RAW_VERSION=$(VERSION_MAJOR).$(VERSION_MINOR).${VERSION_BUILD}
VERSION ?= v$(RAW_VERSION)

View File

@ -32,7 +32,6 @@ import (
"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/kicbs"
"k8s.io/minikube/pkg/minikube/bootstrapper/kubeadm"
"k8s.io/minikube/pkg/minikube/config"
"k8s.io/minikube/pkg/minikube/constants"
@ -274,16 +273,9 @@ func getClusterBootstrapper(api libmachine.API, bootstrapperName string) (bootst
if err != nil {
return nil, errors.Wrap(err, "getting a new kubeadm bootstrapper")
}
case bootstrapper.KIC:
b, err = kicbs.NewBootstrapper(api)
if err != nil {
return nil, errors.Wrap(err, "getting a new kic bootstrapper")
}
default:
return nil, fmt.Errorf("unknown bootstrapper: %s", bootstrapperName)
}
return b, nil
}

View File

@ -366,7 +366,7 @@ func runStart(cmd *cobra.Command, args []string) {
bs := setupKubeAdm(machineAPI, config)
// pull images or restart cluster
bootstrapCluster(bs, cr, mRunner, config.KubernetesConfig, preExists, isUpgrade)
bootstrapCluster(bs, cr, mRunner, config, preExists, isUpgrade)
configureMounts()
// enable addons with start command
@ -383,7 +383,7 @@ func runStart(cmd *cobra.Command, args []string) {
// Skip pre-existing, because we already waited for health
if viper.GetBool(waitUntilHealthy) && !preExists {
if err := bs.WaitForCluster(config.KubernetesConfig, viper.GetDuration(waitTimeout)); err != nil {
if err := bs.WaitForCluster(config, viper.GetDuration(waitTimeout)); err != nil {
exit.WithError("Wait failed", err)
}
}
@ -1287,16 +1287,16 @@ func configureRuntimes(runner cruntime.CommandRunner, drvName string, k8s cfg.Ku
}
// bootstrapCluster starts Kubernetes using the chosen bootstrapper
func bootstrapCluster(bs bootstrapper.Bootstrapper, r cruntime.Manager, runner command.Runner, kc cfg.KubernetesConfig, preexisting bool, isUpgrade bool) {
func bootstrapCluster(bs bootstrapper.Bootstrapper, r cruntime.Manager, runner command.Runner, c cfg.MachineConfig, preexisting bool, isUpgrade bool) {
if isUpgrade || !preexisting {
out.T(out.Pulling, "Pulling images ...")
if err := bs.PullImages(kc); err != nil {
if err := bs.PullImages(c.KubernetesConfig); err != nil {
out.T(out.FailureType, "Unable to pull images, which may be OK: {{.error}}", out.V{"error": err})
}
}
out.T(out.Launch, "Launching Kubernetes ... ")
if err := bs.StartCluster(kc); err != nil {
if err := bs.StartCluster(c); err != nil {
exit.WithLogEntries("Error starting cluster", err, logs.FindProblems(r, bs, runner))
}
}

View File

@ -1,56 +0,0 @@
# Copyright 2016 The Kubernetes Authors All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: v1
kind: Pod
metadata:
name: kube-addon-manager
namespace: kube-system
labels:
component: kube-addon-manager
version: v9.0.2
kubernetes.io/minikube-addons: addon-manager
spec:
hostNetwork: true
containers:
- name: kube-addon-manager
image: {{default "k8s.gcr.io" .ImageRepository}}/kube-addon-manager{{.ExoticArch}}:v9.0.2
env:
- name: KUBECONFIG
value: /var/lib/minikube/kubeconfig
- name: TEST_ADDON_CHECK_INTERVAL_SEC
value: "5"
- name: ADDON_MANAGER_LEADER_ELECTION
value: "false"
- name: KUBECTL_EXTRA_PRUNE_WHITELIST
value: install.istio.io/v1alpha2/IstioControlPlane
imagePullPolicy: IfNotPresent
resources:
requests:
cpu: 5m
memory: 50Mi
volumeMounts:
- mountPath: /etc/kubernetes/
name: addons
readOnly: true
- mountPath: /var/lib/minikube/
name: kubeconfig
readOnly: true
volumes:
- hostPath:
path: /etc/kubernetes/
name: addons
- hostPath:
path: /var/lib/minikube/
name: kubeconfig

View File

@ -19,6 +19,8 @@ BR2_ROOTFS_USERS_TABLES="$(BR2_EXTERNAL_MINIKUBE_PATH)/board/coreos/minikube/use
BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL_MINIKUBE_PATH)/board/coreos/minikube/rootfs-overlay"
BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL_MINIKUBE_PATH)/board/coreos/minikube/patches"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_BZIMAGE=y
BR2_LINUX_KERNEL_LZ4=y
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_MINIKUBE_PATH)/board/coreos/minikube/linux_defconfig"
BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF=y
@ -55,7 +57,8 @@ BR2_PACKAGE_SYSTEMD_MACHINED=y
BR2_PACKAGE_SYSTEMD_VCONSOLE=y
BR2_PACKAGE_UTIL_LINUX_NSENTER=y
BR2_PACKAGE_UTIL_LINUX_SCHEDUTILS=y
BR2_TARGET_ROOTFS_CPIO_BZIP2=y
BR2_TARGET_ROOTFS_CPIO=y
BR2_TARGET_ROOTFS_CPIO_GZIP=y
BR2_TARGET_ROOTFS_ISO9660=y
BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU="$(BR2_EXTERNAL_MINIKUBE_PATH)/board/coreos/minikube/isolinux.cfg"
BR2_TARGET_SYSLINUX=y

2
go.mod
View File

@ -10,7 +10,6 @@ require (
github.com/Parallels/docker-machine-parallels v1.3.0
github.com/Sirupsen/logrus v0.0.0-20170822132746-89742aefa4b2 // indirect
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d // indirect
github.com/alecthomas/chroma v0.7.0
github.com/blang/semver v3.5.0+incompatible
github.com/c4milo/gotoolkit v0.0.0-20170318115440-bcc06269efa9 // indirect
github.com/cenkalti/backoff v2.2.1+incompatible
@ -28,6 +27,7 @@ require (
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
github.com/google/go-cmp v0.3.0
github.com/googleapis/gnostic v0.3.0 // indirect
github.com/gorilla/mux v1.7.3 // indirect
github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce // indirect
github.com/hashicorp/go-getter v1.4.0
github.com/hashicorp/go-multierror v0.0.0-20160811015721-8c5f0ad93604 // indirect

27
go.sum
View File

@ -21,8 +21,6 @@ github.com/BurntSushi/toml v0.3.0/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/GeertJohan/go.incremental v1.0.0/go.mod h1:6fAjUhbVuX1KcMD3c8TEgVUqmo4seqhv0i0kdATSkM0=
github.com/GeertJohan/go.rice v1.0.0/go.mod h1:eH6gbSOAUv07dQuZVnBmoDP8mgsM1rtixis4Tib9if0=
github.com/GoogleCloudPlatform/k8s-cloud-provider v0.0.0-20181220005116-f8e995905100/go.mod h1:iroGtC8B3tQiqtds1l+mgk/BBOrxbqjH+eUfFQYRc14=
github.com/JeffAshton/win_pdh v0.0.0-20161109143554-76bb4ee9f0ab/go.mod h1:3VYc5hodBMJ5+l/7J4xAyMeuM2PNuepvHlGs8yilUCA=
github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd h1:sjQovDkwrZp8u+gxLtPgKGjk5hCxuy2hrRejBTA9xFU=
@ -44,15 +42,6 @@ github.com/VividCortex/ewma v1.1.1 h1:MnEK4VOv6n0RSY4vtRe3h11qjxL3+t0B8yOL8iMXdc
github.com/VividCortex/ewma v1.1.1/go.mod h1:2Tkkvm3sRDVXaiyucHiACn4cqf7DpdyLvmxzcbUokwA=
github.com/afbjorklund/go-getter v1.4.1-0.20190910175809-eb9f6c26742c h1:18gEt7qzn7CW7qMkfPTFyyotlPbvPQo9o4IDV8jZqP4=
github.com/afbjorklund/go-getter v1.4.1-0.20190910175809-eb9f6c26742c/go.mod h1:7qxyCd8rBfcShwsvxgIguu4KbS3l8bUCwg2Umn7RjeY=
github.com/akavel/rsrc v0.8.0/go.mod h1:uLoCtb9J+EyAqh+26kdrTgmzRBFPGOolLWKpdxkKq+c=
github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38/go.mod h1:r7bzyVFMNntcxPZXK3/+KdruV1H5KSlyVY0gc+NgInI=
github.com/alecthomas/chroma v0.7.0 h1:z+0HgTUmkpRDRz0SRSdMaqOLfJV4F+N1FPDZUZIDUzw=
github.com/alecthomas/chroma v0.7.0/go.mod h1:1U/PfCsTALWWYHDnsIQkxEBM0+6LLe0v8+RSVMOwxeY=
github.com/alecthomas/colour v0.0.0-20160524082231-60882d9e2721/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0=
github.com/alecthomas/kong v0.1.17-0.20190424132513-439c674f7ae0/go.mod h1:+inYUSluD+p4L8KdviBSgzcqEjUQOfC5fQDRFuc36lI=
github.com/alecthomas/kong v0.2.1-0.20190708041108-0548c6b1afae/go.mod h1:+inYUSluD+p4L8KdviBSgzcqEjUQOfC5fQDRFuc36lI=
github.com/alecthomas/kong-hcl v0.1.8-0.20190615233001-b21fea9723c8/go.mod h1:MRgZdU3vrFd05IQ89AxUZ0aYdF39BYoNFa324SodPCA=
github.com/alecthomas/repr v0.0.0-20180818092828-117648cd9897/go.mod h1:xTS7Pm1pD1mvyM075QCDSRqH6qRLXylzS24ZTpRiSzQ=
github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c=
github.com/apache/thrift v0.0.0-20180902110319-2566ecd5d999/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
@ -115,16 +104,11 @@ github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwc
github.com/cyphar/filepath-securejoin v0.0.0-20170720062807-ae69057f2299/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4=
github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c/go.mod h1:Ct2BUK8SB0YC1SMSibvLzxjeJLnrYEVLULFNiHY9YfQ=
github.com/d2g/dhcp4client v0.0.0-20170829104524-6e570ed0a266/go.mod h1:j0hNfjhrt2SxUOw55nL0ATM/z4Yt3t2Kd1mW34z5W5s=
github.com/daaku/go.zipexe v1.0.0/go.mod h1:z8IiR6TsVLEYKwXAoE/I+8ys/sDkgTzSL0CLnGVd57E=
github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 h1:y5HC9v93H5EPKqaS1UYVg1uYah5Xf51mBfIoWehClUQ=
github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964/go.mod h1:Xd9hchkHSWYkEqJwUGisez3G1QY8Ryz0sdWrLPMGjLk=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/daviddengcn/go-colortext v0.0.0-20160507010035-511bcaf42ccd/go.mod h1:dv4zxwHi5C/8AeI+4gX4dCWOIvNi7I6JCSX0HvlKPgE=
github.com/dgrijalva/jwt-go v0.0.0-20160705203006-01aeca54ebda/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/dlclark/regexp2 v1.1.6 h1:CqB4MjHw0MFCDj+PHHjiESmHX+N7t0tJzKvC6M97BRg=
github.com/dlclark/regexp2 v1.1.6/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc=
github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E=
github.com/docker/distribution v0.0.0-20170726174610-edc3ab29cdff h1:FKH02LHYqSmeWd3GBh0KIkM8JBpw3RrShgtcWShdWJg=
github.com/docker/distribution v0.0.0-20170726174610-edc3ab29cdff/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
@ -250,13 +234,9 @@ github.com/googleapis/gnostic v0.3.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTV
github.com/gophercloud/gophercloud v0.0.0-20190126172459-c818fa66e4c8/go.mod h1:3WdhXV3rUYy9p6AUW8d94kr+HS62Y4VL9mBnFxsD8q4=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
github.com/gorilla/csrf v1.6.0/go.mod h1:7tSf8kmjNYr7IWDCYhd3U8Ck34iQ/Yw5CJu7bAkHEGI=
github.com/gorilla/handlers v1.4.1/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ=
github.com/gorilla/mux v1.7.0/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
github.com/gorilla/mux v1.7.1 h1:Dw4jY2nghMMRsh1ol8dv1axHkDwMQK2DHerMNJsIpJU=
github.com/gorilla/mux v1.7.1/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
github.com/gorilla/mux v1.7.3 h1:gnP5JzjVOuiZD07fKKToCAOjS0yOpj/qPETTXCCS6hw=
github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4=
github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
github.com/gregjones/httpcache v0.0.0-20170728041850-787624de3eb7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
@ -300,7 +280,6 @@ github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANyt
github.com/intel-go/cpuid v0.0.0-20181003105527-1a4a6f06a1c6 h1:XboatR7lasl05yel5hNXF7kQBw2oFUGdMztcgisfhNU=
github.com/intel-go/cpuid v0.0.0-20181003105527-1a4a6f06a1c6/go.mod h1:RmeVYf9XrPRbRc3XIx0gLYA8qOFvNoPOfaEZduRlEp4=
github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU=
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
github.com/jimmidyson/go-download v0.0.0-20161028105827-7f9a90c8c95b h1:3TknJxYSK1eDe21QorC3C2Yz8jylk6vlJG9YABnFzkU=
github.com/jimmidyson/go-download v0.0.0-20161028105827-7f9a90c8c95b/go.mod h1:I3WsAhNNoG7a/d8HMlYUywJJlfOs/+/83NEUjuDp4lc=
github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
@ -409,7 +388,6 @@ github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+
github.com/natefinch/lumberjack v2.0.0+incompatible/go.mod h1:Wi9p2TTF5DG5oU+6YfsmYQpsTIOm0B1VNzQg9Mw6nPk=
github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo=
github.com/neelance/sourcemap v0.0.0-20151028013722-8c68805598ab/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM=
github.com/nkovacs/streamquote v0.0.0-20170412213628-49af9bddb229/go.mod h1:0aYXnNPJ8l7uZxf45rWW1a/uME32OF0rhiYGNQ2oF2E=
github.com/olekukonko/tablewriter v0.0.0-20160923125401-bdcc175572fd h1:nEatQ6JnwCT9iYD5uqYUiFqq8tJGX25to8KVKXqya7k=
github.com/olekukonko/tablewriter v0.0.0-20160923125401-bdcc175572fd/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
@ -544,8 +522,6 @@ github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljT
github.com/ulikunitz/xz v0.5.5 h1:pFrO0lVpTBXLpYw+pnLj6TbvHuyjXMfjGeCwSqCVwok=
github.com/ulikunitz/xz v0.5.5/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8=
github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4=
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8=
github.com/vishvananda/netlink v0.0.0-20171020171820-b2de5d10e38e/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk=
github.com/vishvananda/netns v0.0.0-20171111001504-be1fbeda1936/go.mod h1:ZjcWmFBXmLKZu9Nxj3WKYEafiSqer2rnvPr0en9UNpI=
github.com/vmware/govmomi v0.20.1/go.mod h1:URlwyTFZX72RmxtxuaFL2Uj3fD1JTvZdx59bHWk6aFU=
@ -632,7 +608,6 @@ golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5h
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181004145325-8469e314837c/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181029174526-d69651ed3497/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181128092732-4ed8d59d0b35/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=

View File

@ -30,11 +30,6 @@ type Addon struct {
// Addons is a list of all addons
var Addons = []*Addon{
{
name: "addon-manager",
set: SetBool,
callbacks: []setFn{enableOrDisableAddon},
},
{
name: "dashboard",
set: SetBool,

View File

@ -38,9 +38,12 @@ const DefaultPodCIDR = "10.244.0.0/16"
// DefaultBindIPV4 is The default IP the container will bind to.
const DefaultBindIPV4 = "127.0.0.1"
// BaseImage is the base image is used to spin up kic containers
// BaseImage is the base image is used to spin up kic containers created by kind.
const BaseImage = "gcr.io/k8s-minikube/kicbase:v0.0.1@sha256:c4ad2938877d2ae0d5b7248a5e7182ff58c0603165c3bedfe9d503e2d380a0db"
// OverlayImage is the cni plugin used for overlay image, created by kind.
const OverlayImage = "kindest/kindnetd:0.5.3"
// Driver represents a kic driver https://minikube.sigs.k8s.io/docs/reference/drivers/kic/
type Driver struct {
*drivers.BaseDriver

View File

@ -65,14 +65,6 @@ func (a *Addon) IsEnabled() (bool, error) {
// Addons is the list of addons
// TODO: Make dynamically loadable: move this data to a .yaml file within each addon directory
var Addons = map[string]*Addon{
"addon-manager": NewAddon([]*BinAsset{
MustBinAsset(
"deploy/addons/addon-manager.yaml.tmpl",
TargetDirForAddon("kube-system"),
"addon-manager.yaml.tmpl",
"0640",
true),
}, false, "addon-manager", "kube-system"),
"dashboard": NewAddon([]*BinAsset{
MustBinAsset("deploy/addons/dashboard/dashboard-clusterrole.yaml", TargetDirForAddon("kubernetes-dashboard"), "dashboard-clusterrole.yaml", "0640", false),
MustBinAsset("deploy/addons/dashboard/dashboard-clusterrolebinding.yaml", TargetDirForAddon("kubernetes-dashboard"), "dashboard-clusterrolebinding.yaml", "0640", false),

View File

@ -37,10 +37,10 @@ type LogOptions struct {
type Bootstrapper interface {
// PullImages pulls images necessary for a cluster. Success should not be required.
PullImages(config.KubernetesConfig) error
StartCluster(config.KubernetesConfig) error
StartCluster(config.MachineConfig) error
UpdateCluster(config.MachineConfig) error
DeleteCluster(config.KubernetesConfig) error
WaitForCluster(config.KubernetesConfig, time.Duration) error
WaitForCluster(config.MachineConfig, time.Duration) error
// LogCommands returns a map of log type to a command which will display that log.
LogCommands(LogOptions) map[string]string
SetupCerts(cfg config.KubernetesConfig) error
@ -51,7 +51,6 @@ type Bootstrapper interface {
const (
// Kubeadm is the kubeadm bootstrapper type
Kubeadm = "kubeadm"
KIC = "kic"
)
// GetCachedBinaryList returns the list of binaries

View File

@ -56,8 +56,8 @@ func APIServerProcess(runner command.Runner, start time.Time, timeout time.Durat
}
// SystemPods verifies essential pods for running kurnetes is running
func SystemPods(client *kubernetes.Clientset, start time.Time, ip string, port int, timeout time.Duration) error {
glog.Infof("waiting for kube-system pods to appear %s...", net.JoinHostPort(ip, fmt.Sprint(port)))
func SystemPods(client *kubernetes.Clientset, start time.Time, timeout time.Duration) error {
glog.Info("waiting for kube-system pods to appear ...")
pStart := time.Now()
podStart := time.Time{}
podList := func() (bool, error) {

View File

@ -112,7 +112,6 @@ func archTag(hasTag bool) string {
// auxiliary returns images that are helpful for running minikube
func auxiliary(mirror string) []string {
return []string{
addonManager(mirror),
storageProvisioner(mirror),
dashboardFrontend(mirror),
dashboardMetrics(mirror),
@ -124,11 +123,6 @@ func storageProvisioner(mirror string) string {
return path.Join(minikubeRepo(mirror), "storage-provisioner"+archTag(false)+"v1.8.1")
}
// addonManager returns the Kubernetes addon manager image
func addonManager(mirror string) string {
return path.Join(kubernetesRepo(mirror), "kube-addon-manager"+archTag(false)+"v9.0.2")
}
// dashboardFrontend returns the image used for the dashboard frontend
func dashboardFrontend(repo string) string {
if repo == "" {

View File

@ -24,7 +24,6 @@ import (
func TestAuxiliary(t *testing.T) {
want := []string{
"k8s.gcr.io/kube-addon-manager:v9.0.2",
"gcr.io/k8s-minikube/storage-provisioner:v1.8.1",
"kubernetesui/dashboard:v2.0.0-beta8",
"kubernetesui/metrics-scraper:v1.0.2",
@ -37,7 +36,6 @@ func TestAuxiliary(t *testing.T) {
func TestAuxiliaryMirror(t *testing.T) {
want := []string{
"test.mirror/kube-addon-manager:v9.0.2",
"test.mirror/storage-provisioner:v1.8.1",
"test.mirror/dashboard:v2.0.0-beta8",
"test.mirror/metrics-scraper:v1.0.2",

View File

@ -37,7 +37,6 @@ func TestKubeadmImages(t *testing.T) {
"k8s.gcr.io/coredns:1.6.5",
"k8s.gcr.io/etcd:3.4.3-0",
"k8s.gcr.io/pause:3.1",
"k8s.gcr.io/kube-addon-manager:v9.0.2",
"gcr.io/k8s-minikube/storage-provisioner:v1.8.1",
"kubernetesui/dashboard:v2.0.0-beta8",
"kubernetesui/metrics-scraper:v1.0.2",
@ -50,7 +49,6 @@ func TestKubeadmImages(t *testing.T) {
"mirror.k8s.io/coredns:1.6.2",
"mirror.k8s.io/etcd:3.3.15-0",
"mirror.k8s.io/pause:3.1",
"mirror.k8s.io/kube-addon-manager:v9.0.2",
"mirror.k8s.io/storage-provisioner:v1.8.1",
"mirror.k8s.io/dashboard:v2.0.0-beta8",
"mirror.k8s.io/metrics-scraper:v1.0.2",
@ -63,7 +61,6 @@ func TestKubeadmImages(t *testing.T) {
"k8s.gcr.io/coredns:1.3.1",
"k8s.gcr.io/etcd:3.3.10",
"k8s.gcr.io/pause:3.1",
"k8s.gcr.io/kube-addon-manager:v9.0.2",
"gcr.io/k8s-minikube/storage-provisioner:v1.8.1",
"kubernetesui/dashboard:v2.0.0-beta8",
"kubernetesui/metrics-scraper:v1.0.2",
@ -76,7 +73,6 @@ func TestKubeadmImages(t *testing.T) {
"k8s.gcr.io/coredns:1.3.1",
"k8s.gcr.io/etcd:3.3.10",
"k8s.gcr.io/pause:3.1",
"k8s.gcr.io/kube-addon-manager:v9.0.2",
"gcr.io/k8s-minikube/storage-provisioner:v1.8.1",
"kubernetesui/dashboard:v2.0.0-beta8",
"kubernetesui/metrics-scraper:v1.0.2",
@ -89,7 +85,6 @@ func TestKubeadmImages(t *testing.T) {
"k8s.gcr.io/coredns:1.2.6",
"k8s.gcr.io/etcd:3.2.24",
"k8s.gcr.io/pause:3.1",
"k8s.gcr.io/kube-addon-manager:v9.0.2",
"gcr.io/k8s-minikube/storage-provisioner:v1.8.1",
"kubernetesui/dashboard:v2.0.0-beta8",
"kubernetesui/metrics-scraper:v1.0.2",
@ -102,7 +97,6 @@ func TestKubeadmImages(t *testing.T) {
"k8s.gcr.io/coredns:1.2.2",
"k8s.gcr.io/etcd:3.2.24",
"k8s.gcr.io/pause:3.1",
"k8s.gcr.io/kube-addon-manager:v9.0.2",
"gcr.io/k8s-minikube/storage-provisioner:v1.8.1",
"kubernetesui/dashboard:v2.0.0-beta8",
"kubernetesui/metrics-scraper:v1.0.2",
@ -115,7 +109,6 @@ func TestKubeadmImages(t *testing.T) {
"k8s.gcr.io/coredns:1.1.3",
"k8s.gcr.io/etcd-amd64:3.2.18",
"k8s.gcr.io/pause:3.1",
"k8s.gcr.io/kube-addon-manager:v9.0.2",
"gcr.io/k8s-minikube/storage-provisioner:v1.8.1",
"kubernetesui/dashboard:v2.0.0-beta8",
"kubernetesui/metrics-scraper:v1.0.2",

View File

@ -1,134 +0,0 @@
/*
Copyright 2019 The Kubernetes Authors All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Package kicbs bootstrapper for kic
package kicbs
const defaultCNIManifest = `
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: kindnet
rules:
- apiGroups:
- policy
resources:
- podsecuritypolicies
verbs:
- use
resourceNames:
- kindnet
- apiGroups:
- ""
resources:
- nodes
verbs:
- list
- watch
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: kindnet
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: kindnet
subjects:
- kind: ServiceAccount
name: kindnet
namespace: kube-system
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: kindnet
namespace: kube-system
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: kindnet
namespace: kube-system
labels:
tier: node
app: kindnet
k8s-app: kindnet
spec:
selector:
matchLabels:
app: kindnet
template:
metadata:
labels:
tier: node
app: kindnet
k8s-app: kindnet
spec:
hostNetwork: true
tolerations:
- operator: Exists
effect: NoSchedule
serviceAccountName: kindnet
containers:
- name: kindnet-cni
image: kindest/kindnetd:0.5.3
env:
- name: HOST_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: POD_SUBNET
value: 10.244.0.0/16
volumeMounts:
- name: cni-cfg
mountPath: /etc/cni/net.d
- name: xtables-lock
mountPath: /run/xtables.lock
readOnly: false
- name: lib-modules
mountPath: /lib/modules
readOnly: true
resources:
requests:
cpu: "100m"
memory: "50Mi"
limits:
cpu: "100m"
memory: "50Mi"
securityContext:
privileged: false
capabilities:
add: ["NET_RAW", "NET_ADMIN"]
volumes:
- name: cni-cfg
hostPath:
path: /etc/cni/net.d
- name: xtables-lock
hostPath:
path: /run/xtables.lock
type: FileOrCreate
- name: lib-modules
hostPath:
path: /lib/modules
---
`

View File

@ -1,346 +0,0 @@
/*
Copyright 2019 The Kubernetes Authors All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Package kicbs bootstrapper for kic
package kicbs
import (
"fmt"
"net"
"os/exec"
"strings"
"time"
"github.com/blang/semver"
"github.com/docker/machine/libmachine"
"github.com/golang/glog"
"github.com/pkg/errors"
"github.com/spf13/viper"
"k8s.io/client-go/kubernetes"
kconst "k8s.io/kubernetes/cmd/kubeadm/app/constants"
"k8s.io/minikube/pkg/drivers/kic"
"k8s.io/minikube/pkg/kapi"
"k8s.io/minikube/pkg/minikube/assets"
"k8s.io/minikube/pkg/minikube/bootstrapper"
"k8s.io/minikube/pkg/minikube/bootstrapper/bsutil"
"k8s.io/minikube/pkg/minikube/bootstrapper/bsutil/kverify"
"k8s.io/minikube/pkg/minikube/bootstrapper/images"
"k8s.io/minikube/pkg/minikube/command"
"k8s.io/minikube/pkg/minikube/config"
"k8s.io/minikube/pkg/minikube/constants"
"k8s.io/minikube/pkg/minikube/cruntime"
"k8s.io/minikube/pkg/minikube/machine"
"k8s.io/minikube/pkg/minikube/out"
"k8s.io/minikube/pkg/minikube/vmpath"
)
// Bootstrapper is a bootstrapper using kicbs
type Bootstrapper struct {
c command.Runner
k8sClient *kubernetes.Clientset // kubernetes client used to verify pods inside cluster
contextName string
}
// NewBootstrapper creates a new kicbs.Bootstrapper
func NewBootstrapper(api libmachine.API) (*Bootstrapper, error) {
name := viper.GetString(config.MachineProfile)
h, err := api.Load(name)
if err != nil {
return nil, errors.Wrap(err, "getting api client")
}
runner, err := machine.CommandRunner(h)
if err != nil {
return nil, errors.Wrap(err, "command runner")
}
return &Bootstrapper{c: runner, contextName: name}, nil
}
// UpdateCluster updates the cluster
func (k *Bootstrapper) UpdateCluster(cfg config.MachineConfig) error {
images, err := images.Kubeadm(cfg.KubernetesConfig.ImageRepository, cfg.KubernetesConfig.KubernetesVersion)
if err != nil {
return errors.Wrap(err, "kic images")
}
if cfg.KubernetesConfig.ShouldLoadCachedImages {
if err := machine.LoadImages(&cfg, k.c, images, constants.ImageCacheDir); err != nil {
out.FailureT("Unable to load cached images: {{.error}}", out.V{"error": err})
}
}
r, err := cruntime.New(cruntime.Config{Type: cfg.ContainerRuntime, Socket: cfg.KubernetesConfig.CRISocket, Runner: k.c})
if err != nil {
return errors.Wrap(err, "runtime")
}
kubeadmCfg, err := bsutil.GenerateKubeadmYAML(cfg.KubernetesConfig, r)
if err != nil {
return errors.Wrap(err, "generating kubeadm cfg")
}
kubeletCfg, err := bsutil.NewKubeletConfig(cfg.KubernetesConfig, r)
if err != nil {
return errors.Wrap(err, "generating kubelet config")
}
kubeletService, err := bsutil.NewKubeletService(cfg.KubernetesConfig)
if err != nil {
return errors.Wrap(err, "generating kubelet service")
}
glog.Infof("kubelet %s config:\n%+v", kubeletCfg, cfg.KubernetesConfig)
stopCmd := exec.Command("/bin/bash", "-c", "pgrep kubelet && sudo systemctl stop kubelet")
// stop kubelet to avoid "Text File Busy" error
if rr, err := k.c.RunCmd(stopCmd); err != nil {
glog.Warningf("unable to stop kubelet: %s command: %q output: %q", err, rr.Command(), rr.Output())
}
if err := bsutil.TransferBinaries(cfg.KubernetesConfig, k.c); err != nil {
return errors.Wrap(err, "downloading binaries")
}
cniFile := []byte(defaultCNIManifest)
files := bsutil.ConfigFileAssets(cfg.KubernetesConfig, kubeadmCfg, kubeletCfg, kubeletService, cniFile)
if err := bsutil.AddAddons(&files, assets.GenerateTemplateData(cfg.KubernetesConfig)); err != nil {
return errors.Wrap(err, "adding addons")
}
for _, f := range files {
if err := k.c.Copy(f); err != nil {
return errors.Wrapf(err, "copy")
}
}
if _, err := k.c.RunCmd(exec.Command("/bin/bash", "-c", "sudo systemctl daemon-reload && sudo systemctl start kubelet")); err != nil {
return errors.Wrap(err, "starting kubelet")
}
return nil
}
// SetupCerts generates the certs the cluster
func (k *Bootstrapper) SetupCerts(cfg config.KubernetesConfig) error {
return bootstrapper.SetupCerts(k.c, cfg)
}
// PullImages downloads images that will be used by Kubernetes
func (k *Bootstrapper) PullImages(k8s config.KubernetesConfig) error {
version, err := bsutil.ParseKubernetesVersion(k8s.KubernetesVersion)
if err != nil {
return errors.Wrap(err, "parsing kubernetes version")
}
if version.LT(semver.MustParse("1.11.0")) {
return fmt.Errorf("pull command is not supported by kubeadm v%s", version)
}
rr, err := k.c.RunCmd(exec.Command("/bin/bash", "-c", fmt.Sprintf("%s config images pull --config %s", bsutil.InvokeKubeadm(k8s.KubernetesVersion), bsutil.KubeadmYamlPath)))
if err != nil {
return errors.Wrapf(err, "running cmd: %q", rr.Command())
}
return nil
}
// StartCluster starts the cluster
func (k *Bootstrapper) StartCluster(k8s config.KubernetesConfig) error {
k8s.NodeIP = kic.DefaultBindIPV4
err := bsutil.ExistingConfig(k.c)
if err == nil { // if there is an existing cluster don't reconfigure it
return k.restartCluster(k8s)
}
glog.Infof("existence check: %v", err)
start := time.Now()
glog.Infof("StartCluster: %+v", k8s)
defer func() {
glog.Infof("StartCluster complete in %s", time.Since(start))
}()
extraFlags := bsutil.CreateFlagsFromExtraArgs(k8s.ExtraOptions)
r, err := cruntime.New(cruntime.Config{Type: k8s.ContainerRuntime})
if err != nil {
return err
}
ignore := []string{
fmt.Sprintf("DirAvailable-%s", strings.Replace(vmpath.GuestManifestsDir, "/", "-", -1)),
fmt.Sprintf("DirAvailable-%s", strings.Replace(vmpath.GuestPersistentDir, "/", "-", -1)),
fmt.Sprintf("DirAvailable-%s", strings.Replace(bsutil.EtcdDataDir(), "/", "-", -1)),
"FileAvailable--etc-kubernetes-manifests-kube-scheduler.yaml",
"FileAvailable--etc-kubernetes-manifests-kube-apiserver.yaml",
"FileAvailable--etc-kubernetes-manifests-kube-controller-manager.yaml",
"FileAvailable--etc-kubernetes-manifests-etcd.yaml",
"FileContent--proc-sys-net-bridge-bridge-nf-call-iptables", // for kic only
"Port-10250", // For "none" users who already have a kubelet online
"Swap", // For "none" users who have swap configured
"SystemVerification", // For kic on linux example error: "modprobe: FATAL: Module configs not found in directory /lib/modules/5.2.17-1rodete3-amd64"
}
ignore = append(ignore, bsutil.SkipAdditionalPreflights[r.Name()]...)
c := exec.Command("/bin/bash", "-c", fmt.Sprintf("%s init --config %s %s --ignore-preflight-errors=%s", bsutil.InvokeKubeadm(k8s.KubernetesVersion), bsutil.KubeadmYamlPath, extraFlags, strings.Join(ignore, ",")))
glog.Infof("starting kubeadm init")
if rr, err := k.c.RunCmd(c); err != nil {
return errors.Wrapf(err, "init failed. cmd: %q output: %q", rr.Command(), rr.Output())
}
glog.Infof("applying kic overlay network")
if err := k.applyOverlayNetwork(); err != nil {
return errors.Wrap(err, "applying kic overlay network")
}
glog.Infof("Skipping Configuring cluster permissions for kic...")
if err := bsutil.AdjustResourceLimits(k.c); err != nil {
glog.Warningf("unable to adjust resource limits: %v", err)
}
return nil
}
// restartCluster restarts the Kubernetes cluster configured by kubeadm
func (k *Bootstrapper) restartCluster(k8s config.KubernetesConfig) error {
glog.Infof("restartCluster start")
start := time.Now()
defer func() {
glog.Infof("restartCluster took %s", time.Since(start))
}()
version, err := bsutil.ParseKubernetesVersion(k8s.KubernetesVersion)
if err != nil {
return errors.Wrap(err, "parsing kubernetes version")
}
phase := "alpha"
controlPlane := "controlplane"
if version.GTE(semver.MustParse("1.13.0")) {
phase = "init"
controlPlane = "control-plane"
}
baseCmd := fmt.Sprintf("%s %s", bsutil.InvokeKubeadm(k8s.KubernetesVersion), phase)
cmds := []string{
fmt.Sprintf("%s phase certs all --config %s", baseCmd, bsutil.KubeadmYamlPath),
fmt.Sprintf("%s phase kubeconfig all --config %s", baseCmd, bsutil.KubeadmYamlPath),
fmt.Sprintf("%s phase %s all --config %s", baseCmd, controlPlane, bsutil.KubeadmYamlPath),
fmt.Sprintf("%s phase etcd local --config %s", baseCmd, bsutil.KubeadmYamlPath),
}
// Run commands one at a time so that it is easier to root cause failures.
for _, c := range cmds {
rr, err := k.c.RunCmd(exec.Command("/bin/bash", "-c", c))
if err != nil {
return errors.Wrapf(err, "running cmd: %s", rr.Command())
}
}
// We must ensure that the apiserver is healthy before proceeding
if err := kverify.APIServerProcess(k.c, time.Now(), kconst.DefaultControlPlaneTimeout); err != nil {
return errors.Wrap(err, "apiserver healthz")
}
client, err := k.client(k8s)
if err != nil {
return errors.Wrap(err, "getting k8s client")
}
if err := kverify.SystemPods(client, time.Now(), k8s.NodeIP, k8s.NodePort, kconst.DefaultControlPlaneTimeout); err != nil {
return errors.Wrap(err, "system pods")
}
// Explicitly re-enable kubeadm addons (proxy, coredns) so that they will check for IP or configuration changes.
if rr, err := k.c.RunCmd(exec.Command("/bin/bash", "-c", fmt.Sprintf("%s phase addon all --config %s", baseCmd, bsutil.KubeadmYamlPath))); err != nil {
return errors.Wrapf(err, fmt.Sprintf("addon phase cmd:%q", rr.Command()))
}
if err := bsutil.AdjustResourceLimits(k.c); err != nil {
glog.Warningf("unable to adjust resource limits: %v", err)
}
return nil
}
// WaitForCluster blocks until the cluster appears to be healthy
func (k *Bootstrapper) WaitForCluster(k8s config.KubernetesConfig, timeout time.Duration) error {
start := time.Now()
out.T(out.Waiting, "Waiting for cluster to come online ...")
if err := kverify.APIServerProcess(k.c, start, timeout); err != nil {
return errors.Wrap(err, "wait for api proc")
}
if err := kverify.APIServerIsRunning(start, "127.0.0.1", k8s.NodePort, timeout); err != nil {
return err
}
c, err := k.client(k8s) // getting kubernetes client before polling.
if err != nil {
return errors.Wrap(err, "get k8s client")
}
if err := kverify.SystemPods(c, start, "127.0.0.1", k8s.NodePort, timeout); err != nil {
return errors.Wrap(err, "wait for system pods")
}
return nil
}
func (k *Bootstrapper) DeleteCluster(config.KubernetesConfig) error {
return fmt.Errorf("the DeleteCluster is not implemented in kicbs yet")
}
func (k *Bootstrapper) LogCommands(bootstrapper.LogOptions) map[string]string {
return map[string]string{}
}
func (k *Bootstrapper) GetKubeletStatus() (string, error) {
return "", fmt.Errorf("the GetKubeletStatus is not implemented in kicbs yet")
}
func (k *Bootstrapper) GetAPIServerStatus(net.IP, int) (string, error) {
return "", fmt.Errorf("the GetAPIServerStatus is not implemented in kicbs yet")
}
// client sets and returns a Kubernetes client to use to speak to a kubeadm launched apiserver
func (k *Bootstrapper) client(k8s config.KubernetesConfig) (*kubernetes.Clientset, error) {
if k.k8sClient != nil {
return k.k8sClient, nil
}
config, err := kapi.ClientConfig(k.contextName)
if err != nil {
return nil, errors.Wrap(err, "client config")
}
endpoint := fmt.Sprintf("https://%s", net.JoinHostPort("127.0.0.1", fmt.Sprint(k8s.NodePort)))
if config.Host != endpoint {
glog.Errorf("Overriding stale ClientConfig host %s with %s", config.Host, endpoint)
config.Host = endpoint
}
c, err := kubernetes.NewForConfig(config)
if err == nil {
k.k8sClient = c
}
return c, err
}
// applyOverlayNetwork applies the CNI plugin needed to make kic work
func (k *Bootstrapper) applyOverlayNetwork() error {
cmd := exec.Command(
"kubectl", "create", "--kubeconfig=/etc/kubernetes/admin.conf",
"-f", bsutil.DefaultCNIConfigPath,
)
if rr, err := k.c.RunCmd(cmd); err != nil {
return errors.Wrapf(err, "cmd: %s output: %s", rr.Command(), rr.Output())
}
return nil
}

View File

@ -16,6 +16,8 @@ limitations under the License.
package kubeadm
import "html/template"
// defaultCNIConfig is the CNI config which is provisioned when --enable-default-cni
// has been passed to `minikube start`.
//
@ -42,3 +44,119 @@ const defaultCNIConfig = `
}
}
`
// kicCNIConfig is the cni plugin needed for kic uses cni plugin created by kind https://github.com/kubernetes-sigs/kind/blob/03a4b519067dc308308cce735065c47a6fda1583/pkg/build/node/cni.go
var kicCNIConfig = template.Must(template.New("kubeletServiceTemplate").Parse(`---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: kindnet
rules:
- apiGroups:
- policy
resources:
- podsecuritypolicies
verbs:
- use
resourceNames:
- kindnet
- apiGroups:
- ""
resources:
- nodes
verbs:
- list
- watch
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: kindnet
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: kindnet
subjects:
- kind: ServiceAccount
name: kindnet
namespace: kube-system
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: kindnet
namespace: kube-system
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: kindnet
namespace: kube-system
labels:
tier: node
app: kindnet
k8s-app: kindnet
spec:
selector:
matchLabels:
app: kindnet
template:
metadata:
labels:
tier: node
app: kindnet
k8s-app: kindnet
spec:
hostNetwork: true
tolerations:
- operator: Exists
effect: NoSchedule
serviceAccountName: kindnet
containers:
- name: kindnet-cni
image: {{.ImageName}}
env:
- name: HOST_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: POD_SUBNET
value: 10.244.0.0/16
volumeMounts:
- name: cni-cfg
mountPath: /etc/cni/net.d
- name: xtables-lock
mountPath: /run/xtables.lock
readOnly: false
- name: lib-modules
mountPath: /lib/modules
readOnly: true
resources:
requests:
cpu: "100m"
memory: "50Mi"
limits:
cpu: "100m"
memory: "50Mi"
securityContext:
privileged: false
capabilities:
add: ["NET_RAW", "NET_ADMIN"]
volumes:
- name: cni-cfg
hostPath:
path: /etc/cni/net.d
- name: xtables-lock
hostPath:
path: /run/xtables.lock
type: FileOrCreate
- name: lib-modules
hostPath:
path: /lib/modules
---
`))

View File

@ -17,7 +17,9 @@ limitations under the License.
package kubeadm
import (
"bytes"
"os/exec"
"path"
"fmt"
"net"
@ -36,6 +38,7 @@ import (
"github.com/spf13/viper"
"k8s.io/client-go/kubernetes"
kconst "k8s.io/kubernetes/cmd/kubeadm/app/constants"
"k8s.io/minikube/pkg/drivers/kic"
"k8s.io/minikube/pkg/kapi"
"k8s.io/minikube/pkg/minikube/assets"
"k8s.io/minikube/pkg/minikube/bootstrapper"
@ -46,6 +49,7 @@ import (
"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/machine"
"k8s.io/minikube/pkg/minikube/out"
"k8s.io/minikube/pkg/minikube/vmpath"
@ -139,26 +143,29 @@ func (k *Bootstrapper) createCompatSymlinks() error {
}
// StartCluster starts the cluster
func (k *Bootstrapper) StartCluster(k8s config.KubernetesConfig) error {
func (k *Bootstrapper) StartCluster(cfg config.MachineConfig) error {
if driver.IsKIC(cfg.VMDriver) {
cfg.KubernetesConfig.NodeIP = kic.DefaultBindIPV4
}
err := bsutil.ExistingConfig(k.c)
if err == nil { // if there is an existing cluster don't reconfigure it
return k.restartCluster(k8s)
return k.restartCluster(cfg)
}
glog.Infof("existence check: %v", err)
start := time.Now()
glog.Infof("StartCluster: %+v", k8s)
glog.Infof("StartCluster: %+v", cfg)
defer func() {
glog.Infof("StartCluster complete in %s", time.Since(start))
}()
version, err := bsutil.ParseKubernetesVersion(k8s.KubernetesVersion)
version, err := bsutil.ParseKubernetesVersion(cfg.KubernetesConfig.KubernetesVersion)
if err != nil {
return errors.Wrap(err, "parsing kubernetes version")
}
extraFlags := bsutil.CreateFlagsFromExtraArgs(k8s.ExtraOptions)
r, err := cruntime.New(cruntime.Config{Type: k8s.ContainerRuntime})
extraFlags := bsutil.CreateFlagsFromExtraArgs(cfg.KubernetesConfig.ExtraOptions)
r, err := cruntime.New(cruntime.Config{Type: cfg.KubernetesConfig.ContainerRuntime})
if err != nil {
return err
}
@ -173,31 +180,47 @@ func (k *Bootstrapper) StartCluster(k8s config.KubernetesConfig) error {
"FileAvailable--etc-kubernetes-manifests-etcd.yaml",
"Port-10250", // For "none" users who already have a kubelet online
"Swap", // For "none" users who have swap configured
"SystemVerification",
}
ignore = append(ignore, bsutil.SkipAdditionalPreflights[r.Name()]...)
// Allow older kubeadm versions to function with newer Docker releases.
if version.LT(semver.MustParse("1.13.0")) {
// 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) {
glog.Infof("Older Kubernetes release detected (%s), disabling SystemVerification check.", version)
ignore = append(ignore, "SystemVerification")
}
c := exec.Command("/bin/bash", "-c", fmt.Sprintf("%s init --config %s %s --ignore-preflight-errors=%s", bsutil.InvokeKubeadm(k8s.KubernetesVersion), bsutil.KubeadmYamlPath, extraFlags, strings.Join(ignore, ",")))
if rr, err := k.c.RunCmd(c); err != nil {
return errors.Wrapf(err, "init failed. cmd: %q", rr.Command())
if driver.IsKIC(cfg.VMDriver) { // 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")
}
glog.Infof("Configuring cluster permissions ...")
elevate := func() error {
client, err := k.client(k8s)
if err != nil {
return err
c := exec.Command("/bin/bash", "-c", fmt.Sprintf("%s init --config %s %s --ignore-preflight-errors=%s", bsutil.InvokeKubeadm(cfg.KubernetesConfig.KubernetesVersion), bsutil.KubeadmYamlPath, extraFlags, strings.Join(ignore, ",")))
rr, err := k.c.RunCmd(c)
if err != nil {
return errors.Wrapf(err, "init failed. output: %q", rr.Output())
}
if driver.IsKIC(cfg.VMDriver) {
if err := k.applyKicOverlay(cfg); err != nil {
return errors.Wrap(err, "applying kic overlay network")
}
return bsutil.ElevateKubeSystemPrivileges(client)
}
if err := retry.Expo(elevate, time.Millisecond*500, 120*time.Second); err != nil {
return errors.Wrap(err, "timed out waiting to elevate kube-system RBAC privileges")
if !driver.IsKIC(cfg.VMDriver) { // 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(cfg)
if err != nil {
return err
}
return bsutil.ElevateKubeSystemPrivileges(client)
}
if err := retry.Expo(elevate, time.Millisecond*500, 120*time.Second); err != nil {
return errors.Wrap(err, "timed out waiting to elevate kube-system RBAC privileges")
}
}
if err := bsutil.AdjustResourceLimits(k.c); err != nil {
@ -208,7 +231,7 @@ func (k *Bootstrapper) StartCluster(k8s config.KubernetesConfig) error {
}
// client sets and returns a Kubernetes client to use to speak to a kubeadm launched apiserver
func (k *Bootstrapper) client(k8s config.KubernetesConfig) (*kubernetes.Clientset, error) {
func (k *Bootstrapper) client(cfg config.MachineConfig) (*kubernetes.Clientset, error) {
if k.k8sClient != nil {
return k.k8sClient, nil
}
@ -218,7 +241,8 @@ func (k *Bootstrapper) client(k8s config.KubernetesConfig) (*kubernetes.Clientse
return nil, errors.Wrap(err, "client config")
}
endpoint := fmt.Sprintf("https://%s", net.JoinHostPort(k8s.NodeIP, strconv.Itoa(k8s.NodePort)))
ip, port := k.clientEndpointAddr(cfg)
endpoint := fmt.Sprintf("https://%s", net.JoinHostPort(ip, strconv.Itoa(port)))
if config.Host != endpoint {
glog.Errorf("Overriding stale ClientConfig host %s with %s", config.Host, endpoint)
config.Host = endpoint
@ -231,26 +255,27 @@ func (k *Bootstrapper) client(k8s config.KubernetesConfig) (*kubernetes.Clientse
}
// WaitForCluster blocks until the cluster appears to be healthy
func (k *Bootstrapper) WaitForCluster(k8s config.KubernetesConfig, timeout time.Duration) error {
func (k *Bootstrapper) WaitForCluster(cfg config.MachineConfig, timeout time.Duration) error {
start := time.Now()
ip, port := k.clientEndpointAddr(cfg)
out.T(out.Waiting, "Waiting for cluster to come online ...")
if err := kverify.APIServerProcess(k.c, start, timeout); err != nil {
return err
}
if err := kverify.APIServerIsRunning(start, k8s.NodeIP, k8s.NodePort, timeout); err != nil {
if err := kverify.APIServerIsRunning(start, ip, port, timeout); err != nil {
return err
}
c, err := k.client(k8s)
c, err := k.client(cfg)
if err != nil {
return errors.Wrap(err, "get k8s client")
}
return kverify.SystemPods(c, start, k8s.NodeIP, k8s.NodePort, timeout)
return kverify.SystemPods(c, start, timeout)
}
// restartCluster restarts the Kubernetes cluster configured by kubeadm
func (k *Bootstrapper) restartCluster(k8s config.KubernetesConfig) error {
func (k *Bootstrapper) restartCluster(cfg config.MachineConfig) error {
glog.Infof("restartCluster start")
start := time.Now()
@ -258,7 +283,7 @@ func (k *Bootstrapper) restartCluster(k8s config.KubernetesConfig) error {
glog.Infof("restartCluster took %s", time.Since(start))
}()
version, err := bsutil.ParseKubernetesVersion(k8s.KubernetesVersion)
version, err := bsutil.ParseKubernetesVersion(cfg.KubernetesConfig.KubernetesVersion)
if err != nil {
return errors.Wrap(err, "parsing kubernetes version")
}
@ -274,7 +299,7 @@ func (k *Bootstrapper) restartCluster(k8s config.KubernetesConfig) error {
glog.Errorf("failed to create compat symlinks: %v", err)
}
baseCmd := fmt.Sprintf("%s %s", bsutil.InvokeKubeadm(k8s.KubernetesVersion), phase)
baseCmd := fmt.Sprintf("%s %s", bsutil.InvokeKubeadm(cfg.KubernetesConfig.KubernetesVersion), phase)
cmds := []string{
fmt.Sprintf("%s phase certs all --config %s", baseCmd, bsutil.KubeadmYamlPath),
fmt.Sprintf("%s phase kubeconfig all --config %s", baseCmd, bsutil.KubeadmYamlPath),
@ -295,12 +320,12 @@ func (k *Bootstrapper) restartCluster(k8s config.KubernetesConfig) error {
return errors.Wrap(err, "apiserver healthz")
}
client, err := k.client(k8s)
client, err := k.client(cfg)
if err != nil {
return errors.Wrap(err, "getting k8s client")
}
if err := kverify.SystemPods(client, time.Now(), k8s.NodeIP, k8s.NodePort, kconst.DefaultControlPlaneTimeout); err != nil {
if err := kverify.SystemPods(client, time.Now(), kconst.DefaultControlPlaneTimeout); err != nil {
return errors.Wrap(err, "system pods")
}
@ -420,3 +445,28 @@ func (k *Bootstrapper) UpdateCluster(cfg config.MachineConfig) error {
}
return nil
}
// applyKicOverlay applies the CNI plugin needed to make kic work
func (k *Bootstrapper) applyKicOverlay(cfg config.MachineConfig) error {
cmd := exec.Command("sudo",
path.Join("/var/lib/minikube/binaries", cfg.KubernetesConfig.KubernetesVersion, "kubectl"), "create", "--kubeconfig=/var/lib/minikube/kubeconfig",
"-f", "-")
b := bytes.Buffer{}
if err := kicCNIConfig.Execute(&b, struct{ ImageName string }{ImageName: kic.OverlayImage}); err != nil {
return err
}
cmd.Stdin = bytes.NewReader(b.Bytes())
if rr, err := k.c.RunCmd(cmd); err != nil {
return errors.Wrapf(err, "cmd: %s output: %s", rr.Command(), rr.Output())
}
return nil
}
// clientEndpointAddr returns ip and port accessible for the kubernetes clients to talk to the cluster
func (k *Bootstrapper) clientEndpointAddr(cfg config.MachineConfig) (string, int) {
if driver.IsKIC(cfg.VMDriver) {
// because docker container ip on non-linux is not accesible
return kic.DefaultBindIPV4, cfg.KubernetesConfig.NodePort
}
return cfg.KubernetesConfig.NodeIP, cfg.KubernetesConfig.NodePort
}

View File

@ -169,7 +169,11 @@ func (k *kicRunner) Copy(f assets.CopyableFile) error {
// Remove removes a file
func (k *kicRunner) Remove(f assets.CopyableFile) error {
return fmt.Errorf("not implemented yet for kic runner")
fp := path.Join(f.GetTargetDir(), f.GetTargetName())
if rr, err := k.RunCmd(exec.Command("sudo", "rm", fp)); err != nil {
return errors.Wrapf(err, "removing file %q output: %s", fp, rr.Output())
}
return nil
}
// isTerminal returns true if the writer w is a terminal

View File

@ -18,7 +18,6 @@ package cruntime
import (
"bytes"
"encoding/base64"
"encoding/json"
"fmt"
"html/template"
@ -28,310 +27,9 @@ import (
"github.com/golang/glog"
"github.com/pkg/errors"
"k8s.io/minikube/pkg/minikube/bootstrapper/images"
"k8s.io/minikube/pkg/minikube/command"
)
const (
// CRIOConfFile is the path to the CRI-O configuration
crioConfigFile = "/etc/crio/crio.conf"
crioConfigTemplate = `# The CRI-O configuration file specifies all of the available configuration
# options and command-line flags for the crio(8) OCI Kubernetes Container Runtime
# daemon, but in a TOML format that can be more easily modified and versioned.
#
# Please refer to crio.conf(5) for details of all configuration options.
# CRI-O supports partial configuration reload during runtime, which can be
# done by sending SIGHUP to the running process. Currently supported options
# are explicitly mentioned with: 'This option supports live configuration
# reload'.
# CRI-O reads its storage defaults from the containers-storage.conf(5) file
# located at /etc/containers/storage.conf. Modify this storage configuration if
# you want to change the system's defaults. If you want to modify storage just
# for CRI-O, you can change the storage configuration options here.
[crio]
# Path to the "root directory". CRI-O stores all of its data, including
# containers images, in this directory.
root = "/var/lib/containers/storage"
# Path to the "run directory". CRI-O stores all of its state in this directory.
runroot = "/var/run/containers/storage"
# Storage driver used to manage the storage of images and containers. Please
# refer to containers-storage.conf(5) to see all available storage drivers.
storage_driver = "overlay"
# List to pass options to the storage driver. Please refer to
# containers-storage.conf(5) to see all available storage options.
#storage_option = [
#]
# If set to false, in-memory locking will be used instead of file-based locking.
# **Deprecated** this option will be removed in the future.
file_locking = false
# Path to the lock file.
# **Deprecated** this option will be removed in the future.
file_locking_path = "/run/crio.lock"
# The crio.api table contains settings for the kubelet/gRPC interface.
[crio.api]
# Path to AF_LOCAL socket on which CRI-O will listen.
listen = "/var/run/crio/crio.sock"
# IP address on which the stream server will listen.
stream_address = "127.0.0.1"
# The port on which the stream server will listen.
stream_port = "0"
# Enable encrypted TLS transport of the stream server.
stream_enable_tls = false
# Path to the x509 certificate file used to serve the encrypted stream. This
# file can change, and CRI-O will automatically pick up the changes within 5
# minutes.
stream_tls_cert = ""
# Path to the key file used to serve the encrypted stream. This file can
# change, and CRI-O will automatically pick up the changes within 5 minutes.
stream_tls_key = ""
# Path to the x509 CA(s) file used to verify and authenticate client
# communication with the encrypted stream. This file can change, and CRI-O will
# automatically pick up the changes within 5 minutes.
stream_tls_ca = ""
# Maximum grpc send message size in bytes. If not set or <=0, then CRI-O will default to 16 * 1024 * 1024.
grpc_max_send_msg_size = 16777216
# Maximum grpc receive message size. If not set or <= 0, then CRI-O will default to 16 * 1024 * 1024.
grpc_max_recv_msg_size = 16777216
# The crio.runtime table contains settings pertaining to the OCI runtime used
# and options for how to set up and manage the OCI runtime.
[crio.runtime]
# A list of ulimits to be set in containers by default, specified as
# "<ulimit name>=<soft limit>:<hard limit>", for example:
# "nofile=1024:2048"
# If nothing is set here, settings will be inherited from the CRI-O daemon
#default_ulimits = [
#]
# default_runtime is the _name_ of the OCI runtime to be used as the default.
# The name is matched against the runtimes map below.
default_runtime = "runc"
# If true, the runtime will not use pivot_root, but instead use MS_MOVE.
no_pivot = true
# Path to the conmon binary, used for monitoring the OCI runtime.
conmon = "/usr/libexec/crio/conmon"
# Cgroup setting for conmon
conmon_cgroup = "pod"
# Environment variable list for the conmon process, used for passing necessary
# environment variables to conmon or the runtime.
conmon_env = [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
]
# If true, SELinux will be used for pod separation on the host.
selinux = false
# Path to the seccomp.json profile which is used as the default seccomp profile
# for the runtime. If not specified, then the internal default seccomp profile
# will be used.
seccomp_profile = ""
# Used to change the name of the default AppArmor profile of CRI-O. The default
# profile name is "crio-default-" followed by the version string of CRI-O.
apparmor_profile = "crio-default"
# Cgroup management implementation used for the runtime.
cgroup_manager = "cgroupfs"
# List of default capabilities for containers. If it is empty or commented out,
# only the capabilities defined in the containers json file by the user/kube
# will be added.
default_capabilities = [
"CHOWN",
"DAC_OVERRIDE",
"FSETID",
"FOWNER",
"NET_RAW",
"SETGID",
"SETUID",
"SETPCAP",
"NET_BIND_SERVICE",
"SYS_CHROOT",
"KILL",
]
# List of default sysctls. If it is empty or commented out, only the sysctls
# defined in the container json file by the user/kube will be added.
default_sysctls = [
]
# List of additional devices. specified as
# "<device-on-host>:<device-on-container>:<permissions>", for example: "--device=/dev/sdc:/dev/xvdc:rwm".
#If it is empty or commented out, only the devices
# defined in the container json file by the user/kube will be added.
additional_devices = [
]
# Path to OCI hooks directories for automatically executed hooks.
hooks_dir = [
]
# List of default mounts for each container. **Deprecated:** this option will
# be removed in future versions in favor of default_mounts_file.
default_mounts = [
]
# Path to the file specifying the defaults mounts for each container. The
# format of the config is /SRC:/DST, one mount per line. Notice that CRI-O reads
# its default mounts from the following two files:
#
# 1) /etc/containers/mounts.conf (i.e., default_mounts_file): This is the
# override file, where users can either add in their own default mounts, or
# override the default mounts shipped with the package.
#
# 2) /usr/share/containers/mounts.conf: This is the default file read for
# mounts. If you want CRI-O to read from a different, specific mounts file,
# you can change the default_mounts_file. Note, if this is done, CRI-O will
# only add mounts it finds in this file.
#
#default_mounts_file = ""
# Maximum number of processes allowed in a container.
pids_limit = 1024
# Maximum sized allowed for the container log file. Negative numbers indicate
# that no size limit is imposed. If it is positive, it must be >= 8192 to
# match/exceed conmon's read buffer. The file is truncated and re-opened so the
# limit is never exceeded.
log_size_max = -1
# Whether container output should be logged to journald in addition to the kuberentes log file
log_to_journald = false
# Path to directory in which container exit files are written to by conmon.
container_exits_dir = "/var/run/crio/exits"
# Path to directory for container attach sockets.
container_attach_socket_dir = "/var/run/crio"
# If set to true, all containers will run in read-only mode.
read_only = false
# Changes the verbosity of the logs based on the level it is set to. Options
# are fatal, panic, error, warn, info, and debug. This option supports live
# configuration reload.
log_level = "error"
# The default log directory where all logs will go unless directly specified by the kubelet
log_dir = "/var/log/crio/pods"
# The UID mappings for the user namespace of each container. A range is
# specified in the form containerUID:HostUID:Size. Multiple ranges must be
# separated by comma.
uid_mappings = ""
# The GID mappings for the user namespace of each container. A range is
# specified in the form containerGID:HostGID:Size. Multiple ranges must be
# separated by comma.
gid_mappings = ""
# The minimal amount of time in seconds to wait before issuing a timeout
# regarding the proper termination of the container.
ctr_stop_timeout = 0
# ManageNetworkNSLifecycle determines whether we pin and remove network namespace
# and manage its lifecycle.
manage_network_ns_lifecycle = false
# The "crio.runtime.runtimes" table defines a list of OCI compatible runtimes.
# The runtime to use is picked based on the runtime_handler provided by the CRI.
# If no runtime_handler is provided, the runtime will be picked based on the level
# of trust of the workload.
[crio.runtime.runtimes.runc]
runtime_path = "/usr/bin/runc"
runtime_type = "oci"
runtime_root = "/run/runc"
# The crio.image table contains settings pertaining to the management of OCI images.
#
# CRI-O reads its configured registries defaults from the system wide
# containers-registries.conf(5) located in /etc/containers/registries.conf. If
# you want to modify just CRI-O, you can change the registries configuration in
# this file. Otherwise, leave insecure_registries and registries commented out to
# use the system's defaults from /etc/containers/registries.conf.
[crio.image]
# Default transport for pulling images from a remote container storage.
default_transport = "docker://"
# The path to a file containing credentials necessary for pulling images from
# secure registries. The file is similar to that of /var/lib/kubelet/config.json
global_auth_file = ""
# The image used to instantiate infra containers.
# This option supports live configuration reload.
pause_image = "{{ .PodInfraContainerImage }}"
# The path to a file containing credentials specific for pulling the pause_image from
# above. The file is similar to that of /var/lib/kubelet/config.json
# This option supports live configuration reload.
pause_image_auth_file = ""
# The command to run to have a container stay in the paused state.
# This option supports live configuration reload.
pause_command = "/pause"
# Path to the file which decides what sort of policy we use when deciding
# whether or not to trust an image that we've pulled. It is not recommended that
# this option be used, as the default behavior of using the system-wide default
# policy (i.e., /etc/containers/policy.json) is most often preferred. Please
# refer to containers-policy.json(5) for more details.
signature_policy = ""
# Controls how image volumes are handled. The valid values are mkdir, bind and
# ignore; the latter will ignore volumes entirely.
image_volumes = "mkdir"
# List of registries to be used when pulling an unqualified image (e.g.,
# "alpine:latest"). By default, registries is set to "docker.io" for
# compatibility reasons. Depending on your workload and usecase you may add more
# registries (e.g., "quay.io", "registry.fedoraproject.org",
# "registry.opensuse.org", etc.).
registries = [
"docker.io"
]
# The crio.network table containers settings pertaining to the management of
# CNI plugins.
[crio.network]
# Path to the directory where CNI configuration files are located.
network_dir = "/etc/cni/net.d/"
# Paths to directories where CNI plugin binaries are located.
plugin_dirs = [
"/opt/cni/bin/",
]
`
)
// getCrictlPath returns the absolute path of crictl
func getCrictlPath(cr CommandRunner) string {
cmd := "crictl"
@ -438,27 +136,6 @@ func getCRIInfo(cr CommandRunner) (map[string]interface{}, error) {
return jsonMap, nil
}
// generateCRIOConfig sets up /etc/crio/crio.conf
func generateCRIOConfig(cr CommandRunner, imageRepository string) error {
cPath := crioConfigFile
t, err := template.New("crio.conf").Parse(crioConfigTemplate)
if err != nil {
return err
}
pauseImage := images.Pause(imageRepository)
opts := struct{ PodInfraContainerImage string }{PodInfraContainerImage: pauseImage}
var b bytes.Buffer
if err := t.Execute(&b, opts); err != nil {
return err
}
c := exec.Command("/bin/bash", "-c", fmt.Sprintf("sudo mkdir -p %s && printf %%s \"%s\" | base64 -d | sudo tee %s", path.Dir(cPath), base64.StdEncoding.EncodeToString(b.Bytes()), cPath))
if _, err := cr.RunCmd(c); err != nil {
return errors.Wrap(err, "generateCRIOConfig.")
}
return nil
}
// criContainerLogCmd returns the command to retrieve the log for a container based on ID
func criContainerLogCmd(cr CommandRunner, id string, len int, follow bool) string {
crictl := getCrictlPath(cr)

View File

@ -23,6 +23,7 @@ import (
"github.com/golang/glog"
"github.com/pkg/errors"
"k8s.io/minikube/pkg/minikube/bootstrapper/images"
"k8s.io/minikube/pkg/minikube/out"
)
@ -34,6 +35,23 @@ type CRIO struct {
KubernetesVersion string
}
const (
// CRIOConfFile is the path to the CRI-O configuration
crioConfigFile = "/etc/crio/crio.conf"
)
// generateCRIOConfig sets up /etc/crio/crio.conf
func generateCRIOConfig(cr CommandRunner, imageRepository string) error {
cPath := crioConfigFile
pauseImage := images.Pause(imageRepository)
c := exec.Command("/bin/bash", "-c", fmt.Sprintf("sudo sed -e 's|^pause_image = .*$|pause_image = \"%s\"|' -i %s", pauseImage, cPath))
if _, err := cr.RunCmd(c); err != nil {
return errors.Wrap(err, "generateCRIOConfig.")
}
return nil
}
// Name is a human readable name for CRIO
func (r *CRIO) Name() string {
return "CRI-O"

View File

@ -24,7 +24,6 @@ import (
"github.com/golang/glog"
"k8s.io/minikube/pkg/drivers/kic"
"k8s.io/minikube/pkg/minikube/bootstrapper"
"k8s.io/minikube/pkg/minikube/registry"
)
@ -110,7 +109,6 @@ func FlagDefaults(name string) FlagHints {
// only for kic, till other run-times are available we auto-set containerd.
if name == Docker {
fh.ContainerRuntime = "containerd"
fh.Bootstrapper = bootstrapper.KIC
fh.ExtraOptions = append(fh.ExtraOptions, fmt.Sprintf("kubeadm.pod-network-cidr=%s", kic.DefaultPodCIDR))
}
return fh

View File

@ -74,10 +74,10 @@ func SaveToDir(images []string, cacheDir string) error {
}
// saveToTarFile caches an image
func saveToTarFile(image, rawDest string) error {
func saveToTarFile(iname, rawDest string) error {
start := time.Now()
defer func() {
glog.Infof("cache image %q -> %q took %s", image, rawDest, time.Since(start))
glog.Infof("cache image %q -> %q took %s", iname, rawDest, time.Since(start))
}()
// OS-specific mangling of destination path
@ -104,15 +104,22 @@ func saveToTarFile(image, rawDest string) error {
return errors.Wrapf(err, "making cache image directory: %s", dst)
}
ref, err := name.ParseReference(image, name.WeakValidation)
ref, err := name.ParseReference(iname, name.WeakValidation)
if err != nil {
return errors.Wrapf(err, "parsing image ref name for %s", image)
return errors.Wrapf(err, "parsing image ref name for %s", iname)
}
if ref == nil {
return errors.Wrapf(err, "nil reference for %s", iname)
}
img, err := retrieveImage(ref)
if err != nil {
glog.Warningf("unable to retrieve image: %v", err)
}
if img == nil {
return errors.Wrapf(err, "nil image for %s", iname)
}
glog.Infoln("opening: ", dst)
f, err := ioutil.TempFile(filepath.Dir(dst), filepath.Base(dst)+".*.tmp")
if err != nil {
@ -128,7 +135,7 @@ func saveToTarFile(image, rawDest string) error {
}
}
}()
tag, err := name.NewTag(image, name.WeakValidation)
tag, err := name.NewTag(iname, name.WeakValidation)
if err != nil {
return errors.Wrap(err, "newtag")
}

View File

@ -47,7 +47,6 @@ var importantPods = []string{
"coredns",
"kube-scheduler",
"kube-proxy",
"kube-addon-manager",
"kubernetes-dashboard",
"storage-provisioner",
"kube-controller-manager",

View File

@ -170,10 +170,25 @@ WantedBy=multi-user.target
return nil, err
}
return &provision.DockerOptions{
dockerCfg := &provision.DockerOptions{
EngineOptions: engineCfg.String(),
EngineOptionsPath: "/lib/systemd/system/docker.service",
}, nil
}
log.Info("Setting Docker configuration on the remote daemon...")
if _, err = p.SSHCommand(fmt.Sprintf("sudo mkdir -p %s && printf %%s \"%s\" | sudo tee %s", path.Dir(dockerCfg.EngineOptionsPath), dockerCfg.EngineOptions, dockerCfg.EngineOptionsPath)); err != nil {
return nil, err
}
if err := p.Service("docker", serviceaction.Enable); err != nil {
return nil, err
}
if err := p.Service("docker", serviceaction.Restart); err != nil {
return nil, err
}
return dockerCfg, nil
}
func rootFileSystemType(p *BuildrootProvisioner) (string, error) {
@ -218,7 +233,7 @@ func (p *BuildrootProvisioner) Provision(swarmOptions swarm.Options, authOptions
}
log.Debugf("setting minikube options for container-runtime")
if err := setMinikubeOptions(p); err != nil {
if err := setContainerRuntimeOptions(p); err != nil {
log.Debugf("Error setting container-runtime options during provisioning %v", err)
return err
}
@ -239,7 +254,24 @@ func setRemoteAuthOptions(p provision.Provisioner) auth.Options {
return authOptions
}
func setMinikubeOptions(p *BuildrootProvisioner) error {
func setContainerRuntimeOptions(p *BuildrootProvisioner) error {
c, err := config.Load(p.Driver.GetMachineName())
if err != nil {
return errors.Wrap(err, "getting cluster config")
}
switch c.ContainerRuntime {
case "crio", "cri-o":
return p.setCrioOptions()
case "containerd":
return nil
default:
_, err := p.GenerateDockerOptions(engine.DefaultPort)
return err
}
}
func (p *BuildrootProvisioner) setCrioOptions() error {
// pass through --insecure-registry
var (
crioOptsTmpl = `
@ -260,11 +292,6 @@ CRIO_MINIKUBE_OPTIONS='{{ range .EngineOptions.InsecureRegistry }}--insecure-reg
return err
}
// This is unlikely to cause issues unless the user has explicitly requested CRIO, so just log a warning.
if err := p.Service("crio", serviceaction.Restart); err != nil {
log.Warn("Unable to restart crio service. Error: %v", err)
}
return nil
}
@ -314,33 +341,6 @@ func configureAuth(p *BuildrootProvisioner) error {
return err
}
config, err := config.Load(p.Driver.GetMachineName())
if err != nil {
return errors.Wrap(err, "getting cluster config")
}
dockerCfg, err := p.GenerateDockerOptions(engine.DefaultPort)
if err != nil {
return errors.Wrap(err, "generating docker options")
}
log.Info("Setting Docker configuration on the remote daemon...")
if _, err = p.SSHCommand(fmt.Sprintf("sudo mkdir -p %s && printf %%s \"%s\" | sudo tee %s", path.Dir(dockerCfg.EngineOptionsPath), dockerCfg.EngineOptions, dockerCfg.EngineOptionsPath)); err != nil {
return err
}
if config.ContainerRuntime == "" {
if err := p.Service("docker", serviceaction.Enable); err != nil {
return err
}
if err := p.Service("docker", serviceaction.Restart); err != nil {
return err
}
}
return nil
}

View File

@ -1,15 +1,17 @@
{
"\"{{.minikube_addon}}\" was successfully disabled": "",
"\"{{.name}}\" cluster does not exist. Proceeding ahead with cleanup.": "",
"\"{{.name}}\" profile does not exist": "「{{.name}}」プロファイルは存在しません",
"\"{{.profile_name}}\" VM does not exist, nothing to stop": "",
"\"{{.profile_name}}\" host does not exist, unable to show an IP": "",
"\"{{.profile_name}}\" stopped.": "",
"'none' driver does not support 'minikube docker-env' command": "",
"'none' driver does not support 'minikube mount' command": "",
"'none' driver does not support 'minikube ssh' command": "",
"\"{{.minikube_addon}}\" was successfully disabled": "「{{.minikube_addon}}」が無効化されました",
"\"{{.name}}\" cluster does not exist. Proceeding ahead with cleanup.": "「{{.name}}」というクラスターは存在しません。クリーンアップ処理を続行します。",
"\"{{.name}}\" profile does not exist": "「{{.name}}」というプロファイルは存在しません",
"\"{{.profile_name}}\" VM does not exist, nothing to stop": "「{{.profile_name}}」というVMは存在しません。停止すべき対象がありません",
"\"{{.profile_name}}\" host does not exist, unable to show an IP": "「{{.profile_name}}」というホストは存在しません。IPを表示できません",
"\"{{.profile_name}}\" stopped.": "「{{.profile_name}}」が停止しました。",
"'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 ssh' command": "「none」ドライバーは「minikube ssh」コマンドをサポートしていません",
"'{{.driver}}' driver reported an issue: {{.error}}": "「{{.driver}}」ドライバーがエラーを報告しました: {{.error}}",
"- {{.profile}}": "",
"A VPN or firewall is interfering with HTTP access to the minikube VM. Alternatively, try a different VM driver: https://minikube.sigs.k8s.io/docs/start/": "",
"A firewall is blocking Docker within the minikube VM from reaching the internet. You may need to configure it to use a proxy.": "",
"A firewall is blocking Docker the minikube VM from reaching the internet. You may need to configure it to use a proxy.": "",
"A firewall is interfering with minikube's ability to make outgoing HTTPS requests. You may need to change the value of the HTTPS_PROXY environment variable.": "",
"A firewall is likely blocking minikube from reaching the internet. You may need to configure minikube to use a proxy.": "",
"A set of apiserver IP Addresses which are used in the generated certificate for kubernetes. This can be used if you want to make the apiserver available from outside the machine": "",
@ -17,9 +19,9 @@
"A set of apiserver names which are used in the generated certificate for kubernetes. This can be used if you want to make the apiserver available from outside the machine": "",
"A set of apiserver names which are used in the generated certificate for kubernetes. This can be used if you want to make the apiserver available from outside the machine": "Kubernetes 用に生成された証明書で使用される一連の API サーバー名。マシンの外部から API サーバーを利用できるようにする場合に使用します。",
"A set of key=value pairs that describe configuration that may be passed to different components.\nThe key should be '.' separated, and the first part before the dot is the component to apply the configuration to.\nValid components are: kubelet, kubeadm, apiserver, controller-manager, etcd, proxy, scheduler\nValid kubeadm parameters:": "さまざまなコンポーネントに渡される可能性のある構成を記述する一連の key=value ペア。\nキーは「.」で区切る必要があり、このドットより前の部分は構成の適用先のコンポーネントを表します。\n有効なコンポーネントは、kubelet、kubeadm、apiserver、controller-manager、etcd、proxy、scheduler です。\n有効な kubeadm パラメータ:",
"A set of key=value pairs that describe feature gates for alpha/experimental features.": "アルファ版または試験運用版の機能の機能ゲートを記述する一連の key=value ペア。",
"A set of key=value pairs that describe feature gates for alpha/experimental features.": "アルファ版または試験運用版の機能のフィーチャーゲートを記述する一連の key=value ペアです。",
"Access the kubernetes dashboard running within the minikube cluster": "",
"Add an image to local cache.": "",
"Add an image to local cache.": "イメージをローカルキャッシュに追加します",
"Add machine IP to NO_PROXY environment variable": "",
"Add or delete an image from the local cache.": "",
"Additional help topics": "",
@ -32,21 +34,33 @@
"Amount of RAM allocated to the minikube VM (format: \u003cnumber\u003e[\u003cunit\u003e], where unit = b, k, m or g).": "",
"Amount of time to wait for a service in seconds": "",
"Amount of time to wait for service in seconds": "",
"Another hypervisor, such as VirtualBox, is conflicting with KVM. Please stop the other hypervisor, or use --vm-driver to switch to it.": "",
"Automatically selected the {{.experimental}} '{{.driver}}' driver": "",
"Automatically selected the {{.experimental}} '{{.driver}}' driver (alternates: {{.alternates}})": "",
"Available Commands": "",
"Basic Commands:": "",
"Block until the apiserver is servicing API requests": "",
"Cannot find directory {{.path}} for mount": "",
"Cannot use both --output and --format options": "",
"Check output of 'journalctl -xeu kubelet', try passing --extra-config=kubelet.cgroup-driver=systemd to minikube start": "",
"Check that SELinux is disabled, and that the provided apiserver flags are valid": "",
"Check that minikube is running and that you have specified the correct namespace (-n flag) if required.": "",
"Check that the provided apiserver flags are valid": "",
"Check that your --kubernetes-version has a leading 'v'. For example: 'v1.1.14'": "",
"Check that your apiserver flags are valid, or run 'minikube delete'": "",
"Check your firewall rules for interference, and run 'virt-host-validate' to check for KVM configuration issues. If you are running minikube within a VM, consider using --vm-driver=none": "",
"Configuration and Management Commands:": "",
"Configure a default route on this Linux host, or use another --vm-driver that does not require it": "",
"Configure an external network switch following the official documentation, then add `--hyperv-virtual-switch=\u003cswitch-name\u003e` to `minikube start`": "",
"Configures the addon w/ADDON_NAME within minikube (example: minikube addons configure registry-creds). For a list of available addons use: minikube addons list": "",
"Configuring local host environment ...": "",
"Confirm that you have a working internet connection and that your VM has not run out of resources by using: 'minikube logs'": "",
"Confirm that you have supplied the correct value to --hyperv-virtual-switch using the 'Get-VMSwitch' command": "",
"Could not get profile flag": "",
"Could not process error from failed deletion": "",
"Could not process errors from failed deletion": "",
"Country code of the image mirror to be used. Leave empty to use the global one. For Chinese mainland users, set it to cn.": "使用するイメージミラーの国コード。グローバルのものを使用する場合は空のままにします。中国本土のユーザーの場合は、「cn」に設定します。",
"Created a new profile : {{.profile_name}}": "",
"Creating Kubernetes in {{.driver_name}} container with (CPUs={{.number_of_cpus}}), Memory={{.memory_size}}MB ({{.host_memory_size}}MB available) ...": "",
"Creating a new profile failed": "",
"Creating mount {{.name}} ...": "マウント {{.name}} を作成しています...",
"Creating {{.driver_name}} VM (CPUs={{.number_of_cpus}}, Memory={{.memory_size}}MB, Disk={{.disk_size}}MB) ...": "",
@ -82,25 +96,31 @@
"ERROR creating `registry-creds-ecr` secret: {{.error}}": "",
"ERROR creating `registry-creds-gcr` secret: {{.error}}": "",
"Either systemctl is not installed, or Docker is broken. Run 'sudo systemctl start docker' and 'journalctl -u docker'": "",
"Enable addons. see `minikube addons list` for a list of valid addon names.": "",
"Enable experimental NVIDIA GPU support in minikube": "minikube での試験運用版 NVIDIA GPU の対応を有効にします",
"Enable host resolver for NAT DNS requests (virtualbox driver only)": "NAT DNS リクエスト用のホストリゾルバを有効にしますvirtualbox ドライバのみ)",
"Enable istio needs {{.minMem}} MB of memory and {{.minCpus}} CPUs.": "",
"Enable proxy for NAT DNS requests (virtualbox driver only)": "NAT DNS リクエスト用のプロキシを有効にしますvirtualbox ドライバのみ)",
"Enable the default CNI plugin (/etc/cni/net.d/k8s.conf). Used in conjunction with \\\"--network-plugin=cni\\": "デフォルトの CNI プラグイン(/etc/cni/net.d/k8s.confを有効にします。\\\"--network-plugin=cni\\\" と組み合わせて使用されます。",
"Enable the default CNI plugin (/etc/cni/net.d/k8s.conf). Used in conjunction with \\\"--network-plugin=cni\\\".": "",
"Enables the addon w/ADDON_NAME within minikube (example: minikube addons enable dashboard). For a list of available addons use: minikube addons list": "",
"Enabling dashboard ...": "",
"Ensure that CRI-O is installed and healthy: Run 'sudo systemctl start crio' and 'journalctl -u crio'. Alternatively, use --container-runtime=docker": "",
"Ensure that Docker is installed and healthy: Run 'sudo systemctl start docker' and 'journalctl -u docker'. Alternatively, select another value for --vm-driver": "",
"Ensure that the user listed in /etc/libvirt/qemu.conf has access to your home directory": "",
"Ensure that your value for HTTPS_PROXY points to an HTTPS proxy rather than an HTTP proxy": "",
"Environment variables to pass to the Docker daemon. (format: key=value)": "Docker デーモンに渡す環境変数(形式: Key=Value",
"Error checking driver version: {{.error}}": "ドライバのバージョンの確認中にエラーが発生しました。{{.error}}",
"Error creating list template": "",
"Error converting status to json": "",
"Error creating minikube directory": "",
"Error creating status template": "",
"Error creating view template": "",
"Error executing list template": "",
"Error executing status template": "",
"Error executing template": "",
"Error executing view template": "",
"Error finding port for mount": "",
"Error getting IP": "",
"Error getting addons status": "",
"Error getting bootstrapper": "",
"Error getting client": "",
"Error getting client: {{.error}}": "",
@ -110,7 +130,7 @@
"Error getting host": "",
"Error getting host status": "",
"Error getting machine logs": "",
"Error getting machine status": "",
"Error getting profiles to delete": "",
"Error getting service status": "",
"Error getting service with namespace: {{.namespace}} and labels {{.labelName}}:{{.addonName}}: {{.error}}": "",
"Error getting the host IP address to use from within the VM": "",
@ -124,7 +144,6 @@
"Error parsing minikube version: {{.error}}": "minikube バージョンの解析中にエラーが発生しました。{{.error}}",
"Error parsing vmDriver version: {{.error}}": "vmDriver バージョンの解析中にエラーが発生しました。{{.error}}",
"Error reading {{.path}}: {{.error}}": "",
"Error restarting cluster": "",
"Error setting shell variables": "",
"Error starting cluster": "",
"Error starting mount": "",
@ -136,12 +155,12 @@
"Error: [{{.id}}] {{.error}}": "",
"Examples": "",
"Exiting": "終了しています",
"Exiting due to driver incompatibility": "",
"Exiting.": "終了しています。",
"Failed runtime": "",
"Failed to cache ISO": "",
"Failed to cache and load images": "",
"Failed to cache binaries": "",
"Failed to cache images": "",
"Failed to cache images to tar": "",
"Failed to change permissions for {{.minikube_dir_path}}: {{.error}}": "{{.minikube_dir_path}} に対する権限を変更できませんでした。{{.error}}",
"Failed to check if machine exists": "",
"Failed to check main repository and mirrors for images for images": "",
@ -160,7 +179,7 @@
"Failed to get service URL: {{.error}}": "",
"Failed to kill mount process: {{.error}}": "マウント プロセスを強制終了できませんでした。{{.error}}",
"Failed to list cached images": "",
"Failed to remove profile": "",
"Failed to reload cached images": "",
"Failed to save config": "",
"Failed to set NO_PROXY Env. Please use `export NO_PROXY=$NO_PROXY,{{.ip}}": "NO_PROXY 環境変数を設定できませんでした。「export NO_PROXY=$NO_PROXY,{{.ip}}」を使用してください。",
"Failed to set NO_PROXY Env. Please use `export NO_PROXY=$NO_PROXY,{{.ip}}`.": "",
@ -185,14 +204,17 @@
"Gets the status of a local kubernetes cluster": "",
"Gets the status of a local kubernetes cluster.\n\tExit status contains the status of minikube's VM, cluster and kubernetes encoded on it's bits in this order from right to left.\n\tEg: 7 meaning: 1 (for minikube NOK) + 2 (for cluster NOK) + 4 (for kubernetes NOK)": "",
"Gets the value of PROPERTY_NAME from the minikube config file": "",
"Getting machine config failed": "",
"Global Flags": "",
"Go template format string for the addon list output. The format for Go templates can be found here: https://golang.org/pkg/text/template/\nFor the list of accessible variables for the template, see the struct values here: https://godoc.org/k8s.io/minikube/cmd/minikube/cmd/config#AddonListTemplate": "",
"Go template format string for the cache list output. The format for Go templates can be found here: https://golang.org/pkg/text/template/\nFor the list of accessible variables for the template, see the struct values here: https://godoc.org/k8s.io/minikube/cmd/minikube/cmd#CacheListTemplate": "",
"Go template format string for the config view output. The format for Go templates can be found here: https://golang.org/pkg/text/template/\nFor the list of accessible variables for the template, see the struct values here: https://godoc.org/k8s.io/minikube/cmd/minikube/cmd/config#ConfigViewTemplate": "",
"Go template format string for the status output. The format for Go templates can be found here: https://golang.org/pkg/text/template/\nFor the list accessible variables for the template, see the struct values here: https://godoc.org/k8s.io/minikube/cmd/minikube/cmd#Status": "",
"Group ID: {{.groupID}}": "",
"Have you set up libvirt correctly?": "",
"Hide the hypervisor signature from the guest in minikube (kvm2 driver only)": "minikube でゲストに対し、ハイパーバイザ署名を非表示にしますkvm2 ドライバのみ)",
"Hyperkit is broken. Upgrade to the latest hyperkit version and/or Docker for Desktop. Alternatively, you may choose an alternate --vm-driver": "",
"Hyperkit networking is broken. Upgrade to the latest hyperkit version and/or Docker for Desktop. Alternatively, you may choose an alternate --vm-driver": "",
"If set, automatically updates drivers to the latest version. Defaults to true.": "",
"If 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 の場合、後で使用できるようにファイルのダウンロードとキャッシュ保存だけが行われます。インストールも起動も行われません。",
@ -206,6 +228,7 @@
"Invalid size passed in argument: {{.error}}": "",
"IsEnabled failed": "",
"Kill the mount process spawned by minikube start": "",
"Kubernetes {{.new}} is now available. If you would like to upgrade, specify: --kubernetes-version={{.new}}": "",
"Kubernetes {{.version}} is not supported by this release of minikube": "",
"Launching Kubernetes ...": "Kubernetes を起動しています...",
"Launching proxy ...": "",
@ -230,6 +253,9 @@
"Mounting host path {{.sourcePath}} into VM as {{.destinationPath}} ...": "",
"Mounts the specified directory into minikube": "",
"Mounts the specified directory into minikube.": "",
"Multiple errors deleting profiles": "",
"Multiple minikube profiles were found -": "",
"NIC Type used for host only network. One of Am79C970A, Am79C973, 82540EM, 82543GC, 82545EM, or virtio (virtualbox driver only)": "",
"NOTE: This process must stay alive for the mount to be accessible ...": "",
"Networking and Connectivity Commands:": "",
"No minikube profile was found. You can create one using `minikube start`.": "",
@ -243,6 +269,7 @@
"Open the addons URL with https instead of http": "",
"Open the service URL with https instead of http": "",
"Opening kubernetes service {{.namespace_name}}/{{.service_name}} in default browser...": "",
"Opening service {{.namespace_name}}/{{.service_name}} in default browser...": "",
"Opening {{.url}} in your default browser...": "",
"Opens the addon w/ADDON_NAME within minikube (example: minikube addons open dashboard). For a list of available addons use: minikube addons list": "",
"Options: {{.options}}": "",
@ -264,9 +291,10 @@
"Problems detected in {{.entry}}:": "",
"Problems detected in {{.name}}:": "",
"Profile gets or sets the current minikube profile": "",
"Profile name \"{{.profilename}}\" is minikube keyword. To delete profile use command minikube delete -p \u003cprofile name\u003e": "",
"Provide VM UUID to restore MAC address (hyperkit driver only)": "MAC アドレスを復元するための VM UUID を指定しますhyperkit ドライバのみ)",
"Pulling images ...": "",
"Reboot to complete VirtualBox installation, and verify that VirtualBox is not blocked by your system": "",
"Reboot to complete VirtualBox installation, verify that VirtualBox is not blocked by your system, and/or use another hypervisor": "",
"Rebuild libvirt with virt-network support": "",
"Received {{.name}} signal": "",
"Registry mirrors to pass to the Docker daemon": "Docker デーモンに渡すレジストリ ミラー",
@ -275,11 +303,10 @@
"Related issues:": "",
"Relaunching Kubernetes using {{.bootstrapper}} ...": "{{.bootstrapper}} を使用して Kubernetes を再起動しています...",
"Removing {{.directory}} ...": "{{.directory}} を削除しています...",
"Requested CPU count {{.requested_cpus}} is less than the minimum allowed of {{.minimum_cpus}}": "",
"Requested cpu count {{.requested_cpus}} is less than the minimum allowed of {{.minimum_cpus}}": "",
"Requested disk size {{.requested_size}} is less than minimum of {{.minimum_size}}": "リクエストされたディスクサイズ {{.requested_size}} が最小値 {{.minimum_size}} 未満です",
"Requested memory allocation ({{.memory}}MB) is less than the default memory allocation of {{.default_memorysize}}MB. Beware that minikube might not work correctly or crash unexpectedly.": "リクエストされたメモリ割り当て({{.memory}} MBがデフォルトのメモリ割り当て {{.default_memorysize}} MB 未満です。minikube が正常に動作しないか、予期せずクラッシュする可能性があることに注意してください。",
"Requested memory allocation {{.requested_size}} is less than the minimum allowed of {{.minimum_size}}": "リクエストされたメモリ割り当て {{.requested_size}} が許可される最小値 {{.minimum_size}} 未満です",
"Retriable failure: {{.error}}": "",
"Retrieve the ssh identity key path of the specified cluster": "",
"Retrieve the ssh identity key path of the specified cluster.": "",
"Retrieves the IP address of the running cluster": "",
@ -287,22 +314,27 @@
"Retrieves the IP address of the running cluster, checks it\n\t\t\twith IP in kubeconfig, and corrects kubeconfig if incorrect.": "",
"Returns the value of PROPERTY_NAME from the minikube config file. Can be overwritten at runtime by flags or environmental variables.": "",
"Run 'kubectl describe pod coredns -n kube-system' and check for a firewall or DNS conflict": "",
"Run 'minikube delete' to delete the stale VM": "",
"Run 'minikube delete' to delete the stale VM, or and ensure that minikube is running as the same user you are issuing this command with": "",
"Run kubectl": "",
"Run minikube from the C: drive.": "",
"Run the kubernetes client, download it if necessary. Remember -- after kubectl!\n\nExamples:\nminikube kubectl -- --help\nminikube kubectl -- get pods --namespace kube-system": "",
"Run the minikube command as an Administrator": "",
"Run: 'chmod 600 $HOME/.kube/config'": "",
"Running on localhost (CPUs={{.number_of_cpus}}, Memory={{.memory_size}}MB, Disk={{.disk_size}}MB) ...": "",
"Selecting {{.experimental}} '{{.driver}}' driver from existing profile (alternates: {{.alternates}})": "",
"Selecting {{.experimental}} '{{.driver}}' driver from user configuration (alternates: {{.alternates}})": "",
"Set failed": "",
"Set flag to delete all profiles": "",
"Set this flag to delete the '.minikube' folder from your user directory.": "",
"Sets an individual value in a minikube config file": "",
"Sets the PROPERTY_NAME config value to PROPERTY_VALUE\n\tThese values can be overwritten by flags or environment variables at runtime.": "",
"Sets up docker env variables; similar to '$(docker-machine env)'": "",
"Sets up docker env variables; similar to '$(docker-machine env)'.": "",
"Setting profile failed": "",
"Show a list of global command-line options (applies to all commands).": "",
"Show only log entries which point to known problems": "",
"Show only the most recent journal entries, and continuously print new entries as they are appended to the journal.": "",
"Skipped switching kubectl context for {{.profile_name}} because --keep-context was set.": "",
"Sorry that minikube crashed. If this was unexpected, we would love to hear from you:": "",
"Sorry, Kubernetes {{.version}} is not supported by this release of minikube": "",
"Sorry, completion support is not yet implemented for {{.name}}": "",
"Sorry, the kubeadm.{{.parameter_name}} parameter is currently not supported by --extra-config": "申し訳ありません。現在、kubeadm.{{.parameter_name}} パラメータは --extra-config でサポートされていません",
@ -319,14 +351,21 @@
"Stopping \"{{.profile_name}}\" in {{.driver_name}} ...": "",
"Stops a local kubernetes cluster running in Virtualbox. This command stops the VM\nitself, leaving all files intact. The cluster can be started again with the \"start\" command.": "",
"Stops a running local kubernetes cluster": "",
"Successfully deleted all profiles": "",
"Successfully deleted profile \\\"{{.name}}\\\"": "",
"Successfully mounted {{.sourcePath}} to {{.destinationPath}}": "",
"Successfully powered off Hyper-V. minikube driver -- {{.driver}}": "",
"Successfully purged minikube directory located at - [{{.minikubeDirectory}}]": "",
"Suggestion: {{.advice}}": "",
"Suggestion: {{.fix}}": "",
"Target directory {{.path}} must be an absolute path": "",
"The \"{{.driver_name}}\" driver requires root privileges. Please run minikube using 'sudo minikube --vm-driver={{.driver_name}}": "「{{.driver_name}}」ドライバにはルート権限が必要です。「sudo minikube --vm-driver={{.driver_name}}」を使用して minikube を実行してください",
"The \"{{.driver_name}}\" driver requires root privileges. Please run minikube using 'sudo minikube --vm-driver={{.driver_name}}'.": "",
"The \"{{.driver_name}}\" driver should not be used with root privileges.": "",
"The \"{{.name}}\" cluster has been deleted.": "「{{.name}}」クラスタが削除されました。",
"The \"{{.name}}\" cluster has been deleted.__1": "「{{.name}}」クラスタが削除されました。",
"The 'none' driver does not respect the --cpus flag": "",
"The 'none' driver does not respect the --memory flag": "",
"The 'none' driver does not support multiple profiles: https://minikube.sigs.k8s.io/docs/reference/drivers/none/": "",
"The 'none' driver provides limited isolation and may reduce system security and reliability.": "ドライバに「none」を指定すると、分離が制限され、システムのセキュリティと信頼性が低下する可能性があります。",
"The '{{.driver}}' driver requires elevated permissions. The following commands will be executed:\\n\\n{{ .example }}\\n": "",
@ -351,14 +390,18 @@
"The docker host is currently not running": "",
"The docker service is currently 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.": "",
"The hyperv virtual switch name. Defaults to first found. (hyperv driver only)": "hyperv 仮想スイッチ名。最初に見つかったものにデフォルト設定されますhyperv ドライバのみ)",
"The hypervisor does not appear to be configured properly. Run 'minikube start --alsologtostderr -v=1' and inspect the error code": "",
"The initial time interval for each check that wait performs in seconds": "",
"The kubernetes version that the minikube VM will use (ex: v1.2.3)": "minikube VM で使用される Kubernetes バージョン(例: v1.2.3",
"The machine-driver specified is failing to start. Try running 'docker-machine-driver-\u003ctype\u003e version'": "",
"The minikube VM is offline. Please run 'minikube start' to start it again.": "",
"The name of the network plugin": "ネットワーク プラグインの名前",
"The name of the network plugin.": "",
"The number of bytes to use for 9p packet payload": "",
"The output format. One of 'json', 'table'": "",
"The path on the file system where the docs in markdown need to be saved": "",
"The service namespace": "",
"The services namespace": "",
@ -367,7 +410,6 @@
"The value passed to --format is invalid: {{.error}}": "",
"The vmwarefusion driver is deprecated and support for it will be removed in a future release.\n\t\t\tPlease consider switching to the new vmware unified driver, which is intended to replace the vmwarefusion driver.\n\t\t\tSee https://minikube.sigs.k8s.io/docs/reference/drivers/vmware/ for more information.\n\t\t\tTo disable this message, run [minikube config set ShowDriverDeprecationNotification false]": "",
"The {{.driver_name}} driver should not be used with root privileges.": "{{.driver_name}} ドライバをルート権限で使用しないでください。",
"There appears to be another hypervisor conflicting with KVM. Please stop the other hypervisor, or use --vm-driver to switch to it.": "",
"There's a new version for '{{.driver_executable}}'. Please consider upgrading. {{.documentation_url}}": "「{{.driver_executable}}」の新しいバージョンがあります。アップグレードを検討してください。{{.documentation_url}}",
"These changes will take effect upon a minikube delete and then a minikube start": "",
"This addon does not have an endpoint defined for the 'addons open' command.\nYou can add one by annotating a service with the label {{.labelName}}:{{.addonName}}": "",
@ -381,11 +423,14 @@
"To connect to this cluster, use: kubectl --context={{.name}}__1": "このクラスタに接続するには、「kubectl --context={{.name}}」を使用します",
"To connect to this cluster, use: kubectl --context={{.profile_name}}": "",
"To disable this notice, run: 'minikube config set WantUpdateNotification false'\\n": "",
"To proceed, either:\n 1) Delete the existing VM using: '{{.command}} delete'\n or\n 2) Restart with the existing driver: '{{.command}} start --vm-driver={{.old_driver}}'": "",
"To proceed, either:\n\n 1) Delete the existing \"{{.profile_name}}\" cluster using: '{{.command}} delete'\n\n * or *\n\n 2) Start the existing \"{{.profile_name}}\" cluster using: '{{.command}} start --vm-driver={{.old_driver}}'": "",
"To see addons list for other profiles use: `minikube addons -p name list`": "",
"To start minikube with HyperV Powershell must be in your PATH`": "",
"To use kubectl or minikube commands as your own user, you may need to relocate them. For example, to overwrite your own settings, run:": "kubectl か minikube コマンドを独自のユーザーとして使用するには、そのコマンドの再配置が必要な場合があります。たとえば、独自の設定を上書きするには、以下を実行します。",
"Troubleshooting Commands:": "",
"Trying to delete invalid profile {{.profile}}": "",
"Unable to bind flags": "",
"Unable to determine a default driver to use. Try specifying --vm-driver, or see https://minikube.sigs.k8s.io/docs/start/": "",
"Unable to enable dashboard": "",
"Unable to fetch latest version info": "",
"Unable to generate docs": "",
@ -394,18 +439,20 @@
"Unable to get bootstrapper: {{.error}}": "ブートストラッパを取得できません。{{.error}}",
"Unable to get current user": "",
"Unable to get runtime": "",
"Unable to get the status of the cluster.": "",
"Unable to get the status of the {{.name}} cluster.": "",
"Unable to kill mount process: {{.error}}": "",
"Unable to load cached images from config file.": "キャッシュに保存されているイメージを構成ファイルから読み込むことができません。",
"Unable to load cached images: {{.error}}": "",
"Unable to load config: {{.error}}": "構成を読み込むことができません。{{.error}}",
"Unable to parse \"{{.kubernetes_version}}\": {{.error}}": "「{{.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}}": "イメージを pull できませんが、問題ありません。{{.error}}",
"Unable to remove machine directory: %v": "",
"Unable to start VM": "",
"Unable to start VM. Please investigate and run 'minikube delete' if possible": "",
"Unable to stop VM": "",
"Unable to update {{.driver}} driver: {{.error}}": "",
"Unable to verify SSH connectivity: {{.error}}. Will retry...": "",
"Uninstalling Kubernetes {{.kubernetes_version}} using {{.bootstrapper_name}} ...": "{{.bootstrapper_name}} を使用して Kubernetes {{.kubernetes_version}} をアンインストールしています...",
"Unmounting {{.path}} ...": "",
"Unset the KUBECONFIG environment variable, or verify that it does not point to an empty or otherwise invalid path": "",
@ -416,15 +463,20 @@
"Usage": "",
"Usage: minikube completion SHELL": "",
"Usage: minikube delete": "",
"Usage: minikube delete --all --purge": "",
"Use \"{{.CommandPath}} [command] --help\" for more information about a command.": "",
"Use 'kubect get po -A' to find the correct and namespace name": "",
"Use VirtualBox to remove the conflicting VM and/or network interfaces": "",
"Use native Golang SSH client (default true). Set to 'false' to use the command line 'ssh' command when accessing the docker machine. Useful for the machine drivers when they will not start with 'Waiting for SSH'.": "",
"User ID: {{.userID}}": "",
"Userspace file server is shutdown": "",
"Userspace file server:": "",
"Using image repository {{.name}}": "イメージ リポジトリ {{.name}} を使用しています",
"Using the '{{.runtime}}' runtime with the 'none' driver is an untested configuration!": "",
"Using the running {{.driver_name}} \"{{.profile_name}}\" VM ...": "",
"VM driver is one of: %v": "VM ドライバは次のいずれかです。%v",
"VM is unable to access {{.repository}}, you may need to configure a proxy or set --image-repository": "",
"VM may be unable to resolve external DNS records": "",
"Verify that your HTTP_PROXY and HTTPS_PROXY environment variables are set correctly.": "",
"Verify the IP address of the running cluster in kubeconfig.": "",
"Verifying dashboard health ...": "",
@ -434,12 +486,14 @@
"VirtualBox cannot create a network, probably because it conflicts with an existing network that minikube no longer knows about. Try running 'minikube delete'": "",
"VirtualBox is broken. Disable real-time anti-virus software, reboot, and reinstall VirtualBox if the problem continues.": "",
"VirtualBox is broken. Reinstall VirtualBox, reboot, and run 'minikube delete'.": "",
"VirtualBox is unable to find its network interface. Try upgrading to the latest release and rebooting.": "",
"Virtualization support is disabled on your computer. If you are running minikube within a VM, try '--vm-driver=none'. Otherwise, consult your systems BIOS manual for how to enable virtualization.": "",
"Wait failed": "",
"Wait failed: {{.error}}": "",
"Wait until Kubernetes core services are healthy before exiting": "Kubernetes コアサービスが正常になるまで待機してから終了してください",
"Wait until Kubernetes core services are healthy before exiting.": "",
"Waiting for cluster to come online ...": "",
"Waiting for the host to be provisioned ...": "",
"Waiting for:": "",
"Warning: Your kubectl is pointing to stale minikube-vm.\\nTo fix the kubectl context, run `minikube update-context`": "",
"Where to root the NFS Shares, defaults to /nfsshares (hyperkit driver only)": "NFS 共有のルートに指定する場所。デフォルトは /nfsshareshyperkit ドライバのみ)",
"You appear to be using a proxy, but your NO_PROXY environment does not include the minikube IP ({{.ip_address}}). Please see {{.documentation_url}} for more details": "プロキシを使用しようとしていますが、現在の NO_PROXY 環境に minikube IP{{.ip_address}})は含まれていません。詳細については、{{.documentation_url}} をご覧ください",
"You can delete them using the following command(s):": "",
@ -452,50 +506,57 @@
"Your minikube vm is not running, try minikube start.": "",
"addon '{{.name}}' is currently not enabled.\nTo enable this addon run:\nminikube addons enable {{.name}}": "",
"addon '{{.name}}' is not a valid addon packaged with minikube.\nTo see the list of available addons run:\nminikube addons list": "",
"addon list failed": "",
"addons modifies minikube addons files using subcommands like \"minikube addons enable heapster\"": "",
"addon enable failed": "",
"addons modifies minikube addons files using subcommands like \"minikube addons enable dashboard\"": "",
"api load": "",
"bash completion failed": "",
"browser failed to open url: {{.error}}": "",
"call with cleanup=true to remove old tunnels": "",
"command runner": "",
"config modifies minikube config files using subcommands like \"minikube config set vm-driver kvm\"\nConfigurable fields:\\n\\n": "",
"config view failed": "",
"dashboard service is not running: {{.error}}": "",
"disable failed": "",
"dry-run mode. Validates configuration, but does does not mutate system state": "",
"dry-run validation complete!": "",
"enable failed": "",
"error creating clientset": "",
"error creating machine client": "",
"error getting driver": "",
"error parsing the input ip address for mount": "",
"error starting tunnel": "",
"failed to open browser: {{.error}}": "",
"if true, will embed the certs in kubeconfig.": "",
"kubeadm detected a TCP port conflict with another process: probably another local Kubernetes installation. Run lsof -p\u003cport\u003e to find the process and kill it": "",
"kubectl and minikube configuration will be stored in {{.home_folder}}": "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": "",
"logdir set failed": "",
"max time to wait per Kubernetes core services to be healthy.": "",
"minikube is not running, so the service cannot be accessed": "",
"minikube addons list --output OUTPUT. json, list": "",
"minikube is exiting due to an error. If the above message is not useful, open an issue:": "",
"minikube is unable to access the Google Container Registry. You may need to configure it to use a HTTP proxy.": "",
"minikube is unable to connect to the VM: {{.error}}\n\nThis is likely due to one of two reasons:\n\n- VPN or firewall interference\n- {{.hypervisor}} network configuration issue\n\nSuggested workarounds:\n\n- Disable your local VPN or firewall software\n- Configure your local VPN or firewall to allow access to {{.ip}}\n- Restart or reinstall {{.hypervisor}}\n- Use an alternative --vm-driver": "",
"minikube profile was successfully set to {{.profile_name}}": "",
"minikube status --output OUTPUT. json, text": "",
"minikube {{.version}} is available! Download it: {{.url}}": "",
"mkcmp is used to compare performance of two minikube binaries": "",
"mount argument \"{{.value}}\" must be in form: \u003csource directory\u003e:\u003ctarget directory\u003e": "",
"mount failed": "",
"not enough arguments ({{.ArgCount}}).\\nusage: minikube config set PROPERTY_NAME PROPERTY_VALUE": "",
"profile sets the current minikube profile, or gets the current profile if no arguments are provided. This is used to run and manage multiple minikube instance. You can return to the default minikube profile by running `minikube profile default`": "",
"reload cached images.": "",
"reloads images previously added using the 'cache add' subcommand": "",
"service {{.namespace_name}}/{{.service_name}} has no node port": "",
"stat failed": "",
"toom any arguments ({{.ArgCount}}).\\nusage: minikube config set PROPERTY_NAME PROPERTY_VALUE": "",
"tunnel creates a route to services deployed with type LoadBalancer and sets their Ingress to their ClusterIP": "",
"tunnel creates a route to services deployed with type LoadBalancer and sets their Ingress to their ClusterIP. for a detailed example see https://minikube.sigs.k8s.io/docs/tasks/loadbalancer": "",
"tunnel makes services of type LoadBalancer accessible on localhost": "",
"unable to bind flags": "",
"unable to delete minikube config folder": "",
"unable to set logtostderr": "",
"unset failed": "",
"unset minikube profile": "",
"unsets PROPERTY_NAME from the minikube config file. Can be overwritten by flags or environmental variables": "",
"unsets an individual value in a minikube config file": "",
"unsupported driver: {{.name}}": "",
"unsupported or missing driver: {{.name}}": "",
"update config": "",
"usage: minikube addons configure ADDON_NAME": "",
"usage: minikube addons disable ADDON_NAME": "",
@ -503,15 +564,20 @@
"usage: minikube addons list": "",
"usage: minikube addons open ADDON_NAME": "",
"usage: minikube config unset PROPERTY_NAME": "",
"usage: minikube delete": "",
"usage: minikube delete --all": "",
"usage: minikube profile [MINIKUBE_PROFILE_NAME]": "",
"zsh completion failed": "",
"{{.addonName}} was successfully enabled": "",
"{{.driver}} does not appear to be installed": "",
"{{.driver}} does not appear to be installed, but is specified by an existing profile. Please run 'minikube delete' or install {{.driver}}": "",
"{{.extra_option_component_name}}.{{.key}}={{.value}}": "",
"{{.machine}} IP has been updated to point at {{.ip}}": "",
"{{.machine}} IP was already correctly configured for {{.ip}}": "",
"{{.name}} cluster does not exist": "",
"{{.name}} has no available configuration options": "",
"{{.name}} was successfully configured": "",
"{{.path}} is version {{.client_version}}, and is incompatible with Kubernetes {{.cluster_version}}. You will need to update {{.path}} or use 'minikube kubectl' to connect with this cluster": "",
"{{.prefix}}minikube {{.version}} on {{.platform}}": "{{.platform}} 上の {{.prefix}}minikube {{.version}}",
"{{.type}} is not yet a supported filesystem. We will try anyways!": "",
"{{.url}} is not accessible: {{.error}}": ""