gpt4 book ai didi

kubernetes - 如何在Kubernetes仪表板中将基本身份验证模式设置为基于 token 的身份验证?

转载 作者:行者123 更新时间:2023-12-02 12:05:54 24 4
gpt4 key购买 nike

我一直在关注here kubernetes github并将基本更改为基于 token 的身份验证。它说要改变

--authentication-mode=basic
to
--authentication-mode=token



但是我的问题是在哪里改变?哪个文件?哪个yml?

如果您提供yaml配置文件的示例,那就太好了。

最佳答案

--authentication-mode标志用于kubernetes仪表板。在kubernetes仪表板部署中添加/更改此标志。

如果您使用this部署kubernetes仪表板,请在部署yaml中添加/更改标志。

# ------------------- Dashboard Deployment ------------------- #

kind: Deployment
apiVersion: apps/v1beta2
metadata:
labels:
k8s-app: kubernetes-dashboard
name: kubernetes-dashboard
namespace: kube-system
spec:
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
k8s-app: kubernetes-dashboard
template:
metadata:
labels:
k8s-app: kubernetes-dashboard
spec:
containers:
- name: kubernetes-dashboard
image: k8s.gcr.io/kubernetes-dashboard-amd64:v1.10.0
ports:
- containerPort: 8443
protocol: TCP
args:
- --auto-generate-certificates
- --authentication-mode=basic
# Uncomment the following line to manually specify Kubernetes API server Host
# If not specified, Dashboard will attempt to auto discover the API server and connect
# to it. Uncomment only if the default does not work.
# - --apiserver-host=http://my-address:port
volumeMounts:
- name: kubernetes-dashboard-certs
mountPath: /certs
# Create on-disk volume to store exec logs
- mountPath: /tmp
name: tmp-volume
livenessProbe:
httpGet:
scheme: HTTPS
path: /
port: 8443
initialDelaySeconds: 30
timeoutSeconds: 30
volumes:
- name: kubernetes-dashboard-certs
secret:
secretName: kubernetes-dashboard-certs
- name: tmp-volume
emptyDir: {}
serviceAccountName: kubernetes-dashboard
# Comment the following tolerations if Dashboard must not be deployed on master
tolerations:
- key: node-role.kubernetes.io/master
effect: NoSchedule

---

关于kubernetes - 如何在Kubernetes仪表板中将基本身份验证模式设置为基于 token 的身份验证?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53260548/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com