我已经在我的虚拟机上创建了一个Kubernetes集群,并且我一直试图用我自己的域(例如,)将它公开到互联网上。我已经创建了一个入口资源,如下所示,我还修改了kubelet配置,以拥有我的域名。我的所有豆荚和服务都是在这个域名(例如,default.svc.mydomain.xyz)中创建的。
root@master-1:~# kubectl get ingress
NAME CLASS HOSTS ADDRESS PORTS AGE
test-ingress <none> www.mydomai
这是我的.htaccess文件的样子:
# Original
# If you modify this file then change the above line to: # Modified
<IfModule mod_rewrite.c>
RewriteEngine On
# Certain hosts may require the following line.
# If vanilla is in a subfolder then you need to specify it after the /.
# (ex. You put Vanil
当我以前使用docker时,我可以使用docker-machine ssh default在docker的机器/etc/hosts中设置主机,但是在中,我不能访问它是VM,因为它没有它。那么,问题是how to set hosts in docker for mac?我的第二个域名想要指向另一个ip。
在中,我们找到了hosts 元素配置的以下示例:
Serving one domain:
hosts: [example.org]
Serving three domains:
hosts:
- example.net
- example.com
- jabber.somesite.org
(当然,以上只是两种编写YAML“列表”的不同方法,一次使用括号表示法,一次使用缩进-带有-hypen表示法)。
过了一会儿,我们看到:
## This ejabberd server has three vhosts:
hosts:
- one.example.org
-