Minikube: --insecure-registry does not work on an existing VM

Created on 21 Jun 2019  路  12Comments  路  Source: kubernetes/minikube

minikube version: v1.1.1
operating system version: macOS 10.14

minikube start \
    --docker-env=HTTP_PROXY=$HTTP_PROXY \
    --docker-env=HTTPS_PROXY=$HTTPS_PROXY \
    --docker-env=NO_PROXY=$NO_PROXY \
    --registry-mirror=https://registry.docker-cn.com \
    --insecure-registry="192.168.99.1:5000"

add the option --insecure-registry="192.168.99.1:5000" is newly added. And do minikue stop & start锛宐ut the option insecure-registry does not appear in docker info. It will not take effect until do minikube delete and recreate.

I try minikube ssh and use root user edit /etc/docker/daemon.json, then systemctl restart docker, but failed. I got err same as https://github.com/kubernetes/minikube/issues/3800:

Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.

Is there any convenient way to make it effective?

areregistry help wanted kinbug lifecyclfrozen prioritbacklog

Most helpful comment

I feel like this is because the addon needs the minikube to be restarted, and addon enable wont enable it witrhout stop and restart

All 12 comments

I am curious, which driver are you using ? hyperkit or virtualbox?

do you mind sharing the minikube logs

@medyagh

I use virtualbox.

logs:

==> coredns <==

==> dmesg <==
[  +0.000004] vboxvideo: Unknown symbol ttm_bo_manager_func (err 0)
[  +0.000003] vboxvideo: Unknown symbol ttm_bo_global_init (err 0)
[  +0.000001] vboxvideo: Unknown symbol ttm_bo_default_io_mem_pfn (err 0)
[  +0.000007] vboxvideo: Unknown symbol ttm_bo_device_release (err 0)
[  +0.000012] vboxvideo: Unknown symbol ttm_bo_kunmap (err 0)
[  +0.000004] vboxvideo: Unknown symbol ttm_bo_del_sub_from_lru (err 0)
[  +0.000007] vboxvideo: Unknown symbol ttm_bo_device_init (err 0)
[  +0.000002] vboxvideo: Unknown symbol ttm_bo_init_mm (err 0)
[  +0.000001] vboxvideo: Unknown symbol ttm_bo_dma_acc_size (err 0)
[  +0.000003] vboxvideo: Unknown symbol ttm_tt_init (err 0)
[  +0.000002] vboxvideo: Unknown symbol ttm_bo_kmap (err 0)
[  +0.000007] vboxvideo: Unknown symbol ttm_bo_add_to_lru (err 0)
[  +0.000002] vboxvideo: Unknown symbol ttm_bo_unref (err 0)
[  +0.000003] vboxvideo: Unknown symbol ttm_mem_global_release (err 0)
[  +0.000002] vboxvideo: Unknown symbol ttm_mem_global_init (err 0)
[  +0.000010] vboxvideo: Unknown symbol ttm_bo_init (err 0)
[  +0.000002] vboxvideo: Unknown symbol ttm_bo_validate (err 0)
[  +0.000008] vboxvideo: Unknown symbol ttm_tt_fini (err 0)
[  +0.000002] vboxvideo: Unknown symbol ttm_bo_eviction_valuable (err 0)
[  +0.000002] vboxvideo: Unknown symbol ttm_pool_populate (err 0)
[  +0.146765] hpet1: lost 644 rtc interrupts
[  +0.016668] NFSD: the nfsdcld client tracking upcall will be removed in 3.10. Please transition to using nfsdcltrack.
[  +0.019878] hpet1: lost 1 rtc interrupts
[  +0.001909] VBoxService 5.1.38 r122592 (verbosity: 0) linux.amd64 (May  9 2018 12:22:30) release log
              00:00:00.002104 main     Log opened 2019-06-27T14:34:50.333740000Z
[  +0.000601] 00:00:00.002245 main     OS Product: Linux
[  +0.000060] 00:00:00.002812 main     OS Release: 4.15.0
[  +0.000130] 00:00:00.002867 main     OS Version: #1 SMP Thu Jun 6 15:07:18 PDT 2019
[  +0.000111] 00:00:00.003052 main     Executable: /usr/sbin/VBoxService
              00:00:00.003053 main     Process ID: 2033
              00:00:00.003054 main     Package type: LINUX_64BITS_GENERIC
[  +0.000059] 00:00:00.003109 main     5.1.38 r122592 started. Verbose level = 0
[  +5.018482] hpet1: lost 281 rtc interrupts
[  +2.971007] systemd-fstab-generator[2255]: Ignoring "noauto" for root device
[  +0.896531] systemd-fstab-generator[2391]: Ignoring "noauto" for root device
[  +1.134429] hpet1: lost 319 rtc interrupts
[  +5.004629] hpet_rtc_timer_reinit: 105 callbacks suppressed
[  +0.000010] hpet1: lost 318 rtc interrupts
[Jun27 14:35] hpet1: lost 318 rtc interrupts
[  +3.445463] systemd-fstab-generator[3214]: Ignoring "noauto" for root device
[  +1.554862] hpet1: lost 318 rtc interrupts
[  +5.002087] hpet1: lost 318 rtc interrupts
[  +5.001471] hpet_rtc_timer_reinit: 21 callbacks suppressed
[  +0.000001] hpet1: lost 319 rtc interrupts
[  +5.001130] hpet1: lost 318 rtc interrupts
[  +5.005120] hpet_rtc_timer_reinit: 3 callbacks suppressed
[  +0.000001] hpet1: lost 318 rtc interrupts
[  +0.871127] tee (4378): /proc/3621/oom_adj is deprecated, please use /proc/3621/oom_score_adj instead.
[  +4.142146] hpet_rtc_timer_reinit: 42 callbacks suppressed
[  +0.000015] hpet1: lost 319 rtc interrupts

==> kernel <==
 14:35:36 up 1 min,  0 users,  load average: 3.42, 1.01, 0.35
Linux minikube 4.15.0 #1 SMP Thu Jun 6 15:07:18 PDT 2019 x86_64 GNU/Linux

I believe the root cause here is that this flag results in a change in the systemd docker unit, but we either aren't making the change, or restarting docker for restarts now.

I've added the insecure registry manually at the machine config file ~/.minikube/machines/<PROFILE_NAME>/config.json and it worked for me.

I feel like this is because the addon needs the minikube to be restarted, and addon enable wont enable it witrhout stop and restart

this seems to be a Bug ! "--insecure-registry" is not stick.

we need to make sure all the start args stick in config.

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

/remove-lifecycle stale

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

This is still an outstanding issue.

/lifecycle frozen

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vainikkaj picture vainikkaj  路  3Comments

StasPerekrestov picture StasPerekrestov  路  3Comments

kphatak picture kphatak  路  3Comments

wudongyin picture wudongyin  路  3Comments

mrtkp9993 picture mrtkp9993  路  3Comments