17.搭建k8s统一资源清单http服务
- node200上创建文件http服务
mkdir /data/k8s-yaml
vi /etc/nginx/conf.d/k8s-yaml.hzwod.com.conf
server {
listen 80;
server_name k8s-yaml.hzwod.com;
location / {
autoindex on;
default_type text/plain;
root /data/k8s-yaml;
}
}
nginx -s reload
- node11上配置DNS
vi /var/named/hzwod.com.zone
添加k8s-yaml IN A 172.10.10.200
$ORIGIN hzwod.com.
$TTL 14400
@ IN SOA ns.hzwod.com. host.hzwod.com. (
2021031702 ; Serial
7200 ; Refresh
120 ; Retry
2419200 ; Expire
604800) ; Default TTL
;
@ IN NS ns.hzwod.com.
ns IN A 172.10.10.11
harbor IN A 172.10.10.200
k8s-yaml IN A 172.10.10.200
systemctl restart named