我正在尝试使用 openstack 创建一个迷人的 kubernetes 的离线安装。按照规范指南,我遇到了这个错误。我认为它无法填充juju-proxy-systemd.conf
并且juju-proxy.conf
没有代理详细信息?
要运行 juju bootstrap 控制器,我运行
juju bootstrap --bootstrap-series=$OS_SERIES \
--metadata-source=~/simplestreams \
--model-default network=test \
--model-default external-network=external \
--model-default use-floating-ip=true \
--config use-default-secgroup=true \
--config apt-http-proxy=http://proxy.co.uk:3128 \
--config apt-ftp-proxy=ftp://proxy.co.uk:3128 \
--config apt-https-proxy=http://proxy.co.uk:3128 \
--config apt-no-proxy=localhost,127.0.0.0,127.0.1.1,127.0.1.1,local.home,10.255.52.0/24,10.20.20.0/24,192.168.122.0/24 \
--config juju-http-proxy=http://proxy.co.uk:3128 \
--config juju-ftp-proxy=ftp://proxy.co.uk:3128 \
--config juju-https-proxy=http://proxy..co.uk:3128 \
--config juju-no-proxy=localhost,127.0.0.0,127.0.1.1,127.0.1.1,local.home,10.255.52.0/24,10.20.20.0/24,192.168.122.0/24 \
--config snap-http-proxy=http://proxy.co.uk:3128 \
--config snap-ftp-proxy=ftp://proxy.co.uk:3128 \
--config snap-https-proxy=http://proxy.co.uk:3128 \
--config snap-no-proxy=localhost,127.0.0.0,127.0.1.1,127.0.1.1,local.home,10.255.52.0/24,10.20.20.0/24,192.168.122.0/24 \
--config logging-config="<root>=TRACE;unit=TRACE" \
--debug \
microstack microstack
要运行迷人的 kubernetes 本地安装,我运行
juju bootstrap \
--config logging-config="<root>=TRACE;unit=TRACE" \
--debug \
--config apt-no-proxy=localhost,127.0.0.1,local.home,10.255.52.0/24,10.20.20.0/24,192.168.122.0/24 \
--config juju-no-proxy=localhost,127.0.0.1,local.home,10.255.52.0/24,10.20.20.0/24,192.168.122.0/24 \
localhost localhost8
这两个命令都失败了
22:30:30 ERROR juju.cmd.juju.commands bootstrap.go:884 unable to contact api server after 1 attempts: unable to connect to API: Forbidden
22:30:30 DEBUG juju.cmd.juju.commands bootstrap.go:885 (error details: [{/build/snapcraft-juju-a284566302ade03f36071a6fe755224b/parts/juju/src/cmd/juju/common/controller.go:153: unable to contact api server after 1 attempts} {/build/snapcraft-juju-a284566302ade03f36071a6fe755224b/parts/juju/src/cmd/juju/common/controller.go:50: } {/build/snapcraft-juju-a284566302ade03f36071a6fe755224b/parts/juju/src/cmd/modelcmd/modelcommand.go:421: } {/build/snapcraft-juju-a284566302ade03f36071a6fe755224b/parts/juju/src/cmd/modelcmd/modelcommand.go:440: } {/build/snapcraft-juju-a284566302ade03f36071a6fe755224b/parts/juju/src/cmd/modelcmd/base.go:275: } {/build/snapcraft-juju-a284566302ade03f36071a6fe755224b/parts/juju/src/juju/api.go:83: } {/build/snapcraft-juju-a284566302ade03f36071a6fe755224b/parts/juju/src/api/apiclient.go:218: } {/build/snapcraft-juju-a284566302ade03f36071a6fe755224b/parts/juju/src/api/apiclient.go:686: } {/build/snapcraft-juju-a284566302ade03f36071a6fe755224b/parts/juju/src/api/apiclient.go:1028: } {/build/snapcraft-juju-a284566302ade03f36071a6fe755224b/parts/juju/src/api/apiclient.go:1132: unable to connect to API} {/build/snapcraft-juju-a284566302ade03f36071a6fe755224b/parts/juju/src/api/apiclient.go:1157: } {/build/snapcraft-juju-a284566302ade03f36071a6fe755224b/parts/juju/src/api/apiclient.go:737: } {Forbidden}])
我认为它无法使用无代理详细信息填充 juju-proxy-systemd.conf 和 juju-proxy.conf?
您可以尝试在 juju 配置文件中设置代理设置:
$HOME/.juju/environments.yaml
例如:
环境:maas:类型:maas maas-server:'http://192.168.1.1/MAAS' maas-oauth:'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' 默认系列:xenial bootstrap-timeout:1800 bootstrap-retry-delay:10 bootstrap-addresses-延迟:10 admin-secret:'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' 授权密钥路径:'~/.ssh/id_rsa.pub' 代理-http:http://proxy.co.uk: 3128 代理-https:https://proxy .co.uk:3128 proxy-ftp: ftp://proxy.co.uk:3128 no-proxy: localhost,127.0.0.1,local.home,10.255.52.0/24,10.20.20.0/24,192.168.122.0/24
您还可以在环境变量中设置代理设置:
http_proxy=http://proxy.co.uk:3128 https_proxy=https://proxy.co.uk:3128 ftp_proxy=ftp://proxy.co.uk:3128 no_proxy=localhost,127.0.0.1,local.home ,10.255.52.0/24,10.20.20.0/24,192.168.122.0/24
欲了解更多信息,请参阅:
https://docs.jujucharms.com/2.5/en/controllers-config