• 【转】Creating admin user to access Kubernetes dashboard


    原文:https://medium.com/@kanrangsan/creating-admin-user-to-access-kubernetes-dashboard-723d6c9764e4

    测试成功

    ----------------------

    Creating admin user to access Kubernetes dashboard

    Error when use admin.conf file to log in K8S dashboard
    1. Create Admin Service Account
    apiVersion: v1
    kind: ServiceAccount
    metadata:
      name: admin-user
      namespace: kube-system
    

      

    dashboard-adminuser.yml
    $ kubectl apply -f dashboard-adminuser.yml
    serviceaccount/admin-user created
    apiVersion: rbac.authorization.k8s.io/v1
    kind: ClusterRoleBinding
    metadata:
      name: admin-user
    roleRef:
      apiGroup: rbac.authorization.k8s.io
      kind: ClusterRole
      name: cluster-admin
    subjects:
    - kind: ServiceAccount
      name: admin-user
      namespace: kube-system
    

      

    admin-role-binding.yml
    $ kubectl apply -f admin-role-binding.yml
    clusterrolebinding.rbac.authorization.k8s.io/admin-user created
    kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | grep admin-user | awk '{print $1}')
    Name:         admin-user-token-bmmrdNamespace:    kube-system
    Labels: <none>
    Annotations: kubernetes.io/service-account.name: admin-user
    kubernetes.io/service-account.uid: a164478c-4545-11e9-a69b-0800276c3e95
    Type: kubernetes.io/service-account-tokenData
    ====
    ca.crt: 1025 bytes
    namespace: 11 bytes
    token: <your token will be shown here>

     
     
  • 相关阅读:
    http协议及http协议和tcp协议的区别
    Fastcgi协议定义解释与说明
    web请求响应
    Linux网络编程:一个简单的正向代理服务器的实现
    Nginx-请求处理与响应
    Nginx事件管理机制-epoll
    负载均衡
    Nginx-进程模型
    [转载]NGINX原理分析 之 SLAB分配机制
    Nginx惊群处理
  • 原文地址:https://www.cnblogs.com/oxspirt/p/16357763.html
Copyright © 2020-2023  润新知