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

针对AWS-EC2 上使用的修正 #5

Open
AlvaWymer opened this issue Jun 7, 2019 · 0 comments
Open

针对AWS-EC2 上使用的修正 #5

AlvaWymer opened this issue Jun 7, 2019 · 0 comments

Comments

@AlvaWymer
Copy link

你好,跟着你的材料,断断续续弄了两周,终于把环境搭建好了。而且也实验成功了,所以谢谢。
但是中间遇到了几个坑,所以现在说明一下:
1.kebectl 中的Dockerfile 少了一句话,导致部署的第二步,有问题

很重要,作者原始的代码是没有下面这一句的,卡了一个月

ADD admin.conf /root/.kube/config
2. 如果大家使用AWS 搭建的话,会遇到类似于下面这样的报错:
$ kubectl apply -f Deployment.yaml
unable to recognize "Deployment.yaml": Get https://176.34.154.15:8443/api?timeout=32s: x509: certificate is valid for 172.31.43.46, 10.96.0.1, 10.0.0.1, not 176.34.154.15
unable to recognize "Deployment.yaml": Get https://176.34.154.15:8443/api?timeout=32s: x509: certificate is valid for 172.31.43.46, 10.96.0.1, 10.0.0.1, not 176.34.154.15
这是因为在admin.conf 文件中,要把里面的cluster 的server 换成 内网ip 就好了:
apiVersion: v1
clusters:

  • cluster:
    certificate-authority-data: LS0tLS1CRUdJ
    server: https:///172.31.43.46:8443
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant