美文网首页
ingress添加账号密码登录

ingress添加账号密码登录

作者: _zt_d58b | 来源:发表于2020-07-24 17:30 被阅读0次

    一、添加账号

    apt install apache2-utils

    htpasswd -bc auth admin viomi2020@Fd82*^eZ9

    kubectl create secret generic system-basic-auth --from-file=auth -n viomi-monitor

    二、ingress配置

    apiVersion: extensions/v1beta1

    kind: Ingress

    metadata:

      annotations:

        ingress.kubernetes.io/auth-secret: system-basic-auth

        ingress.kubernetes.io/auth-type: basic

        kubernetes.io/ingress.class: traefik

      name: skywalking-ingress

      namespace: viomi-monitor

      resourceVersion: "68842512"

      selfLink: /apis/extensions/v1beta1/namespaces/viomi-monitor/ingresses/skywalking-ingress

      uid: b537fec3-c668-11ea-bb23-fa163e3fc3ea

    spec:

      rules:

      - host: skywalking.viomi.com.cn

        http:

          paths:

          - backend:

              serviceName: skywalking-svc

              servicePort: 8080

    相关文章

      网友评论

          本文标题:ingress添加账号密码登录

          本文链接:https://www.haomeiwen.com/subject/lnkslktx.html