Merge branch 'master' into docker-env-ssh

pull/9548/head
Anders F Björklund 2020-12-05 13:07:29 +01:00
commit 45befa0c1d
110 changed files with 1425 additions and 331 deletions

View File

@ -82,7 +82,7 @@ jobs:
- name: Install gopogh
shell: bash
run: |
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.2.4/gopogh-linux-amd64
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.3.0/gopogh-linux-amd64
sudo install gopogh-linux-amd64 /usr/local/bin/gopogh
sudo apt-get install -y jq
- name: Run Integration Test

View File

@ -60,7 +60,7 @@ jobs:
- name: Install gopogh
shell: bash
run: |
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.2.4/gopogh-linux-amd64
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.3.0/gopogh-linux-amd64
sudo install gopogh-linux-amd64 /usr/local/bin/gopogh
sudo apt-get install -y jq
rm -f gopogh-linux-amd64 || true

View File

@ -120,7 +120,7 @@ jobs:
shell: bash
run: |
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.2.4/gopogh-linux-amd64
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.3.0/gopogh-linux-amd64
sudo install gopogh-linux-amd64 /usr/local/bin/gopogh
- name: Download Binaries
uses: actions/download-artifact@v1
@ -205,7 +205,7 @@ jobs:
shell: bash
run: |
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.2.4/gopogh-darwin-amd64
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.3.0/gopogh-darwin-amd64
sudo install gopogh-darwin-amd64 /usr/local/bin/gopogh
- name: Install docker
shell: bash
@ -350,7 +350,7 @@ jobs:
continue-on-error: true
shell: powershell
run: |
(New-Object Net.WebClient).DownloadFile("https://github.com/medyagh/gopogh/releases/download/v0.2.4/gopogh.exe", "C:\ProgramData\chocolatey\bin\gopogh.exe")
(New-Object Net.WebClient).DownloadFile("https://github.com/medyagh/gopogh/releases/download/v0.3.0/gopogh.exe", "C:\ProgramData\chocolatey\bin\gopogh.exe")
choco install -y kubernetes-cli
choco install -y jq
choco install -y caffeine
@ -487,7 +487,7 @@ jobs:
shell: powershell
run: |
$ErrorActionPreference = "SilentlyContinue"
(New-Object Net.WebClient).DownloadFile("https://github.com/medyagh/gopogh/releases/download/v0.2.4/gopogh.exe", "C:\ProgramData\chocolatey\bin\gopogh.exe")
(New-Object Net.WebClient).DownloadFile("https://github.com/medyagh/gopogh/releases/download/v0.3.0/gopogh.exe", "C:\ProgramData\chocolatey\bin\gopogh.exe")
choco install -y kubernetes-cli
choco install -y jq
choco install -y caffeine
@ -592,7 +592,7 @@ jobs:
shell: bash
run: |
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.2.4/gopogh-linux-amd64
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.3.0/gopogh-linux-amd64
sudo install gopogh-linux-amd64 /usr/local/bin/gopogh
- name: Download Binaries
uses: actions/download-artifact@v1
@ -689,7 +689,7 @@ jobs:
shell: bash
run: |
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.2.4/gopogh-linux-amd64
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.3.0/gopogh-linux-amd64
sudo install gopogh-linux-amd64 /usr/local/bin/gopogh
- name: Download Binaries
uses: actions/download-artifact@v1
@ -771,7 +771,7 @@ jobs:
shell: bash
run: |
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.2.4/gopogh-darwin-amd64
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.3.0/gopogh-darwin-amd64
sudo install gopogh-darwin-amd64 /usr/local/bin/gopogh
- name: Install docker
shell: bash
@ -883,7 +883,7 @@ jobs:
shell: bash
run: |
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.2.4/gopogh-linux-amd64
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.3.0/gopogh-linux-amd64
sudo install gopogh-linux-amd64 /usr/local/bin/gopogh
- name: Download Binaries
uses: actions/download-artifact@v1
@ -967,7 +967,7 @@ jobs:
shell: bash
run: |
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.2.4/gopogh-darwin-amd64
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.3.0/gopogh-darwin-amd64
sudo install gopogh-darwin-amd64 /usr/local/bin/gopogh
- name: Download Binaries
uses: actions/download-artifact@v1
@ -1074,7 +1074,7 @@ jobs:
shell: bash
run: |
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.2.4/gopogh-linux-amd64
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.3.0/gopogh-linux-amd64
sudo install gopogh-linux-amd64 /usr/local/bin/gopogh
- name: Download Binaries
uses: actions/download-artifact@v1
@ -1156,7 +1156,7 @@ jobs:
shell: bash
run: |
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.2.4/gopogh-darwin-amd64
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.3.0/gopogh-darwin-amd64
sudo install gopogh-darwin-amd64 /usr/local/bin/gopogh
- name: Download Binaries
uses: actions/download-artifact@v1

View File

@ -118,7 +118,7 @@ jobs:
shell: bash
run: |
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.2.4/gopogh-linux-amd64
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.3.0/gopogh-linux-amd64
sudo install gopogh-linux-amd64 /usr/local/bin/gopogh
- name: Download Binaries
uses: actions/download-artifact@v1
@ -203,7 +203,7 @@ jobs:
shell: bash
run: |
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.2.4/gopogh-darwin-amd64
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.3.0/gopogh-darwin-amd64
sudo install gopogh-darwin-amd64 /usr/local/bin/gopogh
- name: Install docker
shell: bash
@ -348,7 +348,7 @@ jobs:
continue-on-error: true
shell: powershell
run: |
(New-Object Net.WebClient).DownloadFile("https://github.com/medyagh/gopogh/releases/download/v0.2.4/gopogh.exe", "C:\ProgramData\chocolatey\bin\gopogh.exe")
(New-Object Net.WebClient).DownloadFile("https://github.com/medyagh/gopogh/releases/download/v0.3.0/gopogh.exe", "C:\ProgramData\chocolatey\bin\gopogh.exe")
choco install -y kubernetes-cli
choco install -y jq
choco install -y caffeine
@ -485,7 +485,7 @@ jobs:
shell: powershell
run: |
$ErrorActionPreference = "SilentlyContinue"
(New-Object Net.WebClient).DownloadFile("https://github.com/medyagh/gopogh/releases/download/v0.2.4/gopogh.exe", "C:\ProgramData\chocolatey\bin\gopogh.exe")
(New-Object Net.WebClient).DownloadFile("https://github.com/medyagh/gopogh/releases/download/v0.3.0/gopogh.exe", "C:\ProgramData\chocolatey\bin\gopogh.exe")
choco install -y kubernetes-cli
choco install -y jq
choco install -y caffeine
@ -590,7 +590,7 @@ jobs:
shell: bash
run: |
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.2.4/gopogh-linux-amd64
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.3.0/gopogh-linux-amd64
sudo install gopogh-linux-amd64 /usr/local/bin/gopogh
- name: Download Binaries
uses: actions/download-artifact@v1
@ -687,7 +687,7 @@ jobs:
shell: bash
run: |
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.2.4/gopogh-linux-amd64
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.3.0/gopogh-linux-amd64
sudo install gopogh-linux-amd64 /usr/local/bin/gopogh
- name: Download Binaries
uses: actions/download-artifact@v1
@ -769,7 +769,7 @@ jobs:
shell: bash
run: |
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.2.4/gopogh-darwin-amd64
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.3.0/gopogh-darwin-amd64
sudo install gopogh-darwin-amd64 /usr/local/bin/gopogh
- name: Install docker
shell: bash
@ -881,7 +881,7 @@ jobs:
shell: bash
run: |
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.2.4/gopogh-linux-amd64
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.3.0/gopogh-linux-amd64
sudo install gopogh-linux-amd64 /usr/local/bin/gopogh
- name: Download Binaries
uses: actions/download-artifact@v1
@ -965,7 +965,7 @@ jobs:
shell: bash
run: |
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.2.4/gopogh-darwin-amd64
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.3.0/gopogh-darwin-amd64
sudo install gopogh-darwin-amd64 /usr/local/bin/gopogh
- name: Download Binaries
uses: actions/download-artifact@v1
@ -1072,7 +1072,7 @@ jobs:
shell: bash
run: |
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.2.4/gopogh-linux-amd64
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.3.0/gopogh-linux-amd64
sudo install gopogh-linux-amd64 /usr/local/bin/gopogh
- name: Download Binaries
uses: actions/download-artifact@v1
@ -1154,7 +1154,7 @@ jobs:
shell: bash
run: |
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.2.4/gopogh-darwin-amd64
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.3.0/gopogh-darwin-amd64
sudo install gopogh-darwin-amd64 /usr/local/bin/gopogh
- name: Download Binaries
uses: actions/download-artifact@v1

View File

@ -23,7 +23,7 @@ KUBERNETES_VERSION ?= $(shell egrep "DefaultKubernetesVersion =" pkg/minikube/co
KIC_VERSION ?= $(shell egrep "Version =" pkg/drivers/kic/types.go | cut -d \" -f2)
# Default to .0 for higher cache hit rates, as build increments typically don't require new ISO versions
ISO_VERSION ?= v1.15.2-snapshot
ISO_VERSION ?= v1.15.2-snapshot2
# Dashes are valid in semver, but not Linux packaging. Use ~ to delimit alpha/beta
DEB_VERSION ?= $(subst -,~,$(RAW_VERSION))
RPM_VERSION ?= $(DEB_VERSION)
@ -92,7 +92,7 @@ SHA512SUM=$(shell command -v sha512sum || echo "shasum -a 512")
GVISOR_TAG ?= latest
# storage provisioner tag to push changes to
STORAGE_PROVISIONER_TAG ?= v3
STORAGE_PROVISIONER_TAG ?= v4
STORAGE_PROVISIONER_MANIFEST ?= $(REGISTRY)/storage-provisioner:$(STORAGE_PROVISIONER_TAG)
STORAGE_PROVISIONER_IMAGE ?= $(REGISTRY)/storage-provisioner-$(GOARCH):$(STORAGE_PROVISIONER_TAG)
@ -582,8 +582,6 @@ storage-provisioner-image-%: out/storage-provisioner-%
.PHONY: kic-base-image
kic-base-image: ## builds the kic base image and tags local/kicbase:latest and local/kicbase:$(KIC_VERSION)-$(COMMIT_SHORT)
docker rmi -f local/kicbase:latest || true
docker rmi -f local/kicbase:$(KIC_VERSION) || true
docker build -f ./deploy/kicbase/Dockerfile -t local/kicbase:$(KIC_VERSION) --build-arg COMMIT_SHA=${VERSION}-$(COMMIT) --cache-from $(KIC_BASE_IMAGE_GCR) ./deploy/kicbase
docker tag local/kicbase:$(KIC_VERSION) local/kicbase:latest
docker tag local/kicbase:$(KIC_VERSION) local/kicbase:$(KIC_VERSION)-$(COMMIT_SHORT)
@ -769,6 +767,11 @@ out/mkcmp:
out/performance-bot:
GOOS=$(GOOS) GOARCH=$(GOARCH) go build -o $@ cmd/performance/pr-bot/bot.go
.PHONY: out/metrics-collector
out/metrics-collector:
GOOS=$(GOOS) GOARCH=$(GOARCH) go build -o $@ hack/metrics/*.go
.PHONY: compare
compare: out/mkcmp out/minikube
mv out/minikube out/$(CURRENT_GIT_BRANCH).minikube

View File

@ -19,6 +19,7 @@ package config
import (
"io/ioutil"
"net"
"regexp"
"github.com/spf13/cobra"
"k8s.io/minikube/pkg/minikube/config"
@ -204,6 +205,22 @@ var addonsConfigureCmd = &cobra.Command{
cfg.KubernetesConfig.LoadBalancerEndIP = AskForStaticValidatedValue("-- Enter Load Balancer End IP: ", validator)
}
if err := config.SaveProfile(profile, cfg); err != nil {
out.ErrT(style.Fatal, "Failed to save config {{.profile}}", out.V{"profile": profile})
}
case "ingress":
profile := ClusterFlagValue()
_, cfg := mustload.Partial(profile)
validator := func(s string) bool {
format := regexp.MustCompile("^.+/.+$")
return format.MatchString(s)
}
if cfg.KubernetesConfig.CustomIngressCert == "" {
cfg.KubernetesConfig.CustomIngressCert = AskForStaticValidatedValue("-- Enter custom cert(format is \"namespace/secret\"): ", validator)
}
if err := config.SaveProfile(profile, cfg); err != nil {
out.ErrT(style.Fatal, "Failed to save config {{.profile}}", out.V{"profile": profile})
}

View File

@ -260,7 +260,7 @@ func deletePossibleKicLeftOver(cname string, driverName string) {
klog.Warningf("error deleting volumes (might be okay).\nTo see the list of volumes run: 'docker volume ls'\n:%v", errs)
}
errs = oci.DeleteKICNetworks()
errs = oci.DeleteKICNetworks(bin)
if errs != nil {
klog.Warningf("error deleting leftover networks (might be okay).\nTo see the list of networks: 'docker network ls'\n:%v", errs)
}

View File

@ -27,6 +27,7 @@ import (
"k8s.io/minikube/pkg/minikube/mustload"
"k8s.io/minikube/pkg/minikube/node"
"k8s.io/minikube/pkg/minikube/out"
"k8s.io/minikube/pkg/minikube/out/register"
"k8s.io/minikube/pkg/minikube/reason"
"k8s.io/minikube/pkg/minikube/style"
)
@ -54,6 +55,7 @@ var nodeStartCmd = &cobra.Command{
os.Exit(0)
}
register.Reg.SetStep(register.InitialSetup)
r, p, m, h, err := node.Provision(cc, n, false, viper.GetBool(deleteOnFailure))
if err != nil {
exit.Error(reason.GuestNodeProvision, "provisioning host for node", err)

View File

@ -60,6 +60,7 @@ import (
"k8s.io/minikube/pkg/minikube/out/register"
"k8s.io/minikube/pkg/minikube/reason"
"k8s.io/minikube/pkg/minikube/style"
pkgtrace "k8s.io/minikube/pkg/trace"
"k8s.io/minikube/pkg/minikube/registry"
"k8s.io/minikube/pkg/minikube/translate"
@ -129,6 +130,10 @@ func runStart(cmd *cobra.Command, args []string) {
register.SetEventLogPath(localpath.EventLog(ClusterFlagValue()))
out.SetJSON(outputFormat == "json")
if err := pkgtrace.Initialize(viper.GetString(trace)); err != nil {
exit.Message(reason.Usage, "error initializing tracing: {{.Error}}", out.V{"Error": err.Error()})
}
defer pkgtrace.Cleanup()
displayVersion(version.GetVersion())
// No need to do the update check if no one is going to see it
@ -243,6 +248,17 @@ func runStart(cmd *cobra.Command, args []string) {
})
}
}
if existing.KubernetesConfig.ContainerRuntime == "crio" {
// Stop and start again if it's crio because it's broken above v1.17.3
out.WarningT("Due to issues with CRI-O post v1.17.3, we need to restart your cluster.")
out.WarningT("See details at https://github.com/kubernetes/minikube/issues/8861")
stopProfile(existing.Name)
starter, err = provisionWithDriver(cmd, ds, existing)
if err != nil {
exitGuestProvision(err)
}
}
}
kubeconfig, err := startWithDriver(cmd, starter, existing)

View File

@ -108,6 +108,7 @@ const (
kicBaseImage = "base-image"
ports = "ports"
startNamespace = "namespace"
trace = "trace"
)
var (
@ -152,6 +153,7 @@ func initMinikubeFlags() {
startCmd.Flags().Bool(deleteOnFailure, false, "If set, delete the current cluster if start fails and try again. Defaults to false.")
startCmd.Flags().Bool(forceSystemd, false, "If set, force the container runtime to use sytemd as cgroup manager. Currently available for docker and crio. Defaults to false.")
startCmd.Flags().StringVarP(&outputFormat, "output", "o", "text", "Format to print stdout in. Options include: [text,json]")
startCmd.Flags().StringP(trace, "", "", "Send trace events. Options include: [gcp]")
}
// initKubernetesFlags inits the commandline flags for Kubernetes related options

View File

@ -46,6 +46,7 @@ var (
stopAll bool
keepActive bool
scheduledStopDuration time.Duration
cancelScheduledStop bool
)
// stopCmd represents the stop command
@ -60,6 +61,8 @@ func init() {
stopCmd.Flags().BoolVar(&stopAll, "all", false, "Set flag to stop all profiles (clusters)")
stopCmd.Flags().BoolVar(&keepActive, "keep-context-active", false, "keep the kube-context active after cluster is stopped. Defaults to false.")
stopCmd.Flags().DurationVar(&scheduledStopDuration, "schedule", 0*time.Second, "Set flag to stop cluster after a set amount of time (e.g. --schedule=5m)")
stopCmd.Flags().BoolVar(&cancelScheduledStop, "cancel-scheduled", false, "cancel any existing scheduled stop requests")
if err := stopCmd.Flags().MarkHidden("schedule"); err != nil {
klog.Info("unable to mark --schedule flag as hidden")
}
@ -97,6 +100,11 @@ func runStop(cmd *cobra.Command, args []string) {
// Kill any existing scheduled stops
schedule.KillExisting(profilesToStop)
if cancelScheduledStop {
register.Reg.SetStep(register.Done)
out.Step(style.Stopped, `All existing scheduled stops cancelled`)
return
}
if scheduledStopDuration != 0 {
if err := schedule.Daemonize(profilesToStop, scheduledStopDuration); err != nil {

View File

@ -65,6 +65,9 @@ spec:
- --validating-webhook=:8443
- --validating-webhook-certificate=/usr/local/certificates/cert
- --validating-webhook-key=/usr/local/certificates/key
{{if .CustomIngressCert}}
- --default-ssl-certificate={{ .CustomIngressCert }}
{{end}}
securityContext:
capabilities:
drop:

View File

@ -13,6 +13,7 @@ menu "System tools"
source "$BR2_EXTERNAL_MINIKUBE_PATH/package/gluster/Config.in"
source "$BR2_EXTERNAL_MINIKUBE_PATH/package/vbox-guest/Config.in"
source "$BR2_EXTERNAL_MINIKUBE_PATH/package/containerd-bin/Config.in"
source "$BR2_EXTERNAL_MINIKUBE_PATH/package/buildkit-bin/Config.in"
source "$BR2_EXTERNAL_MINIKUBE_PATH/package/falco-module/Config.in"
source "$BR2_EXTERNAL_MINIKUBE_PATH/package/scheduled-stop/Config.in"
endmenu

View File

@ -0,0 +1,4 @@
config BR2_PACKAGE_BUILDKIT_BIN
bool "buildkit-bin"
default y
depends on BR2_x86_64

View File

@ -0,0 +1 @@
sha256 33bcaa49b31bc3a277ac75d32fce3f5442d39f53a1799b8624e985279b579f74 buildkit-v0.7.2.linux-amd64.tar.gz

View File

@ -0,0 +1,20 @@
################################################################################
#
# buildkit-bin
#
################################################################################
BUILDKIT_BIN_VERSION = v0.7.2
BUILDKIT_BIN_SITE = https://github.com/moby/buildkit/releases/download/$(BUILDKIT_BIN_VERSION)
BUILDKIT_BIN_SOURCE = buildkit-$(BUILDKIT_BIN_VERSION).linux-amd64.tar.gz
define BUILDKIT_BIN_INSTALL_TARGET_CMDS
$(INSTALL) -D -m 0755 \
$(@D)/buildctl \
$(TARGET_DIR)/usr/bin/buildctl
$(INSTALL) -D -m 0755 \
$(@D)/buildkitd \
$(TARGET_DIR)/usr/sbin/buildkitd
endef
$(eval $(generic-package))

View File

@ -21,6 +21,8 @@
# for a kubernetes node image, it doesn't contain much we don't need
FROM ubuntu:focal-20200925
ARG BUILDKIT_VERSION="v0.7.2"
# copy in static files (configs, scripts)
COPY 10-network-security.conf /etc/sysctl.d/10-network-security.conf
COPY 11-tcp-mtu-probing.conf /etc/sysctl.d/11-tcp-mtu-probing.conf
@ -106,6 +108,17 @@ RUN sh -c "echo 'deb https://download.docker.com/linux/ubuntu focal stable' > /e
apt-key add - < docker.key && \
clean-install docker-ce docker-ce-cli containerd.io
# install buildkit
RUN export ARCH=$(dpkg --print-architecture | sed 's/ppc64el/ppc64le/' | sed 's/armhf/arm-v7/') \
&& echo "Installing buildkit ..." \
&& export BUILDKIT_BASE_URL="https://github.com/moby/buildkit/releases/download/${BUILDKIT_VERSION}" \
&& curl -sSL --retry 5 --output /tmp/buildkit.tgz "${BUILDKIT_BASE_URL}/buildkit-${BUILDKIT_VERSION}.linux-${ARCH}.tar.gz" \
&& tar -C /usr/local -xzvf /tmp/buildkit.tgz \
&& rm -rf /tmp/buildkit.tgz \
&& chmod 755 /usr/local/bin/buildctl \
&& chmod 755 /usr/local/bin/buildkit-runc \
&& chmod 755 /usr/local/bin/buildkitd
# Install cri-o/podman dependencies:
RUN sh -c "echo 'deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list" && \
curl -LO https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/xUbuntu_20.04/Release.key && \
@ -113,8 +126,8 @@ RUN sh -c "echo 'deb https://download.opensuse.org/repositories/devel:/kubic:/li
clean-install containers-common catatonit conmon containernetworking-plugins cri-tools podman-plugins varlink
# install cri-o based on https://github.com/cri-o/cri-o/blob/release-1.18/README.md#installing-cri-o
RUN sh -c "echo 'deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/1.18/xUbuntu_20.04/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable:cri-o:1.18.list" && \
curl -LO https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/1.18/xUbuntu_20.04/Release.key && \
RUN sh -c "echo 'deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/1.18:/1.18.4/xUbuntu_20.04/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable:cri-o:1.18.list" && \
curl -LO https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/1.18:/1.18.4/xUbuntu_20.04/Release.key && \
apt-key add - < Release.key && \
clean-install cri-o cri-o-runc

12
go.mod
View File

@ -3,8 +3,9 @@ module k8s.io/minikube
go 1.15
require (
cloud.google.com/go/storage v1.8.0
cloud.google.com/go/storage v1.10.0
github.com/Azure/azure-sdk-for-go v42.3.0+incompatible
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v0.13.0
github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5 // indirect
github.com/Parallels/docker-machine-parallels/v2 v2.0.1
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d // indirect
@ -74,21 +75,24 @@ require (
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f
github.com/zchee/go-vmnet v0.0.0-20161021174912-97ebf9174097
go.opentelemetry.io/otel v0.13.0
go.opentelemetry.io/otel/sdk v0.13.0
golang.org/x/build v0.0.0-20190927031335-2835ba2e683f
golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6
golang.org/x/mod v0.3.0
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208
golang.org/x/sys v0.0.0-20200523222454-059865788121
golang.org/x/text v0.3.2
google.golang.org/api v0.25.0
golang.org/x/text v0.3.3
google.golang.org/api v0.29.0
gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 // indirect
gopkg.in/yaml.v2 v2.3.0
gotest.tools/v3 v3.0.2 // indirect
k8s.io/api v0.17.4
k8s.io/apimachinery v0.17.4
k8s.io/client-go v0.17.4
k8s.io/klog v1.0.0
k8s.io/klog/v2 v2.4.0
k8s.io/kubectl v0.0.0
k8s.io/kubernetes v1.18.5

59
go.sum
View File

@ -17,12 +17,15 @@ cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bP
cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk=
cloud.google.com/go v0.57.0 h1:EpMNVUorLiZIELdMZbCYX/ByTFCdoYopYAGxaGVz9ms=
cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs=
cloud.google.com/go v0.61.0 h1:NLQf5e1OMspfNT1RAHOB3ublr1TW3YTXO8OiWwVjK2U=
cloud.google.com/go v0.61.0/go.mod h1:XukKJg4Y7QsUu0Hxg3qQKUWR4VuWivmyMK2+rUyxAqw=
cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE=
cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc=
cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg=
cloud.google.com/go/bigquery v1.7.0 h1:a/O/bK/vWrYGOTFtH8di4rBxMZnmkjy+Y5LxpDwo+dA=
cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc=
cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ=
cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
cloud.google.com/go/datastore v1.1.0 h1:/May9ojXjRkPBNVrq+oWLqmWCkr4OU5uRY29bu0mRyQ=
cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk=
@ -37,9 +40,12 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo
cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk=
cloud.google.com/go/storage v1.8.0 h1:86K1Gel7BQ9/WmNWn7dTKMvTLFzwtBe5FNqYbi9X35g=
cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=
cloud.google.com/go/storage v1.10.0 h1:STgFzyU5/8miMl0//zKh2aQeTyeaUH3WN9bSUiJ09bA=
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
code.gitea.io/sdk/gitea v0.12.0/go.mod h1:z3uwDV/b9Ls47NGukYM9XhnHtqPh/J+t40lsUrR6JDY=
contrib.go.opencensus.io/exporter/aws v0.0.0-20181029163544-2befc13012d0/go.mod h1:uu1P0UCM/6RbsMrgPa98ll8ZcHM858i/AD06a9aLRCA=
contrib.go.opencensus.io/exporter/ocagent v0.5.0/go.mod h1:ImxhfLRpxoYiSq891pBrLVhN+qmP8BTVvdH2YLs7Gl0=
contrib.go.opencensus.io/exporter/stackdriver v0.12.1 h1:Dll2uFfOVI3fa8UzsHyP6z0M6fEc9ZTAMo+Y3z282Xg=
contrib.go.opencensus.io/exporter/stackdriver v0.12.1/go.mod h1:iwB6wGarfphGGe/e5CWqyUk/cLzKnWsOKPVW3no6OTw=
contrib.go.opencensus.io/integrations/ocsql v0.1.4/go.mod h1:8DsSdjz3F+APR+0z0WkU1aRorQCFfRxvqjUUPMbF3fE=
contrib.go.opencensus.io/resource v0.1.1/go.mod h1:F361eGI91LCmW1I/Saf+rX0+OFcigGlFvXwEGEnkRLA=
@ -83,10 +89,13 @@ github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbt
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/DataDog/sketches-go v0.0.1/go.mod h1:Q5DbzQ+3AkgGwymQO7aZFNP7ns2lZKGtvRBzRXfdi60=
github.com/Djarvur/go-err113 v0.0.0-20200410182137-af658d038157/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs=
github.com/Djarvur/go-err113 v0.1.0/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs=
github.com/GoogleCloudPlatform/cloudsql-proxy v0.0.0-20191009163259-e802c2cb94ae/go.mod h1:mjwGPas4yKduTyubHvD1Atl9r1rUq8DfVy+gkVvZ+oo=
github.com/GoogleCloudPlatform/k8s-cloud-provider v0.0.0-20190822182118-27a4ced34534/go.mod h1:iroGtC8B3tQiqtds1l+mgk/BBOrxbqjH+eUfFQYRc14=
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v0.13.0 h1:fjKUtfldCPIF4nIzAAj3LzP8Lrd3DuRIMiFdOsj4fLc=
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v0.13.0/go.mod h1:q/paYxLXKVhwfC3lzLfhtL54fAx14wzMN9DundQOBMc=
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=
github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd/go.mod h1:64YHyfSL2R96J44Nlwm39UHepQbyR5q10x7iYa1ks2E=
@ -137,6 +146,7 @@ github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk5
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8=
github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c=
github.com/apex/log v1.1.4/go.mod h1:AlpoD9aScyQfJDVHmLMEcx4oU6LqzkWp4Mg9GdAcEvQ=
github.com/apex/log v1.3.0 h1:1fyfbPvUwD10nMoh3hY6MXzvZShJQn9/ck7ATgAt5pA=
github.com/apex/log v1.3.0/go.mod h1:jd8Vpsr46WAe3EZSQ/IUMs2qQD/GOycT5rPWCO1yGcs=
github.com/apex/logs v0.0.4/go.mod h1:XzxuLZ5myVHDy9SAmYpamKKRNApGj54PfYLcFrXqDwo=
github.com/aphistic/golf v0.0.0-20180712155816-02c07f170c5a/go.mod h1:3NqKYiepwy8kCu4PNA+aP7WUV72eXWJeP9/r3/K9aLE=
@ -169,6 +179,7 @@ github.com/bazelbuild/bazel-gazelle v0.19.1-0.20191105222053-70208cbdc798/go.mod
github.com/bazelbuild/buildtools v0.0.0-20190731111112-f720930ceb60/go.mod h1:5JP0TXzWDHXv8qvxRC4InIazwdyDseBDbzESUMKk1yU=
github.com/bazelbuild/buildtools v0.0.0-20190917191645-69366ca98f89/go.mod h1:5JP0TXzWDHXv8qvxRC4InIazwdyDseBDbzESUMKk1yU=
github.com/bazelbuild/rules_go v0.0.0-20190719190356-6dae44dc5cab/go.mod h1:MC23Dc/wkXEyk3Wpq6lCqz0ZAYOZDw2DR5y3N1q2i7M=
github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0=
@ -202,6 +213,7 @@ github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QH
github.com/cenkalti/backoff/v4 v4.1.0 h1:c8LkOFQTzuO0WBM/ae5HdGQuZPfPxp7lqBRwQRm4fSc=
github.com/cenkalti/backoff/v4 v4.1.0/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw=
github.com/census-instrumentation/opencensus-proto v0.2.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/census-instrumentation/opencensus-proto v0.2.1 h1:glEXhBS5PSLLv4IXzLA5yPRVX4bilULVyxxbrfOtDAk=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/cespare/prettybench v0.0.0-20150116022406-03b8cfe5406c/go.mod h1:Xe6ZsFhtM8HrDku0pxJ3/Lr51rwykrzgFwpmTzleatY=
github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
@ -524,6 +536,7 @@ github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4=
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.4.1 h1:/exdXoGamhu5ONeUJH0deniYLWYvQwW66yvlfiiKTu0=
github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM=
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-github v17.0.0+incompatible h1:N0LgJ1j65A7kfXrZnUDaYCs/Sf4rEjNlfyDHW9dolSY=
@ -544,6 +557,8 @@ github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPg
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
github.com/google/martian v2.1.1-0.20190517191504-25dcb96d9e51+incompatible h1:xmapqc1AyLoB+ddYT6r04bD9lIjlOqGaREovi0SzFaE=
github.com/google/martian v2.1.1-0.20190517191504-25dcb96d9e51+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
github.com/google/martian/v3 v3.0.0 h1:pMen7vLs8nvgEYhywH3KDWJIJTeEr2ULsVWHWYHQyBs=
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
github.com/google/pprof v0.0.0-20190515194954-54271f7e092f h1:Jnx61latede7zDD3DiiP4gmNz33uK0U5HDUaF0a/HVQ=
github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
@ -551,6 +566,7 @@ github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hf
github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
github.com/google/rpmpack v0.0.0-20191226140753-aa36bfddb3a0/go.mod h1:RaTPr0KUf2K7fnZYLNDrr8rxAamWs3iNywJLtQ2AzBg=
github.com/google/slowjam v0.0.0-20200530021616-df27e642fe7b h1:x3aElhKtGmXLo6RI2FJSBaPBT0acmn2LFfKVP1CqH8o=
@ -572,6 +588,8 @@ github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTV
github.com/googleapis/gnostic v0.2.2/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY=
github.com/googleapis/gnostic v0.3.0 h1:CcQijm0XKekKjP/YCz28LXVSpgguuB+nCxaSjCe09y0=
github.com/googleapis/gnostic v0.3.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY=
github.com/googleinterns/cloud-operations-api-mock v0.0.0-20200709193332-a1e58c29bdd3 h1:eHv/jVY/JNop1xg2J9cBb4EzyMpWZoNCP1BslSAIkOI=
github.com/googleinterns/cloud-operations-api-mock v0.0.0-20200709193332-a1e58c29bdd3/go.mod h1:h/KNeRx7oYU4SpA4SoY7W2/NxDKEEVuwA6j9A27L4OI=
github.com/gookit/color v1.2.4/go.mod h1:AhIE+pS6D4Ql0SQWbBeXPHw7gY0/sjHoA4s/n1KB7xg=
github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=
@ -1091,6 +1109,8 @@ github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJy
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s=
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2 h1:b6uOv7YOFK0TYG7HtkIgExQo+2RdLuwRft63jn2HWj8=
@ -1155,6 +1175,7 @@ github.com/xlab/handysort v0.0.0-20150421192137-fb3537ed64a1/go.mod h1:QcJo0QPSf
github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/zchee/go-vmnet v0.0.0-20161021174912-97ebf9174097 h1:Ucx5I1l1+TWXvqFmBigYu4Ub4MLvUuUU/whjoUvV95I=
github.com/zchee/go-vmnet v0.0.0-20161021174912-97ebf9174097/go.mod h1:lFZSWRIpCfE/pt91hHBBpV6+x87YlCjsp+aIR2qCPPU=
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
@ -1172,6 +1193,12 @@ go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.3 h1:8sGtKOrtQqkN1bp2AtX+misvLIlOmsEsNd+9NIcPEm8=
go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.4 h1:LYy1Hy3MJdrCdMwwzxA/dRok4ejH+RwNGbuoD9fCjto=
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opentelemetry.io/otel v0.13.0 h1:2isEnyzjjJZq6r2EKMsFj4TxiQiexsM04AVhwbR/oBA=
go.opentelemetry.io/otel v0.13.0/go.mod h1:dlSNewoRYikTkotEnxdmuBHgzT+k/idJSfDv/FxEnOY=
go.opentelemetry.io/otel/sdk v0.13.0 h1:4VCfpKamZ8GtnepXxMRurSpHpMKkcxhtO33z1S4rGDQ=
go.opentelemetry.io/otel/sdk v0.13.0/go.mod h1:dKvLH8Uu8LcEPlSAUsfW7kMGaJBhk/1NYvpPZ6wIMbU=
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.4.0 h1:cxzIVoETapQEqDhQu3QfnvXAV4AlzcvUCxkVUFw3+EU=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
@ -1208,6 +1235,7 @@ golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPh
golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37 h1:cg5LA/zNPRzIXIWSCxQW10Rvpy94aQh3LT/ShoCpkHw=
golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a h1:vclmkQCjlDX5OydZ9wv8rBCcS0QyQY66Mpf/7BZbInM=
golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
@ -1297,8 +1325,13 @@ golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLL
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2 h1:eDrdRpKgkcCqKZQwyZRyeFZgfqt37SL7Kv3tok06cKE=
golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20200707034311-ab3426394381 h1:VXak5I6aEWmAXeQjA+QSZzlgNrpq9mjcfDemuexIKsU=
golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@ -1320,6 +1353,8 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a h1:WXEvlFVvvGxCJLG6REjsT03iWnKLEWinaScsxF2Vm2o=
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208 h1:qwRHBd0NqMbJxfbotnDhm2ByMI1Shq4Y6oRJo21SGJA=
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20171026204733-164713f0dfce/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@ -1375,6 +1410,7 @@ golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200523222454-059865788121 h1:rITEj+UZHYC927n8GT97eC3zrpzXdb/voyeOuVKS46o=
golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@ -1384,6 +1420,8 @@ golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c h1:fqgJT0MGcGpPgpWU7VRdRjuArfcOvC4AoJmILihzhDg=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
@ -1464,8 +1502,13 @@ golang.org/x/tools v0.0.0-20200426102838-f3a5411a4c3b/go.mod h1:EkVYQZoAsY45+roY
golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200502202811-ed308ab3e770/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200527183253-8e7acdbce89d h1:SR+e35rACZFBohNb4Om1ibX6N3iO0FtdbwqGSuD9dBU=
golang.org/x/tools v0.0.0-20200527183253-8e7acdbce89d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200701151220-7cb253f4c4f8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200713011307-fd294ab11aed h1:+qzWo37K31KxduIYaBeMqJ8MUOyTayOQKpH9aDPLMSY=
golang.org/x/tools v0.0.0-20200713011307-fd294ab11aed/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898 h1:/atklqdjdhuosWIl6AIbOeHJjicWYPqR9bpxqxYG2pA=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@ -1496,6 +1539,9 @@ google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/
google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
google.golang.org/api v0.25.0 h1:LodzhlzZEUfhXzNUMIfVlf9Gr6Ua5MMtoFWh7+f47qA=
google.golang.org/api v0.25.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
google.golang.org/api v0.29.0 h1:BaiDisFir8O4IJxvAabCGGkQ6yCJegNQqSVoYUNAnbk=
google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
@ -1533,9 +1579,15 @@ google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfG
google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U=
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
google.golang.org/genproto v0.0.0-20200527145253-8367513e4ece h1:1YM0uhfumvoDu9sx8+RyWwTI63zoCQvI23IYFRlvte0=
google.golang.org/genproto v0.0.0-20200527145253-8367513e4ece/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA=
google.golang.org/genproto v0.0.0-20200605102947-12044bf5ea91/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA=
google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA=
google.golang.org/genproto v0.0.0-20200711021454-869866162049/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20200715011427-11fb19a81f2c h1:6DWnZZ6EY/59QRRQttZKiktVL23UuQYs7uy75MhhLRM=
google.golang.org/genproto v0.0.0-20200715011427-11fb19a81f2c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
@ -1552,6 +1604,9 @@ google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8
google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60=
google.golang.org/grpc v1.29.1 h1:EC2SB8S04d2r73uptxphDSUG+kTKVgjRPF+N3xpxRB4=
google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/grpc v1.32.0 h1:zWTV+LMdc3kaiJMSTOFz2UgSBgx8RNQoTGiZu3fR9S0=
google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
@ -1562,6 +1617,8 @@ google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.24.0 h1:UhZDfRO8JRQru4/+LlLE0BRKGF8L+PICnvYZmx/fEGA=
google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c=
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
gopkg.in/airbrake/gobrake.v2 v2.0.9 h1:7z2uVWwn7oVeeugY1DtlPAy5H+KYgB1KeKTnqjNatLo=
gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U=
gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc=
@ -1609,6 +1666,8 @@ gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gotest.tools v2.1.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=
gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo=
gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=

View File

@ -27,28 +27,30 @@ set -ex -o pipefail
readonly PROFILE_NAME="k8sconformance"
readonly MINIKUBE=${1:-./out/minikube}
shift || true
readonly START_ARGS=${@:-}
# Requires a fully running Kubernetes cluster.
"${MINIKUBE}" delete -p "${PROFILE_NAME}" || true
"${MINIKUBE}" start -p "${PROFILE_NAME}" --wait=all
"${MINIKUBE}" start -p "${PROFILE_NAME}" ${START_ARGS} --wait=all --nodes=2
kubectl --context "${PROFILE_NAME}" get pods --all-namespaces
"${MINIKUBE}" status -p "${PROFILE_NAME}"
go get -u -v github.com/vmware-tanzu/sonobuoy
curl -LO https://github.com/vmware-tanzu/sonobuoy/releases/download/v0.19.0/sonobuoy_0.19.0_linux_amd64.tar.gz || true
tar -xzf sonobuoy_0.19.0_linux_amd64.tar.gz
sonobuoy run --wait
./sonobuoy run --mode=certified-conformance --wait --alsologtostderr
outdir="$(mktemp -d)"
sonobuoy retrieve "${outdir}"
./sonobuoy retrieve "${outdir}"
cwd=$(pwd)
cd "${outdir}"
mkdir ./results; tar xzf *.tar.gz -C ./results
version=$(${MINIKUBE} version | cut -d" " -f3)
version=$(${cwd}/${MINIKUBE} version | cut -d" " -f3)
mkdir "minikube-${version}"
mkdir -p "minikube-${version}"
cd "minikube-${version}"
cat <<EOF >PRODUCT.yaml
@ -67,6 +69,6 @@ cat <<EOF >README.md
./hack/conformance_tests.sh $MINIKUBE $START_ARGS
EOF
cp ../results/plugins/e2e/results/* .
cp -r ../results/plugins/e2e/results/global/* .
cd ..
cp -r "minikube-${version}" "${cwd}"

View File

@ -0,0 +1,45 @@
#!/bin/bash
# Copyright 2020 The Kubernetes Authors All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# This script builds the minikube binary for all 3 platforms and uploads them.
# The binaries are built on master and uploaded to a latest bucket.
set -eux -o pipefail
readonly bucket="minikube/latest"
# Make sure the right golang version is installed based on Makefile
WANT_GOLANG_VERSION=$(grep '^GO_VERSION' Makefile | awk '{ print $3 }')
./hack/jenkins/installers/check_install_golang.sh $WANT_GOLANG_VERSION /usr/local
declare -rx GOPATH=/var/lib/jenkins/go
GIT_COMMIT_AT_HEAD=$(git rev-parse HEAD | xargs)
MINIKUBE_LATEST_COMMIT=$(gsutil stat gs://minikube/latest/minikube-linux-amd64 | grep commit | awk '{ print $2 }' | xargs)
if [ "$GIT_COMMIT_AT_HEAD" = "$MINIKUBE_LATEST_COMMIT" ]; then
echo "The current uploaded binary is already latest, skipping build"
exit 0
fi
make cross && failed=$? || failed=$?
if [[ "${failed}" -ne 0 ]]; then
echo "build failed"
exit "${failed}"
fi
gsutil cp out/minikube-* "gs://${bucket}"
gsutil setmeta -r -h "x-goog-meta-commit:$GIT_COMMIT_AT_HEAD" "gs://${bucket}"

View File

@ -347,9 +347,9 @@ fi
echo ">> Installing gopogh"
if [ "$(uname)" != "Darwin" ]; then
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.2.4/gopogh-linux-amd64 && sudo install gopogh-linux-amd64 /usr/local/bin/gopogh
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.3.0/gopogh-linux-amd64 && sudo install gopogh-linux-amd64 /usr/local/bin/gopogh
else
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.2.4/gopogh-darwin-amd64 && sudo install gopogh-darwin-amd64 /usr/local/bin/gopogh
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.3.0/gopogh-darwin-amd64 && sudo install gopogh-darwin-amd64 /usr/local/bin/gopogh
fi
echo ">> Running gopogh"

12
hack/metrics/README.md Normal file
View File

@ -0,0 +1,12 @@
This script runs `minikube start` in a loop and measures how long it takes.
It exports this data to Stackdriver via the OpenTelemetry API.
To run this script, run:
```
MINIKUBE_GCP_PROJECT_ID=<GCP Project ID> go run hack/metrics/*.go
```
This script is used to track minikube performance and prevent regressions.
_Note: this script will export data to both Cloud Monitoring and Cloud Trace in the provided GCP project_

171
hack/metrics/metrics.go Normal file
View File

@ -0,0 +1,171 @@
/*
Copyright 2020 The Kubernetes Authors All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package main
import (
"context"
"flag"
"fmt"
"log"
"os"
"os/exec"
"strings"
"time"
_ "cloud.google.com/go/storage"
"contrib.go.opencensus.io/exporter/stackdriver"
"github.com/pkg/errors"
"go.opencensus.io/stats"
"go.opencensus.io/stats/view"
"go.opencensus.io/trace"
pkgtrace "k8s.io/minikube/pkg/trace"
)
const (
customMetricName = "custom.googleapis.com/minikube/start_time"
profile = "cloud-monitoring"
)
var (
// The task latency in seconds
latencyS = stats.Float64("repl/start_time", "start time in seconds", "s")
labels string
tmpFile string
)
func main() {
if err := execute(); err != nil {
fmt.Println(err)
os.Exit(1)
}
}
func init() {
flag.StringVar(&labels, "label", "", "Comma separated list of labels to add to metrics in key:value format")
flag.StringVar(&tmpFile, "file", "/tmp/minikube", "Download minikube to this file for testing")
flag.Parse()
}
func execute() error {
projectID := os.Getenv(pkgtrace.ProjectEnvVar)
if projectID == "" {
return fmt.Errorf("metrics collector requires a valid GCP project id set via the %s env variable", pkgtrace.ProjectEnvVar)
}
ctx := context.Background()
if err := downloadMinikube(ctx, tmpFile); err != nil {
return errors.Wrap(err, "downloading minikube")
}
// Register the view. It is imperative that this step exists,
// otherwise recorded metrics will be dropped and never exported.
v := &view.View{
Name: customMetricName,
Measure: latencyS,
Description: "minikube start time",
Aggregation: view.LastValue(),
}
if err := view.Register(v); err != nil {
return errors.Wrap(err, "registering view")
}
for _, cr := range []string{"docker", "containerd", "crio"} {
if err := exportMinikubeStart(ctx, projectID, cr); err != nil {
log.Printf("error exporting minikube start data for runtime %v: %v", cr, err)
}
}
return nil
}
func exportMinikubeStart(ctx context.Context, projectID, containerRuntime string) error {
sd, err := getExporter(projectID, containerRuntime)
if err != nil {
return errors.Wrap(err, "getting stackdriver exporter")
}
// Register it as a trace exporter
trace.RegisterExporter(sd)
if err := sd.StartMetricsExporter(); err != nil {
return errors.Wrap(err, "starting metric exporter")
}
// track minikube start time and record it to metrics collector
st, err := minikubeStartTime(ctx, projectID, tmpFile, containerRuntime)
if err != nil {
return errors.Wrap(err, "collecting start time")
}
fmt.Printf("Latency: %f\n", st)
stats.Record(ctx, latencyS.M(st))
time.Sleep(30 * time.Second)
sd.Flush()
sd.StopMetricsExporter()
trace.UnregisterExporter(sd)
return nil
}
func getExporter(projectID, containerRuntime string) (*stackdriver.Exporter, error) {
return stackdriver.NewExporter(stackdriver.Options{
ProjectID: projectID,
// MetricPrefix helps uniquely identify your metrics.
MetricPrefix: "minikube_start",
// ReportingInterval sets the frequency of reporting metrics
// to stackdriver backend.
ReportingInterval: 1 * time.Second,
DefaultMonitoringLabels: getLabels(containerRuntime),
})
}
func getLabels(containerRuntime string) *stackdriver.Labels {
l := &stackdriver.Labels{}
l.Set("container-runtime", containerRuntime, "container-runtime")
if labels == "" {
return l
}
separated := strings.Split(labels, ",")
for _, s := range separated {
sep := strings.Split(s, ":")
if len(sep) != 2 {
continue
}
log.Printf("Adding label %s=%s to metrics...", sep[0], sep[1])
l.Set(sep[0], sep[1], "")
}
return l
}
func minikubeStartTime(ctx context.Context, projectID, minikubePath, containerRuntime string) (float64, error) {
defer deleteMinikube(ctx, minikubePath)
cmd := exec.CommandContext(ctx, minikubePath, "start", "--driver=docker", "-p", profile, "--memory=2000", "--trace=gcp", fmt.Sprintf("--container-runtime=%s", containerRuntime))
cmd.Env = append(os.Environ(), fmt.Sprintf("%s=%s", pkgtrace.ProjectEnvVar, projectID))
cmd.Stdout = os.Stderr
cmd.Stderr = os.Stderr
t := time.Now()
log.Printf("Running [%v]....", cmd.Args)
if err := cmd.Run(); err != nil {
return 0, errors.Wrapf(err, "running %v", cmd.Args)
}
totalTime := time.Since(t).Seconds()
return totalTime, nil
}
func deleteMinikube(ctx context.Context, minikubePath string) {
cmd := exec.CommandContext(ctx, minikubePath, "delete", "-p", profile)
cmd.Stdout = os.Stderr
cmd.Stderr = os.Stderr
if err := cmd.Run(); err != nil {
log.Printf("error deleting: %v", err)
}
}

101
hack/metrics/minikube.go Normal file
View File

@ -0,0 +1,101 @@
/*
Copyright 2020 The Kubernetes Authors All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package main
import (
"context"
"fmt"
"io/ioutil"
"os"
"os/exec"
"runtime"
"strings"
"log"
"cloud.google.com/go/storage"
"github.com/pkg/errors"
)
const (
bucketName = "minikube"
)
// download minikube latest to file
func downloadMinikube(ctx context.Context, minikubePath string) error {
client, err := storage.NewClient(ctx)
if err != nil {
return errors.Wrap(err, "creating client")
}
obj := client.Bucket("minikube").Object(fmt.Sprintf("latest/%s", binary()))
if localMinikubeIsLatest(ctx, minikubePath, obj) {
log.Print("local minikube is latest, skipping download...")
return nil
}
os.Remove(minikubePath)
// download minikube binary from GCS
rc, err := obj.NewReader(ctx)
if err != nil {
return errors.Wrap(err, "gcs new reader")
}
defer rc.Close()
data, err := ioutil.ReadAll(rc)
if err != nil {
return errors.Wrap(err, "ioutil read all")
}
log.Printf("downloading gs://%s/%s to %v", bucketName, binary(), minikubePath)
if err := ioutil.WriteFile(minikubePath, data, 0777); err != nil {
return errors.Wrap(err, "writing minikubePath")
}
if err := os.Chmod(minikubePath, 0700); err != nil {
return errors.Wrap(err, "chmod")
}
return nil
}
// localMinikubeIsLatest returns true if the local version of minikube
// matches the latest version in GCS
func localMinikubeIsLatest(ctx context.Context, minikubePath string, obj *storage.ObjectHandle) bool {
log.Print("checking if local minikube is latest...")
attrs, err := obj.Attrs(ctx)
if err != nil {
log.Printf("error getting %s object attrs: %v", obj.ObjectName(), err)
return false
}
gcsMinikubeVersion, ok := attrs.Metadata["commit"]
if !ok {
log.Printf("there is no commit: %v", attrs.Metadata)
return false
}
currentMinikubeVersion, err := exec.Command(minikubePath, "version", "--output=json").Output()
if err != nil {
log.Printf("error running [%s version]: %v", minikubePath, err)
return false
}
return strings.Contains(string(currentMinikubeVersion), gcsMinikubeVersion)
}
func binary() string {
b := fmt.Sprintf("minikube-%s-amd64", runtime.GOOS)
if runtime.GOOS == "windows" {
b += ".exe"
}
return b
}

View File

@ -221,7 +221,7 @@ func GHReleases(ctx context.Context, owner, repo string) (stable, latest string,
return "", "", err
}
for _, rl := range rls {
ver := rl.GetName()
ver := rl.GetTagName()
if !semver.IsValid(ver) {
continue
}

View File

@ -0,0 +1,108 @@
/*
Copyright 2020 The Kubernetes Authors All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
/*
Script expects the following env variables:
- UPDATE_TARGET=<string>: optional - if unset/absent, default option is "fs"; valid options are:
- "fs" - update only local filesystem repo files [default]
- "gh" - update only remote GitHub repo files and create PR (if one does not exist already)
- "all" - update local and remote repo files and create PR (if one does not exist already)
- GITHUB_TOKEN=<string>: GitHub [personal] access token
- note: GITHUB_TOKEN is required if UPDATE_TARGET is "gh" or "all"
*/
package main
import (
"context"
"time"
"golang.org/x/mod/semver"
"k8s.io/klog/v2"
"k8s.io/minikube/hack/update"
)
const (
// default context timeout
cxTimeout = 300 * time.Second
)
var (
schema = map[string]update.Item{
".github/workflows/iso.yml": {
Replace: map[string]string{
`(?U)https://github.com/medyagh/gopogh/releases/download/.*/gopogh`: `https://github.com/medyagh/gopogh/releases/download/{{.StableVersion}}/gopogh`,
},
},
".github/workflows/kic_image.yml": {
Replace: map[string]string{
`(?U)https://github.com/medyagh/gopogh/releases/download/.*/gopogh`: `https://github.com/medyagh/gopogh/releases/download/{{.StableVersion}}/gopogh`,
},
},
".github/workflows/master.yml": {
Replace: map[string]string{
`(?U)https://github.com/medyagh/gopogh/releases/download/.*/gopogh`: `https://github.com/medyagh/gopogh/releases/download/{{.StableVersion}}/gopogh`,
},
},
".github/workflows/pr.yml": {
Replace: map[string]string{
`(?U)https://github.com/medyagh/gopogh/releases/download/.*/gopogh`: `https://github.com/medyagh/gopogh/releases/download/{{.StableVersion}}/gopogh`,
},
},
"hack/jenkins/common.sh": {
Replace: map[string]string{
`(?U)https://github.com/medyagh/gopogh/releases/download/.*/gopogh`: `https://github.com/medyagh/gopogh/releases/download/{{.StableVersion}}/gopogh`,
},
},
}
// PR data
prBranchPrefix = "update-gopogh-version_" // will be appended with first 7 characters of the PR commit SHA
prTitle = `update_gopogh_version: {stable: "{{.StableVersion}}"}`
prIssue = 9850
)
// Data holds stable gopogh version in semver format.
type Data struct {
StableVersion string `json:"stableVersion"`
}
func main() {
// set a context with defined timeout
ctx, cancel := context.WithTimeout(context.Background(), cxTimeout)
defer cancel()
// get gopogh stable version from https://github.com/medyagh/gopogh
stable, err := gopoghVersion(ctx, "medyagh", "gopogh")
if err != nil || stable == "" {
klog.Fatalf("Unable to get gopogh stable version: %v", err)
}
data := Data{StableVersion: stable}
klog.Infof("gopogh stable version: %s", data.StableVersion)
update.Apply(ctx, schema, data, prBranchPrefix, prTitle, prIssue)
}
// gopoghVersion returns gopogh stable version in semver format.
func gopoghVersion(ctx context.Context, owner, repo string) (stable string, err error) {
// get Kubernetes versions from GitHub Releases
stable, _, err = update.GHReleases(ctx, owner, repo)
if err != nil || !semver.IsValid(stable) {
return "", err
}
return stable, nil
}

View File

@ -88,8 +88,7 @@ func (i *Item) apply(data interface{}) error {
if i.Content == nil {
return fmt.Errorf("unable to update content: nothing to update")
}
org := string(i.Content)
str := org
str := string(i.Content)
for src, dst := range i.Replace {
out, err := ParseTmpl(dst, data, "")
if err != nil {

View File

@ -320,7 +320,7 @@ func (d *Driver) Remove() error {
return fmt.Errorf("expected no container ID be found for %q after delete. but got %q", d.MachineName, id)
}
if err := oci.RemoveNetwork(d.NodeConfig.ClusterName); err != nil {
if err := oci.RemoveNetwork(d.OCIBinary, d.NodeConfig.ClusterName); err != nil {
klog.Warningf("failed to remove network (which might be okay) %s: %v", d.NodeConfig.ClusterName, err)
}
return nil

View File

@ -85,14 +85,15 @@ func LogContainerDebug(ociBin string, name string) string {
} else {
klog.Infof("postmortem docker info: %+v", di)
}
logDockerNetworkInspect(name)
logDockerNetworkInspect(ociBin, name)
} else {
pi, err := podmanSystemInfo()
if err != nil {
klog.Warningf("couldn't get postmortem info, failed to to run podman info: %v", err)
klog.Warningf("couldn't get postmortem podman info: %v", err)
} else {
klog.Infof("postmortem podman info: %+v", pi)
}
logDockerNetworkInspect(ociBin, name)
}
if rr.Stdout.Len() == 0 {

View File

@ -35,7 +35,7 @@ import (
func RoutableHostIPFromInside(ociBin string, clusterName string, containerName string) (net.IP, error) {
if ociBin == Docker {
if runtime.GOOS == "linux" {
info, err := dockerNetworkInspect(clusterName)
info, err := containerNetworkInspect(ociBin, clusterName)
if err != nil {
if errors.Is(err, ErrNetworkNotFound) {
klog.Infof("The container %s is not attached to a network, this could be because the cluster was created by minikube <v1.14, will try to get the IP using container gatway", containerName)
@ -51,7 +51,7 @@ func RoutableHostIPFromInside(ociBin string, clusterName string, containerName s
}
// podman
if runtime.GOOS == "linux" {
return containerGatewayIP(Podman, containerName)
return containerGatewayIP(ociBin, containerName)
}
return nil, fmt.Errorf("RoutableHostIPFromInside is currently only implemented for linux")
@ -128,14 +128,14 @@ func ForwardedPort(ociBin string, ociID string, contPort int) (int, error) {
// ContainerIPs returns ipv4,ipv6, error of a container by their name
func ContainerIPs(ociBin string, name string) (string, string, error) {
if ociBin == Podman {
return podmanContainerIP(name)
return podmanContainerIP(ociBin, name)
}
return dockerContainerIP(name)
return dockerContainerIP(ociBin, name)
}
// podmanContainerIP returns ipv4, ipv6 of container or error
func podmanContainerIP(name string) (string, string, error) {
rr, err := runCmd(exec.Command(Podman, "container", "inspect",
func podmanContainerIP(ociBin string, name string) (string, string, error) {
rr, err := runCmd(exec.Command(ociBin, "container", "inspect",
"-f", "{{.NetworkSettings.IPAddress}}",
name))
if err != nil {
@ -143,15 +143,20 @@ func podmanContainerIP(name string) (string, string, error) {
}
output := strings.TrimSpace(rr.Stdout.String())
if err == nil && output == "" { // podman returns empty for 127.0.0.1
// check network, if the ip address is missing
ipv4, ipv6, err := dockerContainerIP(ociBin, name)
if err == nil {
return ipv4, ipv6, nil
}
return DefaultBindIPV4, "", nil
}
return output, "", nil
}
// dockerContainerIP returns ipv4, ipv6 of container or error
func dockerContainerIP(name string) (string, string, error) {
func dockerContainerIP(ociBin string, name string) (string, string, error) {
// retrieve the IP address of the node using docker inspect
lines, err := inspect(Docker, name, "{{range .NetworkSettings.Networks}}{{.IPAddress}},{{.GlobalIPv6Address}}{{end}}")
lines, err := inspect(ociBin, name, "{{range .NetworkSettings.Networks}}{{.IPAddress}},{{.GlobalIPv6Address}}{{end}}")
if err != nil {
return "", "", errors.Wrap(err, "inspecting NetworkSettings.Networks")
}

View File

@ -37,20 +37,17 @@ const firstSubnetAddr = "192.168.49.0"
// big enough for a cluster of 254 nodes
const defaultSubnetMask = 24
// name of the default Docker bridge network, used to lookup the MTU (see #9528)
const dockerDefaultBridge = "bridge"
// name of the default bridge network, used to lookup the MTU (see #9528)
const defaultBridgeName = "bridge"
// CreateNetwork creates a network returns gateway and error, minikube creates one network per cluster
func CreateNetwork(ociBin string, name string) (net.IP, error) {
if ociBin != Docker {
return nil, fmt.Errorf("%s network not implemented yet", ociBin)
}
return createDockerNetwork(name)
return createDockerNetwork(ociBin, name)
}
func createDockerNetwork(clusterName string) (net.IP, error) {
func createDockerNetwork(ociBin string, clusterName string) (net.IP, error) {
// check if the network already exists
info, err := dockerNetworkInspect(clusterName)
info, err := containerNetworkInspect(ociBin, clusterName)
if err == nil {
klog.Infof("Found existing network %+v", info)
return info.gateway, nil
@ -58,16 +55,16 @@ func createDockerNetwork(clusterName string) (net.IP, error) {
// will try to get MTU from the docker network to avoid issue with systems with exotic MTU settings.
// related issue #9528
info, err = dockerNetworkInspect(dockerDefaultBridge)
info, err = containerNetworkInspect(ociBin, defaultBridgeName)
if err != nil {
klog.Warningf("failed to get mtu information from the docker's default network %q: %v", dockerDefaultBridge, err)
klog.Warningf("failed to get mtu information from the %s's default network %q: %v", ociBin, defaultBridgeName, err)
}
attempts := 0
subnetAddr := firstSubnetAddr
// Rather than iterate through all of the valid subnets, give up at 20 to avoid a lengthy user delay for something that is unlikely to work.
// will be like 192.168.49.0/24 ,...,192.168.239.0/24
for attempts < 20 {
info.gateway, err = tryCreateDockerNetwork(subnetAddr, defaultSubnetMask, info.mtu, clusterName)
info.gateway, err = tryCreateDockerNetwork(ociBin, subnetAddr, defaultSubnetMask, info.mtu, clusterName)
if err == nil {
return info.gateway, nil
}
@ -90,7 +87,7 @@ func createDockerNetwork(clusterName string) (net.IP, error) {
return info.gateway, fmt.Errorf("failed to create network after 20 attempts")
}
func tryCreateDockerNetwork(subnetAddr string, subnetMask int, mtu int, name string) (net.IP, error) {
func tryCreateDockerNetwork(ociBin string, subnetAddr string, subnetMask int, mtu int, name string) (net.IP, error) {
gateway := net.ParseIP(subnetAddr)
gateway.To4()[3]++ // first ip for gateway
klog.Infof("attempt to create network %s/%d with subnet: %s and gateway %s and MTU of %d ...", subnetAddr, subnetMask, name, gateway, mtu)
@ -100,12 +97,13 @@ func tryCreateDockerNetwork(subnetAddr string, subnetMask int, mtu int, name str
"--driver=bridge",
fmt.Sprintf("--subnet=%s", fmt.Sprintf("%s/%d", subnetAddr, subnetMask)),
fmt.Sprintf("--gateway=%s", gateway),
// options documentation https://docs.docker.com/engine/reference/commandline/network_create/#bridge-driver-options
"-o", "--ip-masq",
"-o", "--icc",
fmt.Sprintf("--label=%s=%s", CreatedByLabelKey, "true"),
name,
}
if ociBin == Docker {
// options documentation https://docs.docker.com/engine/reference/commandline/network_create/#bridge-driver-options
args = append(args, "-o")
args = append(args, "--ip-masq")
args = append(args, "-o")
args = append(args, "--icc")
// adding MTU option because #9528
if mtu > 0 {
@ -113,7 +111,11 @@ func tryCreateDockerNetwork(subnetAddr string, subnetMask int, mtu int, name str
args = append(args, fmt.Sprintf("com.docker.network.driver.mtu=%d", mtu))
}
rr, err := runCmd(exec.Command(Docker, args...))
args = append(args, fmt.Sprintf("--label=%s=%s", CreatedByLabelKey, "true"))
}
args = append(args, name)
rr, err := runCmd(exec.Command(ociBin, args...))
if err != nil {
// Pool overlaps with other one on this address space
if strings.Contains(rr.Output(), "Pool overlaps") {
@ -135,6 +137,16 @@ type netInfo struct {
mtu int
}
func containerNetworkInspect(ociBin string, name string) (netInfo, error) {
if ociBin == Docker {
return dockerNetworkInspect(name)
}
if ociBin == Podman {
return podmanNetworkInspect(name)
}
return netInfo{}, fmt.Errorf("%s unknown", ociBin)
}
// networkInspect is only used to unmarshal the docker network inspect output and translate it to netInfo
type networkInspect struct {
Name string
@ -153,7 +165,7 @@ func dockerNetworkInspect(name string) (netInfo, error) {
cmd := exec.Command(Docker, "network", "inspect", name, "--format", `{"Name": "{{.Name}}","Driver": "{{.Driver}}","Subnet": "{{range .IPAM.Config}}{{.Subnet}}{{end}}","Gateway": "{{range .IPAM.Config}}{{.Gateway}}{{end}}","MTU": {{(index .Options "com.docker.network.driver.mtu")}},{{$first := true}} "ContainerIPs": [{{range $k,$v := .Containers }}{{if $first}}{{$first = false}}{{else}}, {{end}}"{{$v.IPv4Address}}"{{end}}]}`)
rr, err := runCmd(cmd)
if err != nil {
logDockerNetworkInspect(name)
logDockerNetworkInspect(Docker, name)
if strings.Contains(rr.Output(), "No such network") {
return info, ErrNetworkNotFound
@ -177,8 +189,39 @@ func dockerNetworkInspect(name string) (netInfo, error) {
return info, nil
}
func logDockerNetworkInspect(name string) {
cmd := exec.Command(Docker, "network", "inspect", name)
func podmanNetworkInspect(name string) (netInfo, error) {
var info = netInfo{name: name}
cmd := exec.Command(Podman, "network", "inspect", name, "--format", `{{(index .IPAM.Config 0).Subnet}},{{(index .IPAM.Config 0).Gateway}}`)
rr, err := runCmd(cmd)
if err != nil {
logDockerNetworkInspect(Podman, name)
if strings.Contains(rr.Output(), "No such network") {
return info, ErrNetworkNotFound
}
return info, err
}
// results looks like 172.17.0.0/16,172.17.0.1,1500
vals := strings.Split(strings.TrimSpace(rr.Stdout.String()), ",")
if len(vals) == 0 {
return info, fmt.Errorf("empty list network inspect: %q", rr.Output())
}
if len(vals) > 0 {
info.gateway = net.ParseIP(vals[1])
}
_, info.subnet, err = net.ParseCIDR(vals[0])
if err != nil {
return info, errors.Wrapf(err, "parse subnet for %s", name)
}
return info, nil
}
func logDockerNetworkInspect(ociBin string, name string) {
cmd := exec.Command(ociBin, "network", "inspect", name)
klog.Infof("running %v to gather additional debugging logs...", cmd.Args)
rr, err := runCmd(cmd)
if err != nil {
@ -188,11 +231,11 @@ func logDockerNetworkInspect(name string) {
}
// RemoveNetwork removes a network
func RemoveNetwork(name string) error {
if !networkExists(name) {
func RemoveNetwork(ociBin string, name string) error {
if !networkExists(ociBin, name) {
return nil
}
rr, err := runCmd(exec.Command(Docker, "network", "remove", name))
rr, err := runCmd(exec.Command(ociBin, "network", "rm", name))
if err != nil {
if strings.Contains(rr.Output(), "No such network") {
return ErrNetworkNotFound
@ -206,8 +249,8 @@ func RemoveNetwork(name string) error {
return err
}
func networkExists(name string) bool {
_, err := dockerNetworkInspect(name)
func networkExists(ociBin string, name string) bool {
_, err := containerNetworkInspect(ociBin, name)
if err != nil && !errors.Is(err, ErrNetworkNotFound) { // log unexpected error
klog.Warningf("Error inspecting docker network %s: %v", name, err)
}
@ -216,12 +259,8 @@ func networkExists(name string) bool {
// networkNamesByLabel returns all network names created by a label
func networkNamesByLabel(ociBin string, label string) ([]string, error) {
if ociBin != Docker {
return nil, fmt.Errorf("%s not supported", ociBin)
}
// docker network ls --filter='label=created_by.minikube.sigs.k8s.io=true' --format '{{.Name}}'
rr, err := runCmd(exec.Command(Docker, "network", "ls", fmt.Sprintf("--filter=label=%s", label), "--format", "{{.Name}}"))
rr, err := runCmd(exec.Command(ociBin, "network", "ls", fmt.Sprintf("--filter=label=%s", label), "--format", "{{.Name}}"))
if err != nil {
return nil, err
}
@ -235,14 +274,14 @@ func networkNamesByLabel(ociBin string, label string) ([]string, error) {
}
// DeleteKICNetworks deletes all networks created by kic
func DeleteKICNetworks() []error {
func DeleteKICNetworks(ociBin string) []error {
var errs []error
ns, err := networkNamesByLabel(Docker, CreatedByLabelKey+"=true")
ns, err := networkNamesByLabel(ociBin, CreatedByLabelKey)
if err != nil {
return []error{errors.Wrap(err, "list all volume")}
}
for _, n := range ns {
err := RemoveNetwork(n)
err := RemoveNetwork(ociBin, n)
if err != nil {
errs = append(errs, err)
}

View File

@ -146,6 +146,12 @@ func CreateContainerNode(p CreateParams) error {
// label th enode wuth the node ID
"--label", p.NodeLabel,
}
// to provide a static IP
if p.Network != "" && p.IP != "" {
runArgs = append(runArgs, "--network", p.Network)
runArgs = append(runArgs, "--ip", p.IP)
}
memcgSwap := true
if runtime.GOOS == "linux" {
if _, err := os.Stat("/sys/fs/cgroup/memory/memsw.limit_in_bytes"); os.IsNotExist(err) {
@ -170,11 +176,6 @@ func CreateContainerNode(p CreateParams) error {
virtualization = "podman" // VIRTUALIZATION_PODMAN
}
if p.OCIBinary == Docker {
// to provide a static IP for docker
if p.Network != "" && p.IP != "" {
runArgs = append(runArgs, "--network", p.Network)
runArgs = append(runArgs, "--ip", p.IP)
}
runArgs = append(runArgs, "--volume", fmt.Sprintf("%s:/var", p.Name))
// ignore apparmore github actions docker: https://github.com/kubernetes/minikube/issues/7624
runArgs = append(runArgs, "--security-opt", "apparmor=unconfined")

View File

@ -24,9 +24,9 @@ import (
const (
// Version is the current version of kic
Version = "v0.0.15-snapshot"
Version = "v0.0.15-snapshot2"
// SHA of the kic base image
baseImageSHA = "8aba7f18c2de2d5fa32da5a03653814482682311fa35f146b01d8c569fb73dc5"
baseImageSHA = "0973e4bcdfef0dc8c5a581ecfcca5e36fa6a1cc8773e832ecfd31de3d2b6bf46"
)
var (

View File

@ -17,19 +17,16 @@ limitations under the License.
package generate
import (
"bufio"
"bytes"
"fmt"
"io"
"io/ioutil"
"os"
"path/filepath"
"strings"
"time"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"github.com/spf13/cobra/doc"
"k8s.io/klog/v2"
"k8s.io/minikube/pkg/minikube/out"
)
@ -65,49 +62,71 @@ func DocForCommand(command *cobra.Command) (string, error) {
if err := writeSubcommands(command, buf); err != nil {
return "", errors.Wrap(err, "writing subcommands")
}
return removeHelpText(buf), nil
return buf.String(), nil
}
// after every command, cobra automatically appends
// ### SEE ALSO
// GenMarkdown creates markdown output.
func GenMarkdown(cmd *cobra.Command, w io.Writer) error {
return GenMarkdownCustom(cmd, w, func(s string) string { return s })
}
// * [minikube addons](minikube_addons.md) - Modify minikube's Kubernetes addons
// GenMarkdownCustom creates custom markdown output.
func GenMarkdownCustom(cmd *cobra.Command, w io.Writer, linkHandler func(string) string) error {
cmd.InitDefaultHelpCmd()
cmd.InitDefaultHelpFlag()
// ###### Auto generated by spf13/cobra on 1-Apr-2020
// help text which is unnecessary info after every subcommand
// This function removes that text.
func removeHelpText(buffer *bytes.Buffer) string {
beginningHelpText := "### SEE ALSO"
endHelpText := "###### Auto generated by spf13/cobra"
scanner := bufio.NewScanner(buffer)
includeLine := true
buf := new(bytes.Buffer)
name := cmd.CommandPath()
final := bytes.NewBuffer([]byte{})
for scanner.Scan() {
line := scanner.Text()
if strings.Contains(line, beginningHelpText) {
includeLine = false
continue
short := cmd.Short
long := cmd.Long
if len(long) == 0 {
long = short
}
if strings.Contains(line, endHelpText) {
includeLine = true
continue
buf.WriteString("## " + name + "\n\n")
buf.WriteString(short + "\n\n")
buf.WriteString("### Synopsis\n\n")
buf.WriteString(long + "\n\n")
if cmd.Runnable() {
buf.WriteString(fmt.Sprintf("```shell\n%s\n```\n\n", cmd.UseLine()))
}
if !includeLine {
continue
if len(cmd.Example) > 0 {
buf.WriteString("### Examples\n\n")
buf.WriteString(fmt.Sprintf("```\n%s\n```\n\n", cmd.Example))
}
// scanner strips the ending newline
if _, err := final.WriteString(line + "\n"); err != nil {
klog.Warningf("error removing help text: %v", err)
break
if err := printOptions(buf, cmd); err != nil {
return err
}
_, err := buf.WriteTo(w)
return err
}
return final.String()
func printOptions(buf *bytes.Buffer, cmd *cobra.Command) error {
flags := cmd.NonInheritedFlags()
flags.SetOutput(buf)
if flags.HasAvailableFlags() {
buf.WriteString("### Options\n\n```\n")
flags.PrintDefaults()
buf.WriteString("```\n\n")
}
parentFlags := cmd.InheritedFlags()
parentFlags.SetOutput(buf)
if parentFlags.HasAvailableFlags() {
buf.WriteString("### Options inherited from parent commands\n\n```\n")
parentFlags.PrintDefaults()
buf.WriteString("```\n\n")
}
return nil
}
// writeSubcommands recursively appends all subcommands to the doc
func writeSubcommands(command *cobra.Command, w io.Writer) error {
if err := doc.GenMarkdown(command, w); err != nil {
if err := GenMarkdown(command, w); err != nil {
return errors.Wrapf(err, "getting markdown custom")
}
if !command.HasSubCommands() {

View File

@ -489,6 +489,7 @@ func GenerateTemplateData(cfg config.KubernetesConfig) interface{} {
ImageRepository string
LoadBalancerStartIP string
LoadBalancerEndIP string
CustomIngressCert string
StorageProvisionerVersion string
}{
Arch: a,
@ -496,6 +497,7 @@ func GenerateTemplateData(cfg config.KubernetesConfig) interface{} {
ImageRepository: cfg.ImageRepository,
LoadBalancerStartIP: cfg.LoadBalancerStartIP,
LoadBalancerEndIP: cfg.LoadBalancerEndIP,
CustomIngressCert: cfg.CustomIngressCert,
StorageProvisionerVersion: version.GetStorageProvisionerVersion(),
}

View File

@ -29,7 +29,7 @@ import (
// Pause returns the image name to pull for a given Kubernetes version
func Pause(v semver.Version, mirror string) string {
// Should match `PauseVersion` in:
// https://github.com/kubernetes/kubernetes/blob/master/cmd/kubeadm/app/constants/constants.go
// https://github.com/kubernetes/kubernetes/blob/master/cmd/kubeadm/app/constants/constants_unix.go
pv := "3.2"
if semver.MustParseRange("<1.18.0-alpha.0")(v) {
pv = "3.1"
@ -37,7 +37,7 @@ func Pause(v semver.Version, mirror string) string {
return path.Join(kubernetesRepo(mirror), "pause"+archTag(false)+pv)
}
// essentials returns images needed too bootstrap a kubenretes
// essentials returns images needed too bootstrap a Kubernetes
func essentials(mirror string, v semver.Version) []string {
imgs := []string{
componentImage("kube-proxy", v, mirror),

View File

@ -24,7 +24,7 @@ import (
func TestAuxiliary(t *testing.T) {
want := []string{
"gcr.io/k8s-minikube/storage-provisioner:v3",
"gcr.io/k8s-minikube/storage-provisioner:v4",
"docker.io/kubernetesui/dashboard:v2.0.3",
"docker.io/kubernetesui/metrics-scraper:v1.0.4",
}
@ -36,7 +36,7 @@ func TestAuxiliary(t *testing.T) {
func TestAuxiliaryMirror(t *testing.T) {
want := []string{
"test.mirror/storage-provisioner:v3",
"test.mirror/storage-provisioner:v4",
"test.mirror/dashboard:v2.0.3",
"test.mirror/metrics-scraper:v1.0.4",
}

View File

@ -37,7 +37,7 @@ 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",
"gcr.io/k8s-minikube/storage-provisioner:v3",
"gcr.io/k8s-minikube/storage-provisioner:v4",
"docker.io/kubernetesui/dashboard:v2.0.3",
"docker.io/kubernetesui/metrics-scraper:v1.0.4",
}},
@ -49,7 +49,7 @@ 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/storage-provisioner:v3",
"mirror.k8s.io/storage-provisioner:v4",
"mirror.k8s.io/dashboard:v2.0.3",
"mirror.k8s.io/metrics-scraper:v1.0.4",
}},
@ -61,7 +61,7 @@ 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",
"gcr.io/k8s-minikube/storage-provisioner:v3",
"gcr.io/k8s-minikube/storage-provisioner:v4",
"docker.io/kubernetesui/dashboard:v2.0.3",
"docker.io/kubernetesui/metrics-scraper:v1.0.4",
}},
@ -73,7 +73,7 @@ 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",
"gcr.io/k8s-minikube/storage-provisioner:v3",
"gcr.io/k8s-minikube/storage-provisioner:v4",
"docker.io/kubernetesui/dashboard:v2.0.3",
"docker.io/kubernetesui/metrics-scraper:v1.0.4",
}},
@ -85,7 +85,7 @@ 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",
"gcr.io/k8s-minikube/storage-provisioner:v3",
"gcr.io/k8s-minikube/storage-provisioner:v4",
"docker.io/kubernetesui/dashboard:v2.0.3",
"docker.io/kubernetesui/metrics-scraper:v1.0.4",
}},
@ -97,7 +97,7 @@ 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",
"gcr.io/k8s-minikube/storage-provisioner:v3",
"gcr.io/k8s-minikube/storage-provisioner:v4",
"docker.io/kubernetesui/dashboard:v2.0.3",
"docker.io/kubernetesui/metrics-scraper:v1.0.4",
}},

View File

@ -92,6 +92,7 @@ type KubernetesConfig struct {
ImageRepository string
LoadBalancerStartIP string // currently only used by MetalLB addon
LoadBalancerEndIP string // currently only used by MetalLB addon
CustomIngressCert string // used by Ingress addon
ExtraOptions ExtraOptionSlice
ShouldLoadCachedImages bool

View File

@ -27,7 +27,7 @@ func TestAddRepoTagToImageName(t *testing.T) {
}{
{"kubernetesui/dashboard:v2.0.3", "docker.io/kubernetesui/dashboard:v2.0.3"},
{"kubernetesui/metrics-scraper:v1.0.4", "docker.io/kubernetesui/metrics-scraper:v1.0.4"},
{"gcr.io/k8s-minikube/storage-provisioner:v3", "gcr.io/k8s-minikube/storage-provisioner:v3"},
{"gcr.io/k8s-minikube/storage-provisioner:v4", "gcr.io/k8s-minikube/storage-provisioner:v4"},
}
for _, tc := range tests {
t.Run(tc.imgName, func(t *testing.T) {

View File

@ -41,7 +41,7 @@ const (
// PreloadVersion is the current version of the preloaded tarball
//
// NOTE: You may need to bump this version up when upgrading auxiliary docker images
PreloadVersion = "v6"
PreloadVersion = "v7"
// PreloadBucket is the name of the GCS bucket where preloaded volume tarballs exist
PreloadBucket = "minikube-preloaded-volume-tarballs"
)

View File

@ -124,6 +124,7 @@ func beginDownloadKicBaseImage(g *errgroup.Group, cc *config.ClusterConfig, down
baseImg := cc.KicBaseImage
if baseImg == kic.BaseImage && len(cc.KubernetesConfig.ImageRepository) != 0 {
baseImg = strings.Replace(baseImg, "gcr.io/k8s-minikube", cc.KubernetesConfig.ImageRepository, 1)
cc.KicBaseImage = baseImg
}
var finalImg string
// If we end up using a fallback image, notify the user

View File

@ -21,6 +21,7 @@ import (
"fmt"
"k8s.io/klog/v2"
"k8s.io/minikube/pkg/trace"
)
const (
@ -117,6 +118,7 @@ func (r *Register) currentStep() string {
// SetStep sets the current step
func (r *Register) SetStep(s RegStep) {
defer trace.StartSpan(string(s))
if r.first == RegStep("") {
_, ok := r.steps[s]
if ok {
@ -124,6 +126,8 @@ func (r *Register) SetStep(s RegStep) {
} else {
klog.Errorf("unexpected first step: %q", r.first)
}
} else {
trace.EndSpan(string(r.current))
}
r.current = s

View File

@ -79,6 +79,9 @@ Requires= minikube-automount.service docker.socket
[Service]
Type=notify
Restart=on-failure
StartLimitBurst=3
StartLimitIntervalSec=60
`
if noPivot {
klog.Warning("Using fundamentally insecure --no-pivot option")

View File

@ -82,6 +82,9 @@ Requires=docker.socket
[Service]
Type=notify
Restart=on-failure
StartLimitBurst=3
StartLimitIntervalSec=60
`
if noPivot {
klog.Warning("Using fundamentally insecure --no-pivot option")

105
pkg/trace/gcp.go Normal file
View File

@ -0,0 +1,105 @@
/*
Copyright 2020 The Kubernetes Authors All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package trace
import (
"context"
"fmt"
"os"
"go.opentelemetry.io/otel/api/trace"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
"k8s.io/klog"
texporter "github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace"
"github.com/pkg/errors"
"go.opentelemetry.io/otel/api/global"
)
const (
// ProjectEnvVar is the name of the env variable that the user must pass in their GCP project ID through
ProjectEnvVar = "MINIKUBE_GCP_PROJECT_ID"
// this is the name of the parent span to help identify it
// in the Cloud Trace UI.
parentSpanName = "minikube start"
)
type gcpTracer struct {
projectID string
parentCtx context.Context
trace.Tracer
spans map[string]trace.Span
cleanup func()
}
// StartSpan starts a span for the next step of
// `minikube start` via the GCP tracer
func (t *gcpTracer) StartSpan(name string) {
_, span := t.Tracer.Start(t.parentCtx, name)
t.spans[name] = span
}
// EndSpan ends the most recent span, indicating
// that one step of `minikube start` has completed
func (t *gcpTracer) EndSpan(name string) {
span, ok := t.spans[name]
if !ok {
klog.Warningf("cannot end span %s as it was never started", name)
return
}
span.End()
}
func (t *gcpTracer) Cleanup() {
span, ok := t.spans[parentSpanName]
if ok {
span.End()
}
t.cleanup()
}
func initGCPTracer() (*gcpTracer, error) {
projectID := os.Getenv(ProjectEnvVar)
if projectID == "" {
return nil, fmt.Errorf("GCP tracer requires a valid GCP project id set via the %s env variable", ProjectEnvVar)
}
_, flush, err := texporter.InstallNewPipeline(
[]texporter.Option{
texporter.WithProjectID(projectID),
},
sdktrace.WithConfig(sdktrace.Config{
DefaultSampler: sdktrace.AlwaysSample(),
}),
)
if err != nil {
return nil, errors.Wrap(err, "installing pipeline")
}
t := global.Tracer(parentSpanName)
ctx, span := t.Start(context.Background(), parentSpanName)
return &gcpTracer{
projectID: projectID,
parentCtx: ctx,
cleanup: flush,
Tracer: t,
spans: map[string]trace.Span{
parentSpanName: span,
},
}, nil
}

78
pkg/trace/trace.go Normal file
View File

@ -0,0 +1,78 @@
/*
Copyright 2020 The Kubernetes Authors All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package trace
import (
"fmt"
"github.com/pkg/errors"
)
var (
tracer minikubeTracer
)
type minikubeTracer interface {
StartSpan(string)
EndSpan(string)
Cleanup()
}
// Initialize intializes the global tracer variable
func Initialize(t string) error {
tr, err := getTracer(t)
if err != nil {
return errors.Wrap(err, "getting tracer")
}
tracer = tr
return nil
}
func getTracer(t string) (minikubeTracer, error) {
switch t {
case "gcp":
return initGCPTracer()
case "":
return nil, nil
}
return nil, fmt.Errorf("%s is not a valid tracer, valid tracers include: [gcp]", t)
}
// StartSpan starts a span with the given name
func StartSpan(name string) {
if tracer == nil {
return
}
tracer.StartSpan(name)
}
// EndSpan ends a span with the given name
func EndSpan(name string) {
if tracer == nil {
return
}
tracer.EndSpan(name)
}
// Cleanup is responsible for trace related cleanup,
// such as flushing all data
func Cleanup() {
if tracer == nil {
return
}
tracer.Cleanup()
}

View File

@ -180,7 +180,7 @@ section.td-box--height-auto {
// Allow code tags to span most of a window length (default is 80%)
pre {
max-width: 99% !important;
font-family: 'Inconsolata', monospace !important;
font-family: 'SFMono-Regular', Menlo, Monaco, Consolas, 'liberation mono', 'courier new', monospace !important;
font-size: 13px !important;
}
@ -197,6 +197,17 @@ div.td-content {
padding: 0.5em !important;
margin-top: 1.25em;
margin-bottom: 1.25em;
background-color: $gray-100;
max-width: 99% !important;
pre {
background-color: inherit !important;
padding: 0 !important;
code {
font-family: inherit !important;
}
}
}
}
@ -214,3 +225,6 @@ div.td-content {
max-width: 460px;
}
div.code-toolbar > .toolbar {
top: -.3em !important;
}

View File

@ -92,6 +92,9 @@ github_subdir = "site"
# enabling local search https://www.docsy.dev/docs/adding-content/navigation/#configure-local-search-with-lunr
offlineSearch = true
# Enable syntax highlighting and copy buttons on code blocks with Prism
prism_syntax_highlighting = true
# User interface configuration
[params.ui]
# Enable to show the side bar menu in its compact state.

View File

@ -13,7 +13,7 @@ Enable or disable a minikube addon
addons modifies minikube addons files using subcommands like "minikube addons enable dashboard"
```
```shell
minikube addons SUBCOMMAND [flags]
```
@ -46,7 +46,7 @@ Configures the addon w/ADDON_NAME within minikube (example: minikube addons conf
Configures the addon w/ADDON_NAME within minikube (example: minikube addons configure registry-creds). For a list of available addons use: minikube addons list
```
```shell
minikube addons configure ADDON_NAME [flags]
```
@ -79,7 +79,7 @@ Disables the addon w/ADDON_NAME within minikube (example: minikube addons disabl
Disables the addon w/ADDON_NAME within minikube (example: minikube addons disable dashboard). For a list of available addons use: minikube addons list
```
```shell
minikube addons disable ADDON_NAME [flags]
```
@ -112,7 +112,7 @@ Enables the addon w/ADDON_NAME within minikube (example: minikube addons enable
Enables the addon w/ADDON_NAME within minikube (example: minikube addons enable dashboard). For a list of available addons use: minikube addons list
```
```shell
minikube addons enable ADDON_NAME [flags]
```
@ -146,7 +146,7 @@ Help about any command
Help provides help for any command in the application.
Simply type addons help [path to command] for full details.
```
```shell
minikube addons help [command] [flags]
```
@ -179,7 +179,7 @@ Lists all available minikube addons as well as their current statuses (enabled/d
Lists all available minikube addons as well as their current statuses (enabled/disabled)
```
```shell
minikube addons list [flags]
```
@ -218,7 +218,7 @@ Opens the addon w/ADDON_NAME within minikube (example: minikube addons open dash
Opens the addon w/ADDON_NAME within minikube (example: minikube addons open dashboard). For a list of available addons use: minikube addons list
```
```shell
minikube addons open ADDON_NAME [flags]
```

View File

@ -42,7 +42,7 @@ Add an image to local cache.
Add an image to local cache.
```
```shell
minikube cache add [flags]
```
@ -75,7 +75,7 @@ Delete an image from the local cache.
Delete an image from the local cache.
```
```shell
minikube cache delete [flags]
```
@ -109,7 +109,7 @@ Help about any command
Help provides help for any command in the application.
Simply type cache help [path to command] for full details.
```
```shell
minikube cache help [command] [flags]
```
@ -142,7 +142,7 @@ List all available images from the local cache.
List all available images from the local cache.
```
```shell
minikube cache list [flags]
```
@ -182,7 +182,7 @@ reload cached images.
reloads images previously added using the 'cache add' subcommand
```
```shell
minikube cache reload [flags]
```

View File

@ -34,7 +34,7 @@ Outputs minikube shell completion for the given shell (bash, zsh or fish)
Note for fish users: [2] please refer to this docs for more details https://fishshell.com/docs/current/#tab-completion
```
```shell
minikube completion SHELL [flags]
```

View File

@ -43,7 +43,7 @@ Configurable fields:
* embed-certs
* native-ssh
```
```shell
minikube config SUBCOMMAND [flags]
```
@ -79,7 +79,7 @@ Acceptable fields:
* driver
```
```shell
minikube config defaults PROPERTY_NAME [flags]
```
@ -118,7 +118,7 @@ Gets the value of PROPERTY_NAME from the minikube config file
Returns the value of PROPERTY_NAME from the minikube config file. Can be overwritten at runtime by flags or environmental variables.
```
```shell
minikube config get PROPERTY_NAME [flags]
```
@ -152,7 +152,7 @@ Help about any command
Help provides help for any command in the application.
Simply type config help [path to command] for full details.
```
```shell
minikube config help [command] [flags]
```
@ -186,7 +186,7 @@ Sets an individual value in a minikube config file
Sets the PROPERTY_NAME config value to PROPERTY_VALUE
These values can be overwritten by flags or environment variables at runtime.
```
```shell
minikube config set PROPERTY_NAME PROPERTY_VALUE [flags]
```
@ -219,7 +219,7 @@ unsets an individual value in a minikube config file
unsets PROPERTY_NAME from the minikube config file. Can be overwritten by flags or environmental variables
```
```shell
minikube config unset PROPERTY_NAME [flags]
```
@ -252,7 +252,7 @@ Display values currently set in the minikube config file
Display values currently set in the minikube config file.
```
```shell
minikube config view [flags]
```

View File

@ -13,7 +13,7 @@ Access the Kubernetes dashboard running within the minikube cluster
Access the Kubernetes dashboard running within the minikube cluster
```
```shell
minikube dashboard [flags]
```

View File

@ -14,7 +14,7 @@ Deletes a local Kubernetes cluster
Deletes a local Kubernetes cluster. This command deletes the VM, and removes all
associated files.
```
```shell
minikube delete [flags]
```

View File

@ -13,7 +13,7 @@ Configure environment to use minikube's Docker daemon
Sets up docker env variables; similar to '$(docker-machine env)'.
```
```shell
minikube docker-env [flags]
```

View File

@ -14,7 +14,7 @@ Help about any command
Help provides help for any command in the application.
Simply type minikube help [path to command] for full details.
```
```shell
minikube help [command] [flags]
```

View File

@ -13,7 +13,7 @@ Retrieves the IP address of the running cluster
Retrieves the IP address of the running cluster, and writes it to STDOUT.
```
```shell
minikube ip [flags]
```

View File

@ -17,7 +17,7 @@ Examples:
minikube kubectl -- --help
minikube kubectl -- get pods --namespace kube-system
```
```shell
minikube kubectl [flags]
```

View File

@ -13,7 +13,7 @@ Returns logs to debug a local Kubernetes cluster
Gets the logs of the running instance, used for debugging minikube, not user code.
```
```shell
minikube logs [flags]
```

View File

@ -13,7 +13,7 @@ Mounts the specified directory into minikube
Mounts the specified directory into minikube.
```
```shell
minikube mount [flags] <source directory>:<target directory>
```

View File

@ -13,7 +13,7 @@ Add, remove, or list additional nodes
Operations on nodes
```
```shell
minikube node [flags]
```
@ -46,7 +46,7 @@ Adds a node to the given cluster.
Adds a node to the given cluster config, and starts it.
```
```shell
minikube node add [flags]
```
@ -87,7 +87,7 @@ Deletes a node from a cluster.
Deletes a node from a cluster.
```
```shell
minikube node delete [flags]
```
@ -121,7 +121,7 @@ Help about any command
Help provides help for any command in the application.
Simply type node help [path to command] for full details.
```
```shell
minikube node help [command] [flags]
```
@ -154,7 +154,7 @@ List nodes.
List existing minikube nodes.
```
```shell
minikube node list [flags]
```
@ -187,7 +187,7 @@ Starts a node.
Starts an existing stopped node in a cluster.
```
```shell
minikube node start [flags]
```
@ -226,7 +226,7 @@ Stops a node in a cluster.
Stops a node in a cluster.
```
```shell
minikube node stop [flags]
```

View File

@ -13,7 +13,7 @@ pause Kubernetes
pause Kubernetes
```
```shell
minikube pause [flags]
```

View File

@ -13,7 +13,7 @@ Configure environment to use minikube's Podman service
Sets up podman env variables; similar to '$(podman-machine env)'.
```
```shell
minikube podman-env [flags]
```

View File

@ -13,7 +13,7 @@ Get or list the current profiles (clusters)
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`
```
```shell
minikube profile [MINIKUBE_PROFILE_NAME]. You can return to the default minikube profile by running `minikube profile default` [flags]
```
@ -47,7 +47,7 @@ Help about any command
Help provides help for any command in the application.
Simply type profile help [path to command] for full details.
```
```shell
minikube profile help [command] [flags]
```
@ -80,7 +80,7 @@ Lists all minikube profiles.
Lists all valid minikube profiles and detects all possible invalid profiles.
```
```shell
minikube profile list [flags]
```

View File

@ -13,7 +13,7 @@ Returns a URL to connect to a service
Returns the Kubernetes URL for a service in your local cluster. In the case of multiple URLs they will be printed one at a time.
```
```shell
minikube service [flags] SERVICE
```
@ -58,7 +58,7 @@ Help about any command
Help provides help for any command in the application.
Simply type service help [path to command] for full details.
```
```shell
minikube service help [command] [flags]
```
@ -92,7 +92,7 @@ Lists the URLs for the services in your local cluster
Lists the URLs for the services in your local cluster
```
```shell
minikube service list [flags]
```

View File

@ -13,7 +13,7 @@ Retrieve the ssh identity key path of the specified cluster
Retrieve the ssh identity key path of the specified cluster.
```
```shell
minikube ssh-key [flags]
```

View File

@ -13,7 +13,7 @@ Log into the minikube environment (for debugging)
Log into or run a command on a machine with SSH; similar to 'docker-machine ssh'.
```
```shell
minikube ssh [flags]
```

View File

@ -13,7 +13,7 @@ Starts a local Kubernetes cluster
Starts a local Kubernetes cluster
```
```shell
minikube start [flags]
```
@ -26,7 +26,7 @@ minikube start [flags]
--apiserver-names strings A set of apiserver names which are used in the generated certificate for kubernetes. This can be used if you want to make the apiserver available from outside the machine
--apiserver-port int The apiserver listening port (default 8443)
--auto-update-drivers If set, automatically updates drivers to the latest version. Defaults to true. (default true)
--base-image string The base image to use for docker/podman drivers. Intended for local development. (default "gcr.io/k8s-minikube/kicbase:v0.0.15-snapshot@sha256:8aba7f18c2de2d5fa32da5a03653814482682311fa35f146b01d8c569fb73dc5")
--base-image string The base image to use for docker/podman drivers. Intended for local development. (default "gcr.io/k8s-minikube/kicbase:v0.0.15-snapshot2@sha256:0973e4bcdfef0dc8c5a581ecfcca5e36fa6a1cc8773e832ecfd31de3d2b6bf46")
--cache-images If true, cache docker images for the current bootstrapper and load them into the machine. Always false with --driver=none. (default true)
--cni string CNI plug-in to use. Valid options: auto, bridge, calico, cilium, flannel, kindnet, or path to a CNI manifest (default: auto)
--container-runtime string The container runtime to be used (docker, cri-o, containerd). (default "docker")
@ -64,7 +64,7 @@ minikube start [flags]
--insecure-registry strings Insecure Docker registries to pass to the Docker daemon. The default service CIDR range will automatically be added.
--install-addons If set, install addons. Defaults to true. (default true)
--interactive Allow user prompts for more information (default true)
--iso-url strings Locations to fetch the minikube ISO from. (default [https://storage.googleapis.com/minikube/iso/minikube-v1.15.2-snapshot.iso,https://github.com/kubernetes/minikube/releases/download/v1.15.2-snapshot/minikube-v1.15.2-snapshot.iso,https://kubernetes.oss-cn-hangzhou.aliyuncs.com/minikube/iso/minikube-v1.15.2-snapshot.iso])
--iso-url strings Locations to fetch the minikube ISO from. (default [https://storage.googleapis.com/minikube/iso/minikube-v1.15.2-snapshot2.iso,https://github.com/kubernetes/minikube/releases/download/v1.15.2-snapshot2/minikube-v1.15.2-snapshot2.iso,https://kubernetes.oss-cn-hangzhou.aliyuncs.com/minikube/iso/minikube-v1.15.2-snapshot2.iso])
--keep-context This will keep the existing kubectl context and will create a minikube context.
--kubernetes-version string The Kubernetes version that the minikube VM will use (ex: v1.2.3, 'stable' for v1.19.4, 'latest' for v1.20.0-beta.1). Defaults to 'stable'.
--kvm-gpu Enable experimental NVIDIA GPU support in minikube
@ -87,6 +87,7 @@ minikube start [flags]
--preload If set, download tarball of preloaded images if available to improve start time. Defaults to true. (default true)
--registry-mirror strings Registry mirrors to pass to the Docker daemon
--service-cluster-ip-range string The CIDR to be used for service cluster IPs. (default "10.96.0.0/12")
--trace string Send trace events. Options include: [gcp]
--uuid string Provide VM UUID to restore MAC address (hyperkit driver only)
--vm Filter to use only VM Drivers
--vm-driver driver DEPRECATED, use driver instead.

View File

@ -15,7 +15,7 @@ Gets the status of a local Kubernetes cluster.
Exit status contains the status of minikube's VM, cluster and Kubernetes encoded on it's bits in this order from right to left.
Eg: 7 meaning: 1 (for minikube NOK) + 2 (for cluster NOK) + 4 (for Kubernetes NOK)
```
```shell
minikube status [flags]
```

View File

@ -13,7 +13,7 @@ Stops a running local Kubernetes cluster
Stops a local Kubernetes cluster. This command stops the underlying VM or container, but keeps user data intact. The cluster can be started again with the "start" command.
```
```shell
minikube stop [flags]
```
@ -21,6 +21,7 @@ minikube stop [flags]
```
--all Set flag to stop all profiles (clusters)
--cancel-scheduled cancel any existing scheduled stop requests
--keep-context-active keep the kube-context active after cluster is stopped. Defaults to false.
-o, --output string Format to print stdout in. Options include: [text,json] (default "text")
```

View File

@ -13,7 +13,7 @@ Connect to LoadBalancer services
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
```
```shell
minikube tunnel [flags]
```

View File

@ -13,7 +13,7 @@ unpause Kubernetes
unpause Kubernetes
```
```shell
minikube unpause [flags]
```

View File

@ -13,7 +13,7 @@ Print current and latest version number
Print current and latest version number
```
```shell
minikube update-check [flags]
```

View File

@ -14,7 +14,7 @@ Update kubeconfig in case of an IP or port change
Retrieves the IP address of the running cluster, checks it
with IP in kubeconfig, and corrects kubeconfig if incorrect.
```
```shell
minikube update-context [flags]
```

View File

@ -13,7 +13,7 @@ Print the version of minikube
Print the version of minikube.
```
```shell
minikube version [flags]
```

View File

@ -9,23 +9,33 @@ description: >
To create an addon, first fork the minikube repository, and check out your fork:
`git clone git@github.com:<username>/minikube.git`
```shell
git clone git@github.com:<username>/minikube.git
```
Then go into the source directory:
`cd minikube`
```shell
cd minikube
```
Create a subdirectory:
`mkdir deploy/addons/<addon name>`
```shell
mkdir deploy/addons/<addon name>
```
Add your manifest YAML's to the directory you have created:
`cp *.yaml deploy/addons/<addon name>`
```shell
cp *.yaml deploy/addons/<addon name>
```
Note: If the addon never needs authentication to GCP, then consider adding the following label to the pod's yaml:
`gcp-auth-skip-secret: "true"`
```yaml
gcp-auth-skip-secret: "true"
```
To make the addon appear in `minikube addons list`, add it to `pkg/addons/config.go`. Here is the entry used by the `registry` addon, which will work for any addon which does not require custom code:

View File

@ -22,7 +22,9 @@ Use Github's repositories and markdown editor as described by [Kubernetes's gene
To serve documentation pages locally, clone the `minikube` repository and run:
`make site`
```shell
make site
```
Notes :
@ -33,7 +35,9 @@ Notes :
We recommend installing [markdownlint](https://github.com/markdownlint/markdownlint) to find issues with your markdown file. Once installed, you can use this handy target:
`make mdlint`
```shell
make mdlint
```
## Style Guidelines

View File

@ -12,7 +12,7 @@ You may need to add logs to the registry if the `TestJSONOutput` integration tes
### Background
minikube provides JSON output for `minikube start`, accesible via the `--output` flag:
```
```shell
minikube start --output json
```
@ -61,7 +61,7 @@ You will need to add your new log in two places:
Finally, set your new step in the cod by placing this line before you call `out.T`:
```
```go
register.Reg.SetStep(register.MyNewStep)
```

View File

@ -30,4 +30,6 @@ The image is located at `gcr.io/k8s-minikube/gvisor-addon`
## Updating the gVisor image
`make push-gvisor-addon-image`
```shell
make push-gvisor-addon-image
```

View File

@ -10,15 +10,15 @@ aliases:
The vmware driver supports virtualization across all VMware based hypervisors.
{{% tabs %}}
{{% tab "macOS" %}}
{{% mactab %}}
{{% readfile file="/docs/drivers/includes/vmware_macos_usage.inc" %}}
{{% /tab %}}
{{% tab "Linux" %}}
{{% /mactab %}}
{{% linuxtab %}}
No documentation is available yet.
{{% /tab %}}
{{% tab "Windows" %}}
{{% /linuxtab %}}
{{% windowstab %}}
No documentation is available yet.
{{% /tab %}}
{{% /windowstab %}}
{{% /tabs %}}
## Issues

View File

@ -22,15 +22,18 @@ Alternatively, configure `sudo` to never prompt for the commands issued by minik
minikube's bootstrapper, [Kubeadm](https://github.com/kubernetes/kubeadm) verifies a list of features on the host system before installing Kubernetes. in case you get this error, and you still want to try minikube anyways despite your system's limitation you can skip the verification by starting minikube with this extra option:
`minikube start --extra-config kubeadm.ignore-preflight-errors=SystemVerification`
```shell
minikube start --extra-config kubeadm.ignore-preflight-errors=SystemVerification
```
## what is the resource allocation for Knative Setup using minikube?
Please allocate sufficient resources for Knative setup using minikube, especially when you run a minikube cluster on your local machine. We recommend allocating at least 6 CPUs and 8G memory.
`minikube start --cpus 6 --memory 8000`
```shell
minikube start --cpus 6 --memory 8000
```
## Do I need to install kubectl locally?
No, minikube comes with built-in kubectl [see minikube's kubectl documentation]({{< ref "docs/handbook/kubectl.md" >}}).

View File

@ -24,7 +24,9 @@ A NodePort service is the most basic way to get external traffic directly to you
We also have a shortcut for fetching the minikube IP and a service's `NodePort`:
`minikube service --url $SERVICE`
```shell
minikube service --url $SERVICE
```
## Getting the NodePort using kubectl
@ -32,13 +34,17 @@ The minikube VM is exposed to the host system via a host-only IP address, that c
To determine the NodePort for your service, you can use a `kubectl` command like this (note that `nodePort` begins with lowercase `n` in JSON output):
`kubectl get service $SERVICE --output='jsonpath="{.spec.ports[0].nodePort}"'`
```shell
kubectl get service $SERVICE --output='jsonpath="{.spec.ports[0].nodePort}"'
```
### Increasing the NodePort range
By default, minikube only exposes ports 30000-32767. If this does not work for you, you can adjust the range by using:
`minikube start --extra-config=apiserver.service-node-port-range=1-65535`
```shell
minikube start --extra-config=apiserver.service-node-port-range=1-65535
```
This flag also accepts a comma separated list of ports and port ranges.
@ -57,7 +63,7 @@ Services of type `LoadBalancer` can be exposed via the `minikube tunnel` command
#### Run tunnel in a separate terminal
it will ask for password.
```
```shell
minikube tunnel
```
@ -88,16 +94,16 @@ Status:
#### Create a kubernetes deployment
```
```shell
kubectl create deployment hello-minikube1 --image=k8s.gcr.io/echoserver:1.4
```
#### Create a kubernetes service type LoadBalancer
```
```shell
kubectl expose deployment hello-minikube1 --type=LoadBalancer --port=8080
```
### Check external IP
```
```shell
kubectl get svc
```
<pre>

View File

@ -8,8 +8,11 @@ date: 2020-07-15
If you have a containerized GCP app with a Kubernetes yaml, you can automatically add your credentials to all your deployed pods dynamically with this minikube addon. You just need to have a credentials file, which can be generated with `gcloud auth application-default login`. If you already have a json credentials file you want specify, use the GOOGLE_APPLICATION_CREDENTIALS environment variable.
- Start a cluster:
```
```shell
minikube start
```
```
😄 minikube v1.12.0 on Darwin 10.15.5
✨ Automatically selected the docker driver. Other choices: hyperkit, virtualbox
👍 Starting control plane node minikube in cluster minikube
@ -21,8 +24,11 @@ minikube start
```
- Enable the `gcp-auth` addon:
```
```shell
minikube addons enable gcp-auth
```
```
🔎 Verifying gcp-auth addon...
📌 Your GCP credentials will now be mounted into every pod created in the minikube cluster.
📌 If you don't want credential mounted into a specific pod, add a label with the `gcp-auth-skip-secret` key to your pod configuration.
@ -30,14 +36,17 @@ minikube addons enable gcp-auth
```
- For credentials in an arbitrary path:
```
```shell
export GOOGLE_APPLICATION_CREDENTIALS=<creds-path>.json
minikube addons enable gcp-auth
```
- Deploy your GCP app as normal:
```
```shell
kubectl apply -f test.yaml
```
```
deployment.apps/pytest created
```

View File

@ -49,7 +49,9 @@ This flag is repeated, so you can pass it several times with several different v
By default, minikube installs the latest stable version of Kubernetes that was available at the time of the minikube release. You may select a different Kubernetes release by using the `--kubernetes-version` flag, for example:
`minikube start --kubernetes-version=v1.11.10`
```shell
minikube start --kubernetes-version=v1.11.10
```
minikube follows the [Kubernetes Version and Version Skew Support Policy](https://kubernetes.io/docs/setup/version-skew-policy/), so we guarantee support for the latest build for the last 3 minor Kubernetes releases. When practical, minikube aims to support older releases as well so that users can emulate legacy environments.

View File

@ -10,40 +10,60 @@ aliases:
Start a cluster by running:
`minikube start`
```shell
minikube start
```
Access the Kubernetes Dashboard running within the minikube cluster:
`minikube dashboard`
```shell
minikube dashboard
```
Once started, you can interact with your cluster using `kubectl`, just like any other Kubernetes cluster. For instance, starting a server:
`kubectl create deployment hello-minikube --image=k8s.gcr.io/echoserver:1.4`
```shell
kubectl create deployment hello-minikube --image=k8s.gcr.io/echoserver:1.4
```
Exposing a service as a NodePort
`kubectl expose deployment hello-minikube --type=NodePort --port=8080`
```shell
kubectl expose deployment hello-minikube --type=NodePort --port=8080
```
minikube makes it easy to open this exposed endpoint in your browser:
`minikube service hello-minikube`
```shell
minikube service hello-minikube
```
Upgrade your cluster:
`minikube start --kubernetes-version=latest`
```shell
minikube start --kubernetes-version=latest
```
Start a second local cluster (_note: This will not work if minikube is using the bare-metal/none driver_):
`minikube start -p cluster2`
```shell
minikube start -p cluster2
```
Stop your local cluster:
`minikube stop`
```shell
minikube stop
```
Delete your local cluster:
`minikube delete`
```shell
minikube delete
```
Delete all local clusters and profiles
`minikube delete --all`
```shell
minikube delete --all
```

View File

@ -10,7 +10,7 @@ aliases:
## kubectl
```
```shell
kubectl create deployment hello-minikube1 --image=k8s.gcr.io/echoserver:1.4
kubectl expose deployment hello-minikube1 --type=LoadBalancer --port=8080
```

View File

@ -22,7 +22,7 @@ Place files to be synced in `$MINIKUBE_HOME/files`
For example, running the following will result in the deployment of a custom /etc/resolv.conf:
```
```shell
mkdir -p ~/.minikube/files/etc
echo nameserver 8.8.8.8 > ~/.minikube/files/etc/resolv.conf
minikube start

View File

@ -10,29 +10,45 @@ aliases:
By default, [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) gets configured to access the kubernetes cluster control plane
inside minikube when the `minikube start` command is executed.
However if `kubectl` is not installed locally, kubectl can be used inside the minikube
as well.
However if `kubectl` is not installed locally, minikube already includes kubectl which can be used like this:
`minikube kubectl -- <kubectl commands>`
```shell
minikube kubectl -- <kubectl commands>
```
You can also `alias kubectl="minikube kubectl --"` for easier usage.
Alternatively, you can create a symbolic link to minikube's binary named 'kubectl'.
`ln -s $(which minikube) /usr/local/bin/kubectl`
```shell
ln -s $(which minikube) /usr/local/bin/kubectl
```
Get pods
`minikube kubectl -- get pods`
```shell
minikube kubectl -- get pods
```
Creating a deployment inside kubernetes cluster
`minikube kubectl -- create deployment hello-minikube --image=k8s.gcr.io/echoserver:1.4`
```shell
minikube kubectl -- create deployment hello-minikube --image=k8s.gcr.io/echoserver:1.4
```
Exposing the deployment with a NodePort service
`minikube kubectl -- expose deployment hello-minikube --type=NodePort --port=8080`
```shell
minikube kubectl -- expose deployment hello-minikube --type=NodePort --port=8080
```
For more help
`minikube kubectl -- --help`
```shell
minikube kubectl -- --help
```
### Shell autocompletion
After applying the alias or the symbolic link you can follow https://kubernetes.io/docs/tasks/tools/install-kubectl/#enabling-shell-autocompletion to enable shell-autocompletion.
When using zsh and the alias approach you also have to execute `setopt complete_aliases`.

View File

@ -14,13 +14,13 @@ aliases:
To mount a directory from the host into the guest using the `mount` subcommand:
```
```shell
minikube mount <source directory>:<target directory>
```
For example, this would mount your home directory to appear as /host within the minikube VM:
```
```shell
minikube mount $HOME:/host
```

View File

@ -136,7 +136,7 @@ eval $(minikube podman-env)
You should now be able to use podman client on the command line on your host machine talking to the podman service inside the minikube VM:
{{% tabs %}}
{{% tab "Linux" %}}
{{% linuxtab %}}
```shell
podman-remote help
@ -146,8 +146,8 @@ podman-remote help
Note: On Linux the remote client is called "podman-remote", while the local program is called "podman".
{{% /pageinfo %}}
{{% /tab %}}
{{% tab "macOS" %}}
{{% /linuxtab %}}
{{% mactab %}}
```shell
podman help
@ -157,8 +157,8 @@ podman help
Note: On macOS the remote client is called "podman", since there is no local "podman" program available.
{{% /pageinfo %}}
{{% /tab %}}
{{% tab "Windows" %}}
{{% /mactab %}}
{{% windowstab %}}
```shell
podman help
@ -168,7 +168,7 @@ podman help
Note: On Windows the remote client is called "podman", since there is no local "podman" program available.
{{% /pageinfo %}}
{{% /tab %}}
{{% /windowstab %}}
{{% /tabs %}}

View File

@ -50,7 +50,7 @@ Quick guide for configuring minikube and docker on macOS, enabling docker to pus
The first step is to enable the registry addon:
```
```shell
minikube addons enable registry
```
@ -58,13 +58,13 @@ When enabled, the registry addon exposes its port 5000 on the minikube's virtual
In order to make docker accept pushing images to this registry, we have to redirect port 5000 on the docker virtual machine over to port 5000 on the minikube machine. We can (ab)use docker's network configuration to instantiate a container on the docker's host, and run socat there:
```
```shell
docker run --rm -it --network=host alpine ash -c "apk add socat && socat TCP-LISTEN:5000,reuseaddr,fork TCP:$(minikube ip):5000"
```
Once socat is running it's possible to push images to the minikube registry:
```
```shell
docker tag my/image localhost:5000/myimage
docker push localhost:5000/myimage
```
@ -77,7 +77,7 @@ Quick guide for configuring minikube and docker on Windows, enabling docker to p
The first step is to enable the registry addon:
```
```shell
minikube addons enable registry
```
@ -86,7 +86,7 @@ When enabled, the registry addon exposes its port 5000 on the minikube's virtual
In order to make docker accept pushing images to this registry, we have to redirect port 5000 on the docker virtual machine over to port 5000 on the minikube machine. Unfortunately, the docker vm cannot directly see the IP address of the minikube vm. To fix this, you will have to add one more level of redirection.
Use kubectl port-forward to map your local workstation to the minikube vm
```
```shell
kubectl port-forward --namespace kube-system <name of the registry vm> 5000:5000
```
@ -94,13 +94,13 @@ On your local machine you should now be able to reach the minikube registry by u
From this point we can (ab)use docker's network configuration to instantiate a container on the docker's host, and run socat there to redirect traffic going to the docker vm's port 5000 to port 5000 on your host workstation.
```
```shell
docker run --rm -it --network=host alpine ash -c "apk add socat && socat TCP-LISTEN:5000,reuseaddr,fork TCP:host.docker.internal:5000"
```
Once socat is running it's possible to push images to the minikube registry from your local workstation:
```
```shell
docker tag my/image localhost:5000/myimage
docker push localhost:5000/myimage
```

View File

@ -21,7 +21,9 @@ Example:
minikube stores post-mortem INFO logs in the temporary directory of your system. On macOS or Linux, it's easy to get a list of recent INFO logs:
`find $TMPDIR -mtime -1 -type f -name "*minikube*INFO*" -ls 2>/dev/null`
```shell
find $TMPDIR -mtime -1 -type f -name "*minikube*INFO*" -ls 2>/dev/null
```
For instance, this shows:
@ -29,7 +31,9 @@ For instance, this shows:
These are plain text log files: you may rename them to "<filename>.log" and then drag/drop them into a GitHub issue for further analysis by the minikube team. You can quickly inspect the final lines of any of these logs via:
`tail -n 10 <filename>`
```shell
tail -n 10 <filename>
```
for example, this shows:
@ -83,4 +87,3 @@ minikube logs --problems
```
This will attempt to surface known errors, such as invalid configuration flags. If nothing interesting shows up, try `minikube logs`.

View File

@ -17,7 +17,7 @@ You may install the Root Certificate into the minikube cluster to access these c
You will need a corporate X.509 Root Certificate in PEM format. If it's in DER format, convert it:
```
```shell
openssl x509 -inform der -in my_company.cer -out my_company.pem
```

View File

@ -22,7 +22,7 @@ All you need is Docker (or similarly compatible) container or a Virtual Machine
<h2 class="step"><span class="fa-stack fa-1x"><i class="fa fa-circle fa-stack-2x"></i><strong class="fa-stack-1x text-primary">1</strong></span>Installation</h2>
{{% tabs %}}
{{% tab "Linux" %}}
{{% linuxtab %}}
For Linux users, we provide 3 easy download options:
@ -47,8 +47,8 @@ curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-latest
sudo rpm -ivh minikube-latest.x86_64.rpm
```
{{% /tab %}}
{{% tab "macOS" %}}
{{% /linuxtab %}}
{{% mactab %}}
If the [Brew Package Manager](https://brew.sh/) installed:
@ -58,7 +58,7 @@ brew install minikube
If `which minikube` fails after installation via brew, you may have to remove the minikube cask and link the binary:
```
```shell
brew cask remove minikube
brew link minikube
```
@ -70,8 +70,8 @@ curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-darwin
sudo install minikube-darwin-amd64 /usr/local/bin/minikube
```
{{% /tab %}}
{{% tab "Windows" %}}
{{% /mactab %}}
{{% windowstab %}}
If the [Chocolatey Package Manager](https://chocolatey.org/) is installed, use it to install minikube:
@ -81,7 +81,7 @@ choco install minikube
Otherwise, download and run the [Windows installer](https://storage.googleapis.com/minikube/releases/latest/minikube-installer.exe)
{{% /tab %}}
{{% /windowstab %}}
{{% /tabs %}}
<h2 class="step"><span class="fa-stack fa-1x"><i class="fa fa-circle fa-stack-2x"></i><strong class="fa-stack-1x text-primary">2</strong></span>Start your cluster</h2>
@ -160,7 +160,9 @@ minikube tunnel
To find the routable IP, run this command and examine the `EXTERNAL-IP` column:
`kubectl get services balanced`
```shell
kubectl get services balanced
```
Your deployment is now available at &lt;EXTERNAL-IP&gt;:8080

View File

@ -84,7 +84,10 @@ spec:
serviceName: hello-minikube
servicePort: 8080
```
Run the command: `kubectl apply -f hello-ingress.yaml`
Run the command:
```shell
kubectl apply -f hello-ingress.yaml
```
That's it! You can now access your service via Ambassador:
```shell script
@ -120,7 +123,10 @@ spec:
prefix: /hello-mapping/
service: mapping-minikube.default:8080
```
Run the command: `kubectl apply -f hello-mapping.yaml`
Run the command:
```shell
kubectl apply -f hello-mapping.yaml
```
That's it! You can now access your service via Ambassador:
```shell script

View File

@ -0,0 +1,44 @@
---
title: "How to use custom TLS certificate with ingress addon"
linkTitle: "Using custom TLS certificate with ingress addon"
weight: 1
date: 2020-11-30
---
## Overview
- This tutorial will show you how to configure custom TLS certificatate for ingress addon.
## Tutorial
- Start minikube
```
$ minikube start
```
- Create TLS secret which contains custom certificate and private key
```
$ kubectl -n kube-system create secret tls mkcert --key key.pem --cert cert.pem
```
- Configure ingress addon
```
$ minikube addons configure ingress
-- Enter custom cert(format is "namespace/secret"): kube-system/mkcert
✅ ingress was successfully configured
```
- Enable ingress addon (disable first when already enabled)
```
$ minikube addons disable ingress
🌑 "The 'ingress' addon is disabled
$ minikube addons enable ingress
🔎 Verifying ingress addon...
🌟 The 'ingress' addon is enabled
```
- Verify if custom certificate was enabled
```
$ kubectl -n kube-system get deployment ingress-nginx-controller -o yaml | grep "kube-system"
- --default-ssl-certificate=kube-system/mkcert
```

View File

@ -17,8 +17,10 @@ date: 2019-11-24
## Tutorial
- Start a cluster with 2 nodes in the driver of your choice:
```
```shell
minikube start --nodes 2 -p multinode-demo
```
```
😄 [multinode-demo] minikube v1.10.1 on Darwin 10.15.4
✨ Automatically selected the hyperkit driver
👍 Starting control plane node multinode-demo in cluster multinode-demo
@ -40,16 +42,20 @@ To track progress on multi-node clusters, see https://github.com/kubernetes/mini
```
- Get the list of your nodes:
```
```shell
kubectl get nodes
```
```
NAME STATUS ROLES AGE VERSION
multinode-demo Ready master 72s v1.18.2
multinode-demo-m02 Ready <none> 33s v1.18.2
```
- You can also check the status of your nodes:
```shell
minikube status -p multinode-demo
```
```
$ minikube status -p multinode-demo
multinode-demo
type: Control Plane
host: Running
@ -64,33 +70,44 @@ kubelet: Running
```
- Deploy our hello world deployment:
```
```shell
kubectl apply -f hello-deployment.yaml
```
```
deployment.apps/hello created
```
```shell
kubectl rollout status deployment/hello
```
```
deployment "hello" successfully rolled out
```
- Deploy our hello world service, which just spits back the IP address the request was served from:
```
```shell
kubectl apply -f hello-svc.yaml
```
```
service/hello created
```
- Check out the IP addresses of our pods, to note for future reference
```
```shell
kubectl get pods -o wide
```
```
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
hello-c7b8df44f-qbhxh 1/1 Running 0 31s 10.244.0.3 multinode-demo <none> <none>
hello-c7b8df44f-xv4v6 1/1 Running 0 31s 10.244.0.2 multinode-demo <none> <none>
```
- Look at our service, to know what URL to hit
```
```shell
minikube service list -p multinode-demo
```
```
|-------------|------------|--------------|-----------------------------|
| NAMESPACE | NAME | TARGET PORT | URL |
|-------------|------------|--------------|-----------------------------|
@ -101,8 +118,10 @@ minikube service list -p multinode-demo
```
- Let's hit the URL a few times and see what comes back
```
```shell
curl http://192.168.64.226:31000
```
```
Hello from hello-c7b8df44f-qbhxh (10.244.0.3)
curl http://192.168.64.226:31000

View File

@ -0,0 +1,24 @@
---
title: "Telemetry"
linkTitle: "telemetry"
weight: 1
date: 2020-11-24
---
## Overview
minikube provides telemetry suppport via [OpenTelemetry tracing](https://opentelemetry.io/about/) to collect trace data for `minikube start`.
Currently, minikube supports the following exporters for tracing data:
- [Stackdriver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/master/exporter/stackdriverexporter)
To collect trace data with minikube and the Stackdriver exporter, run:
```shell
MINIKUBE_GCP_PROJECT_ID=<project ID> minikube start --output json --trace gcp
```
## Contributing
There are many exporters available via [OpenTelemetry community contributions](https://github.com/open-telemetry/opentelemetry-collector-contrib).
If you would like to see additional exporters, please create an [issue](https://github.com/kubernetes/minikube/issues) or refer to our [contribution][https://minikube.sigs.k8s.io/docs/contrib/] guidelines and submit a pull request. Thank you!

Some files were not shown because too many files have changed in this diff Show More