参考了官方文档
我按照官方文档的配置做了以下修改
于是我手动重启了一下node结点的docker服务,并没有收到邮件。
感谢你的帮助!
cat <<EOF | kubectl apply -f -
apiVersion: v1
data:
password: dGVzdA==
kind: Secret
metadata:
labels:
app: notification-manager
name: test-user-email-secret
namespace: kubesphere-monitoring-system
type: Opaque
—
apiVersion: notification.kubesphere.io/v1alpha1
kind: EmailConfig
metadata:
labels:
app: notification-manager
type: tenant
user: test-user
name: test-user-config
namespace: kubesphere-monitoring-system
spec:
authPassword:
key: 改成了SMTP邮箱密码
name: 改成了SMTP邮箱
authUsername: 自定义了一个名字
from: SMTP邮箱
requireTLS: true
smartHost:
host: 改成了SMTP邮箱服务器
port: “端口为SMTP邮箱服务器端口”
—
apiVersion: notification.kubesphere.io/v1alpha1
kind: EmailReceiver
metadata:
labels:
app: notification-manager
type: tenant
user: test-user
name: test-user-receiver
namespace: kubesphere-monitoring-system
spec:
emailConfigSelector:
matchLabels:
type: tenant
user: test-user
to: