BlueXIII's Blog

热爱技术,持续学习

0%

K8S离线部署笔记-13-IngressNginx

下载yml

https://github.com/kubernetes/ingress-nginx/tree/ingress-nginx-3.3.0/deploy/static/provider/baremetal

下载镜像

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# 在线环境
docker pull k8s.gcr.io/ingress-nginx/controller:v0.35.0
docker pull docker.io/jettech/kube-webhook-certgen:v1.3.0

docker tag k8s.gcr.io/ingress-nginx/controller:v0.35.0 registry.yourcompany.com:5000/ingress-nginx/controller:v0.35.0
docker tag docker.io/jettech/kube-webhook-certgen:v1.3.0 registry.yourcompany.com:5000/jettech/kube-webhook-certgen:v1.3.0

docker save -o controller:v0.35.0.tar registry.yourcompany.com:5000/ingress-nginx/controller:v0.35.0
docker save -o kube-webhook-certgen:v1.3.0.tar registry.yourcompany.com:5000/jettech/kube-webhook-certgen:v1.3.0

# 离线环境
docker load -i controller:v0.35.0.tar
docker load -i kube-webhook-certgen:v1.3.0.tar

docker push registry.yourcompany.com:5000/ingress-nginx/controller:v0.35.0
docker push registry.yourcompany.com:5000/jettech/kube-webhook-certgen:v1.3.0

修改yml

1
2
image: registry.yourcompany.com:5000/ingress-nginx/controller:v0.35.0
image: registry.yourcompany.com:5000/jettech/kube-webhook-certgen:v1.3.0

部署

1
2
kubectl label node uat-worker01.yourcompany.com isIngress="true"
kubectl apply -f deploy.yaml

测试

http://test.ingress.com/ip