Nginx 文件共享
1、安装nginx服务(这边只列出来最简单的安装方法)
yum install nginx
2、创建nginx配置文件
vim /etc/nginx/conf.d/k8s-yaml.example.com
server {
listen 80;
server_name k8s-yaml.example.com;
location / {
autoindex on;
default_type text/plain;
root /data/k8s-yaml;
}
}
3、创建存放目录
mkdir /data/k8s-yaml
mkdir /data/k8s-yaml/coredns
4、配置dns服务进行正向解析配置文件(配置DNS服务,DNS服务配置为可选项)
5、重启dns服务器
systemctl restart named
6、检测是否正常解析
dig -t A k8s-yaml.example.com @192.168.10.2 +short