it_worker365

   ::  ::  ::  ::  :: 管理

1、普通创建

kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.0.4/deploy/static/provider/cloud/deploy.yaml

2、下载不下来的放dockerhub打包后用自己的

xxx/kube-webhook-certgen:latest

3、创建yaml

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ingress-myservicea
spec:
  rules:
  - host: nginx2.test.com
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: nginx2
            port: 
              number: 80
  ingressClassName: nginx

4、源码编译

有些k8s相关依赖无法下载,先通过gitlab打包到dockerhub修改依赖再用

export REGISTRY=xxx
export BASE_IMAGE=xxx/nginx:latest
make image
make build
posted on 2021-10-21 10:30  it_worker365  阅读(44)  评论(0编辑  收藏  举报