Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minikube start | Template parsing error: template: :1: unexpected "=" in operand #10323

Closed
michal-racko opened this issue Feb 1, 2021 · 3 comments
Labels
co/docker-driver Issues related to kubernetes in container kind/support Categorizes issue or PR as a support question. os/linux triage/duplicate Indicates an issue is a duplicate of other open issue.

Comments

@michal-racko
Copy link

michal-racko commented Feb 1, 2021

Steps to reproduce the issue:

  1. minikube start --driver=docker

Full output of failed command:

πŸ˜„ minikube v1.17.1 on Ubuntu 16.04
✨ Using the docker driver based on user configuration
πŸ‘ Starting control plane node minikube in cluster minikube
🚜 Pulling base image ...
πŸ”₯ Creating docker container (CPUs=2, Memory=64300MB) ...
🐳 Preparing Kubernetes v1.20.2 on Docker 20.10.2 ...| E0201 16:25:45.173383 511367 start.go:99] Unable to get host IP: network inspect: docker network inspect minikube --format "{"Name": "{{.Name}}","Driver": "{{.Driver}}","Subnet": "{{range .IPAM.Config}}{{.Subnet}}{{end}}","Gateway": "{{range .IPAM.Config}}{{.Gateway}}{{end}}","MTU": {{if (index .Options "com.docker.network.driver.mtu")}}{{(index .Options "com.docker.network.driver.mtu")}}{{else}}0{{end}},{{$first := true}} "ContainerIPs": [{{range $k,$v := .Containers }}{{if $first}}{{$first = false}}{{else}}, {{end}}"{{$v.IPv4Address}}"{{end}}]}": exit status 64
stdout:

stderr:
Template parsing error: template: :1: unexpected "=" in operand
E0201 16:25:45.174798 511367 out.go:330] unable to execute Failed to setup kubeconfig: network inspect: docker network inspect minikube --format "{"Name": "{{.Name}}","Driver": "{{.Driver}}","Subnet": "{{range .IPAM.Config}}{{.Subnet}}{{end}}","Gateway": "{{range .IPAM.Config}}{{.Gateway}}{{end}}","MTU": {{if (index .Options "com.docker.network.driver.mtu")}}{{(index .Options "com.docker.network.driver.mtu")}}{{else}}0{{end}},{{$first := true}} "ContainerIPs": [{{range $k,$v := .Containers }}{{if $first}}{{$first = false}}{{else}}, {{end}}"{{$v.IPv4Address}}"{{end}}]}": exit status 64
stdout:

stderr:
Template parsing error: template: :1: unexpected "=" in operand
: template: Failed to setup kubeconfig: network inspect: docker network inspect minikube --format "{"Name": "{{.Name}}","Driver": "{{.Driver}}","Subnet": "{{range .IPAM.Config}}{{.Subnet}}{{end}}","Gateway": "{{range .IPAM.Config}}{{.Gateway}}{{end}}","MTU": {{if (index .Options "com.docker.network.driver.mtu")}}{{(index .Options "com.docker.network.driver.mtu")}}{{else}}0{{end}},{{$first := true}} "ContainerIPs": [{{range $k,$v := .Containers }}{{if $first}}{{$first = false}}{{else}}, {{end}}"{{$v.IPv4Address}}"{{end}}]}": exit status 64
stdout:

stderr:
Template parsing error: template: :1: unexpected "=" in operand
:1:253: executing "Failed to setup kubeconfig: network inspect: docker network inspect minikube --format "{"Name": "{{.Name}}","Driver": "{{.Driver}}","Subnet": "{{range .IPAM.Config}}{{.Subnet}}{{end}}","Gateway": "{{range .IPAM.Config}}{{.Gateway}}{{end}}","MTU": {{if (index .Options "com.docker.network.driver.mtu")}}{{(index .Options "com.docker.network.driver.mtu")}}{{else}}0{{end}},{{$first := true}} "ContainerIPs": [{{range $k,$v := .Containers }}{{if $first}}{{$first = false}}{{else}}, {{end}}"{{$v.IPv4Address}}"{{end}}]}": exit status 64\nstdout:\n\nstderr:\nTemplate parsing error: template: :1: unexpected "=" in operand\n" at <index .Options "com.docker.network.driver.mtu">: error calling index: index of untyped nil - returning raw string.

❌ Exiting due to GUEST_START: Failed to setup kubeconfig: network inspect: docker network inspect minikube --format "{"Name": "{{.Name}}","Driver": "{{.Driver}}","Subnet": "{{range .IPAM.Config}}{{.Subnet}}{{end}}","Gateway": "{{range .IPAM.Config}}{{.Gateway}}{{end}}","MTU": {{if (index .Options "com.docker.network.driver.mtu")}}{{(index .Options "com.docker.network.driver.mtu")}}{{else}}0{{end}},{{$first := true}} "ContainerIPs": [{{range $k,$v := .Containers }}{{if $first}}{{$first = false}}{{else}}, {{end}}"{{$v.IPv4Address}}"{{end}}]}": exit status 64
stdout:

stderr:
Template parsing error: template: :1: unexpected "=" in operand

😿 If the above advice does not help, please let us know:
πŸ‘‰ https://github.com/kubernetes/minikube/issues/new/choose

Optional: Full output of minikube logs command:

==> Docker <==
-- Logs begin at Mon 2021-02-01 15:25:38 UTC, end at Mon 2021-02-01 15:28:17 UTC. --
Feb 01 15:25:38 minikube systemd[1]: Starting Docker Application Container Engine...
Feb 01 15:25:38 minikube dockerd[177]: time="2021-02-01T15:25:38.831588341Z" level=info msg="Starting up"
Feb 01 15:25:38 minikube dockerd[177]: time="2021-02-01T15:25:38.836282056Z" level=info msg="parsed scheme: "unix"" module=grpc
Feb 01 15:25:38 minikube dockerd[177]: time="2021-02-01T15:25:38.836319158Z" level=info msg="scheme "unix" not registered, fallback to default scheme" module=grpc
Feb 01 15:25:38 minikube dockerd[177]: time="2021-02-01T15:25:38.836355174Z" level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock 0 }] }" module=grpc
Feb 01 15:25:38 minikube dockerd[177]: time="2021-02-01T15:25:38.836376338Z" level=info msg="ClientConn switching balancer to "pick_first"" module=grpc
Feb 01 15:25:38 minikube dockerd[177]: time="2021-02-01T15:25:38.838318912Z" level=info msg="parsed scheme: "unix"" module=grpc
Feb 01 15:25:38 minikube dockerd[177]: time="2021-02-01T15:25:38.838358364Z" level=info msg="scheme "unix" not registered, fallback to default scheme" module=grpc
Feb 01 15:25:38 minikube dockerd[177]: time="2021-02-01T15:25:38.838392238Z" level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock 0 }] }" module=grpc
Feb 01 15:25:38 minikube dockerd[177]: time="2021-02-01T15:25:38.838413315Z" level=info msg="ClientConn switching balancer to "pick_first"" module=grpc
Feb 01 15:25:38 minikube dockerd[177]: time="2021-02-01T15:25:38.871177149Z" level=info msg="[graphdriver] using prior storage driver: overlay2"
Feb 01 15:25:38 minikube dockerd[177]: time="2021-02-01T15:25:38.895407435Z" level=warning msg="Your kernel does not support swap memory limit"
Feb 01 15:25:38 minikube dockerd[177]: time="2021-02-01T15:25:38.895440764Z" level=warning msg="Your kernel does not support CPU realtime scheduler"
Feb 01 15:25:38 minikube dockerd[177]: time="2021-02-01T15:25:38.895667056Z" level=info msg="Loading containers: start."
Feb 01 15:25:38 minikube dockerd[177]: time="2021-02-01T15:25:38.980453989Z" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address"
Feb 01 15:25:39 minikube dockerd[177]: time="2021-02-01T15:25:39.041127741Z" level=info msg="Loading containers: done."
Feb 01 15:25:39 minikube dockerd[177]: time="2021-02-01T15:25:39.083534321Z" level=info msg="Docker daemon" commit=8891c58 graphdriver(s)=overlay2 version=20.10.2
Feb 01 15:25:39 minikube dockerd[177]: time="2021-02-01T15:25:39.083779040Z" level=info msg="Daemon has completed initialization"
Feb 01 15:25:39 minikube systemd[1]: Started Docker Application Container Engine.
Feb 01 15:25:39 minikube dockerd[177]: time="2021-02-01T15:25:39.108791277Z" level=info msg="API listen on /run/docker.sock"
Feb 01 15:25:43 minikube systemd[1]: /lib/systemd/system/docker.service:13: Unknown key name 'StartLimitIntervalSec' in section 'Service', ignoring.
Feb 01 15:25:43 minikube systemd[1]: docker.service: Current command vanished from the unit file, execution of the command list won't be resumed.
Feb 01 15:25:43 minikube systemd[1]: /lib/systemd/system/docker.service:13: Unknown key name 'StartLimitIntervalSec' in section 'Service', ignoring.
Feb 01 15:25:43 minikube systemd[1]: /lib/systemd/system/docker.service:13: Unknown key name 'StartLimitIntervalSec' in section 'Service', ignoring.
Feb 01 15:25:43 minikube systemd[1]: /lib/systemd/system/docker.service:13: Unknown key name 'StartLimitIntervalSec' in section 'Service', ignoring.
Feb 01 15:25:43 minikube dockerd[177]: time="2021-02-01T15:25:43.553809661Z" level=info msg="Processing signal 'terminated'"
Feb 01 15:25:43 minikube systemd[1]: Stopping Docker Application Container Engine...
Feb 01 15:25:43 minikube dockerd[177]: time="2021-02-01T15:25:43.556046703Z" level=info msg="stopping event stream following graceful shutdown" error="" module=libcontainerd namespace=moby
Feb 01 15:25:43 minikube dockerd[177]: time="2021-02-01T15:25:43.557355249Z" level=info msg="Daemon shutdown complete"
Feb 01 15:25:43 minikube systemd[1]: docker.service: Succeeded.
Feb 01 15:25:43 minikube systemd[1]: Stopped Docker Application Container Engine.
Feb 01 15:25:43 minikube systemd[1]: Starting Docker Application Container Engine...
Feb 01 15:25:43 minikube dockerd[435]: time="2021-02-01T15:25:43.650105235Z" level=info msg="Starting up"
Feb 01 15:25:43 minikube dockerd[435]: time="2021-02-01T15:25:43.654033228Z" level=info msg="parsed scheme: "unix"" module=grpc
Feb 01 15:25:43 minikube dockerd[435]: time="2021-02-01T15:25:43.654060093Z" level=info msg="scheme "unix" not registered, fallback to default scheme" module=grpc
Feb 01 15:25:43 minikube dockerd[435]: time="2021-02-01T15:25:43.654084925Z" level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock 0 }] }" module=grpc
Feb 01 15:25:43 minikube dockerd[435]: time="2021-02-01T15:25:43.654100502Z" level=info msg="ClientConn switching balancer to "pick_first"" module=grpc
Feb 01 15:25:43 minikube dockerd[435]: time="2021-02-01T15:25:43.655504411Z" level=info msg="parsed scheme: "unix"" module=grpc
Feb 01 15:25:43 minikube dockerd[435]: time="2021-02-01T15:25:43.655526830Z" level=info msg="scheme "unix" not registered, fallback to default scheme" module=grpc
Feb 01 15:25:43 minikube dockerd[435]: time="2021-02-01T15:25:43.655544599Z" level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock 0 }] }" module=grpc
Feb 01 15:25:43 minikube dockerd[435]: time="2021-02-01T15:25:43.655556029Z" level=info msg="ClientConn switching balancer to "pick_first"" module=grpc
Feb 01 15:25:43 minikube dockerd[435]: time="2021-02-01T15:25:43.667100391Z" level=info msg="[graphdriver] using prior storage driver: overlay2"
Feb 01 15:25:43 minikube dockerd[435]: time="2021-02-01T15:25:43.675538712Z" level=warning msg="Your kernel does not support swap memory limit"
Feb 01 15:25:43 minikube dockerd[435]: time="2021-02-01T15:25:43.675565064Z" level=warning msg="Your kernel does not support CPU realtime scheduler"
Feb 01 15:25:43 minikube dockerd[435]: time="2021-02-01T15:25:43.675765826Z" level=info msg="Loading containers: start."
Feb 01 15:25:43 minikube dockerd[435]: time="2021-02-01T15:25:43.779820261Z" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address"
Feb 01 15:25:43 minikube dockerd[435]: time="2021-02-01T15:25:43.825288648Z" level=info msg="Loading containers: done."
Feb 01 15:25:43 minikube dockerd[435]: time="2021-02-01T15:25:43.867516700Z" level=info msg="Docker daemon" commit=8891c58 graphdriver(s)=overlay2 version=20.10.2
Feb 01 15:25:43 minikube dockerd[435]: time="2021-02-01T15:25:43.867623369Z" level=info msg="Daemon has completed initialization"
Feb 01 15:25:43 minikube systemd[1]: Started Docker Application Container Engine.
Feb 01 15:25:43 minikube dockerd[435]: time="2021-02-01T15:25:43.889854102Z" level=info msg="API listen on [::]:2376"
Feb 01 15:25:43 minikube dockerd[435]: time="2021-02-01T15:25:43.899779878Z" level=info msg="API listen on /var/run/docker.sock"
Feb 01 15:25:44 minikube systemd[1]: /lib/systemd/system/docker.service:13: Unknown key name 'StartLimitIntervalSec' in section 'Service', ignoring.

==> container status <==
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
time="2021-02-01T15:28:19Z" level=fatal msg="failed to connect: failed to connect, make sure you are running as root and the runtime has been started: context deadline exceeded"

==> describe nodes <==
E0201 16:28:19.382084 515669 logs.go:181] command /bin/bash -c "sudo /var/lib/minikube/binaries/v1.20.2/kubectl describe nodes --kubeconfig=/var/lib/minikube/kubeconfig" failed with error: /bin/bash -c "sudo /var/lib/minikube/binaries/v1.20.2/kubectl describe nodes --kubeconfig=/var/lib/minikube/kubeconfig": Process exited with status 1
stdout:

stderr:
error: stat /var/lib/minikube/kubeconfig: no such file or directory
output: "\n** stderr ** \nerror: stat /var/lib/minikube/kubeconfig: no such file or directory\n\n** /stderr **"

==> dmesg <==
[Feb 1 11:13] audit_printk_skb: 87 callbacks suppressed
[Feb 1 11:15] audit_printk_skb: 141 callbacks suppressed
[Feb 1 13:34] audit_printk_skb: 141 callbacks suppressed
[Feb 1 14:01] audit_printk_skb: 141 callbacks suppressed
[Feb 1 14:04] audit_printk_skb: 141 callbacks suppressed
[ +5.573367] audit_printk_skb: 87 callbacks suppressed
[Feb 1 14:48] VBoxNetFlt: Successfully started.
[ +0.010916] VBoxNetAdp: Successfully started.
[ +0.010543] VBoxPciLinuxInit

==> kernel <==
15:28:19 up 463 days, 21:16, 0 users, load average: 0.10, 0.35, 0.40
Linux minikube 4.4.0-142-generic #168-Ubuntu SMP Wed Jan 16 21:00:45 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
PRETTY_NAME="Ubuntu 20.04.1 LTS"

==> kubelet <==
-- Logs begin at Mon 2021-02-01 15:25:38 UTC, end at Mon 2021-02-01 15:28:19 UTC. --
-- No entries --

❗ unable to fetch logs for: describe nodes

A similar issue was reported on 23.12.2020 #10036 The suggested solution does not help in this case.

@afbjorklund
Copy link
Collaborator

afbjorklund commented Feb 1, 2021

The usual issue is that the Docker version is too old, but unfortunately it doesn't show up in the output. (#7952 (comment))

See #10282 (and #9077)

@afbjorklund afbjorklund added co/docker-driver Issues related to kubernetes in container os/linux kind/support Categorizes issue or PR as a support question. triage/duplicate Indicates an issue is a duplicate of other open issue. labels Feb 1, 2021
@michal-racko
Copy link
Author

Docker update helped indeed. Thank you.

@kushan-gunasekera
Copy link

The following answer will help you to overcome this issue,

https://stackoverflow.com/a/76073084/6194097

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/docker-driver Issues related to kubernetes in container kind/support Categorizes issue or PR as a support question. os/linux triage/duplicate Indicates an issue is a duplicate of other open issue.
Projects
None yet
Development

No branches or pull requests

3 participants