dtcms 源码 database eking文件 get 郑州网站开发 jquery延时 idea大小写转换快捷键 matlab 图像识别 安卓虚拟机运行windows js数组截取前5个 matlab插值函数 内存计算 kubernetes集群搭建 python中time python正则表达式语法 python循环10次 python返回值 java方法 怎么装linux系统 球中的小鬼 简体中文语言包 qtp下载 倒计时计时器 微信客户管理系统 1660ti 隐藏进程 魔兽七个人 spss20安装教程 xapk安装器 maven项目打包 上单塞拉斯 骰子gif 淘宝抽奖活动 lol不能全屏 上单艾克出装 女圣骑 x怎么截图 脚本文件 maya导出obj excel工作表下载
当前位置: 首页 > 学习教程  > 编程语言

k8s-鉴权(暂时还有点问题)

2020/12/5 9:53:49 文章标签:

所谓鉴权就是创建用后,将k8s的权限按照需求将权限分配给该用户。 1.创建用户和密码 adduser userdev passwd userdev2.创建证书: mkdir -p /usr/local/install-k8s/cert/userdevvim /usr/local/install-k8s/cert/userdev/userdev-csr.json{"CN&q…

所谓鉴权就是创建用后,将k8s的权限按照需求将权限分配给该用户。

1.创建用户和密码

adduser userdev
passwd userdev

2.创建证书:

mkdir -p /usr/local/install-k8s/cert/userdev
vim /usr/local/install-k8s/cert/userdev/userdev-csr.json
{
  "CN": "userdev",
  "hosts": [],
  "key": {
    "algo": "rsa",
    "size": 2048  
  },
  "names": [    
    {"C": "CN",
     "ST": "BeiJing",
     "L": "BeiJing",
     "O": "k8s",
    "OU": "System"    
    }  
  ]
}

解释:
在这里插入图片描述

下载证书生成工具

wget https://pkg.cfssl.org/R1.2/cfssl_linux-amd64
mv cfssl_linux-amd64 /usr/local/bin/cfssl
wget https://pkg.cfssl.org/R1.2/cfssljson_linux-amd64
mv cfssljson_linux-amd64 /usr/local/bin/cfssljson
wget https://pkg.cfssl.org/R1.2/cfssl-certinfo_linux-amd64
mv cfssl-certinfo_linux-amd64 /usr/local/bin/cfssl-certinfo
cd /etc/kubernetes/pki/

发现这个目录下都是k8s系统保留的证书:
在这里插入图片描述

cfssl gencert -ca=ca.crt -ca-key=ca.key  -profile=kubernetes /usr/local/install-k8s/cert/userdev/userdev-csr.json | cfssljson -bare userdev

执行完后会发现多出了userdev-key.pemuserdev.pem
在这里插入图片描述

设置集群参数

cd /usr/local/install-k8s/cert/

exportKUBE_APISERVER="https://192.168.10.180:6443"

kubectl config set-cluster kubernetes --certificate-authority=/etc/kubernetes/pki/ca.crt --embed-certs=true --server=${KUBE_APISERVER} --kubeconfig=userdev.kubeconfig

这是会在当前目录下生成一个userdev.kubeconfig文件

[root@master cert]# cat userdev.kubeconfig
apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUM1ekNDQWMrZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwcmRXSmwKY201bGRHVnpNQjRYRFRJd01USXdNVEF4TXpJMU4xb1hEVE13TVRFeU9UQXhNekkxTjFvd0ZURVRNQkVHQTFVRQpBeE1LYTNWaVpYSnVaWFJsY3pDQ0FTSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnRVBBRENDQVFvQ2dnRUJBTjBMCldmbUJIdEc5a2lycVZ4U3U3WEtETm05QjdZcTNlSjRvaFVPZ2JFQjZZYVNYNU5ENnZXWDFLS2lWZWRoMGZTc3UKVEQyTFBSYVNqSXVlOXNpOERxWWR5aVlPVlNETFl1bzNzTnB3MmkwK1hJd0FnQVJQd215YzdGUVR3ckxxcDdPRgpsZVowejdndlQ5NHB3REhpZXJRdGVNSlZ5cXkrenRvcnA3bXZHNXEzV0Jtc3ZVRFByVytiRHlFRFozKzVlMXpZCkVXaWtQeDRwclRQb2RCaHNVWG1ZRVNQMzhsd0dTN2xNZVJabnBwck9oWlk4MGVzcXFHUyt2YndIbmpaOEhQc3kKZDlkaStJWDBrTXoyUHBWWmJVK1Q4a3FZM1F6blZ6Qm13OEtSd2czRi8wMm5raVNzU09JbEU4NGRtMzJJY1JOKwpZamp1ZWZuVnNKL3JralE4eUVFQ0F3RUFBYU5DTUVBd0RnWURWUjBQQVFIL0JBUURBZ0trTUE4R0ExVWRFd0VCCi93UUZNQU1CQWY4d0hRWURWUjBPQkJZRUZJVjhCSUN2a01QelkyYmZVdnRFdWgybHV4OFVNQTBHQ1NxR1NJYjMKRFFFQkN3VUFBNElCQVFCOFExMkxiLzcvcGRXZDNuWjEyMUFobS9QZFdHbkxLSWVqdUtxbEVVRWc5cFJEcGI5Mwppbjg4TmpIVFRnY2ZScE5zbzZjYnJmUEtCRW10Sk9XRjRFWWdDdThXb0loV0ZPWXRqckdKZUtkOGhTbS9XY2M3Cm9nN1YxKzQ0MkxsYS81Wk9SRHlmRmhTeThtRit3ZnBoQ25mTklGUW4veGY2ME1WWWJ3YkJhL3ord0J2Uis4UmgKTS91NG9hNFU5aUhDRkE4UFhOU0ZKUGdWdVFSUU5lSDNOSDhrU1FtSk9MbC95MWRmYXoxMFlQWmNsSkZFQ1pRegpobXFPMGpMR29QbVlERGtrY0E5NTdCa1NRTTRvSy9nQkdmSENpOU1UTFdHaCtRNDRyZXFTbjBOQWQvYzM3Z0g3Cm1XL0tqeDkzRlJCdnAzcUdLeklVaWFjSU5XUE9DTWdjMUNsZwotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==
    server: ""
  name: kubernetes
contexts: null
current-context: ""
kind: Config
preferences: {}
users: null

设置客户端认证参数

kubectl config set-credentials userdev --client-certificate=/etc/kubernetes/pki/userdev.pem --client-key=/etc/kubernetes/pki/userdev-key.pem --embed-certs=true --kubeconfig=userdev.kubeconfig
[root@master cert]# cat userdev.kubeconfig 
apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUM1ekNDQWMrZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwcmRXSmwKY201bGRHVnpNQjRYRFRJd01USXdNVEF4TXpJMU4xb1hEVE13TVRFeU9UQXhNekk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kZFQ1pRegpobXFPMGpMR29QbVlERGtrY0E5NTdCa1NRTTRvSy9nQkdmSENpOU1UTFdHaCtRNDRyZXFTbjBOQWQvYzM3Z0g3Cm1XL0tqeDkzRlJCdnAzcUdLeklVaWFjSU5XUE9DTWdjMUNsZwotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==
    server: ""
  name: kubernetes
contexts: null
current-context: ""
kind: Config
preferences: {}
users:
- name: userdev
  user:
    client-certificate-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURoRENDQW15Z0F3SUJBZ0lVZWhLUU9EV3IrQ0VJVTQzQUNaNWwvYnZvb0RJd0RRWUpLb1pJaHZjTkFRRUwKQlFBd0ZURVRNQkVHQTFVRUF4TUthM1ZpWlhKdVpYUmxjekFlRncweU1ERXlNRFF3TXpJNE1EQmFGdzB5TVRFeQpNRFF3TXpJNE1EQmFNR0l4Q3pBSkJnTlZCQVlUQWtOT01SQXdEZ1lEVlFRSUV3ZENaV2xLYVc1bk1SQXdEZ1lEClZRUUhFd2RDWldsS2FXNW5NUXd3Q2dZRFZRUUtFd05yT0hNeER6QU5CZ05WQkFzVEJsTjVjM1JsYlRFUU1BNEcKQTFVRUF4TUhkWE5sY21SbGRqQ0NBU0l3RFFZSktvWklodmNOQVFFQkJRQURnZ0VQQURDQ0FRb0NnZ0VCQUtFQgp6M0Y3UHBwWlNsWElWNUMzMmpzOEtSSnhKekxlYmVMMDkrNEVycFJlSEhDNlh4b1o2ZWxVbGg1aGxVUndCQ3BXCmpQUllIU0Q2Znd1RDJxMWRpWGcwSVBZRWRqdm9aTVF2NS9FN3Z0bXNWOXIxS0dzTE1wWjJFYmlCUmVPY0dFZ3UKUTkzZDh2cllqd1VhSWduSHZRd3NXMWp2TGF0QUY3dmtSUlQ1R2tlOUIvNENxYy9kNUQzNDh0anozRXpvQnBFMAoyVlAxbEFpVHhmWXU5cFQ1Z1c1QUQvcVh5bUJsRVBEVm0vcSswdW9DWWNyU0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0tCg==

设置上下文参数

kubectl create ns dev
kubectl config set-context kubernetes --cluster=kubernetes --user=userdev --namespace=dev --kubeconfig=userdev.kubeconfig
[root@master cert]# cat userdev.kubeconfig 
apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUM1ekNDQWMrZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwcmRXSmwKY201bGRHVnpNQjRYRFRJd01USXdNVEF4TXpJMU4xb1hEVE13TVRFeU9UQXhNekkxTjFvd0ZURVRNQkVHQTFVRQpBeE1LYTNWaVpYSnVaWFJsY3pDQ0FTSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnRVBBRENDQVFvQ2dnRUJBTjBMCldmbUJIdEc5a2lycVZ4U3U3WEtETm05QjdZcTNlSjRvaFVPZ2JFQjZZYVNYNU5ENnZXWDFLS2lWZWRoMGZTc3UKVEQyTFBSYVNqSXVlOXNpOERxWWR5aVlPVlNETFl1bzNzTnB3MmkwK1hJd0FnQVJQd215YzdGUVR3ckxxcDdPRgpsZVowejdndlQ5NHB3REhpZXJRdGVNSlZ5cXkrenRvcnA3bXZHNXEzV0Jtc3ZVRFByVytiRHlFRFozKzVlMXpZCkVXaWtQeDRwclRQb2RCaHNVWG1ZRVNQMzhsd0dTN2xNZVJabnBwck9oWlk4MGVzcXFHUyt2YndIbmpaOEhQc3kKZDlkaStJWDBrTXoyUHBWWmJVK1Q4a3FZM1F6blZ6Qm13OEtSd2czRi8wMm5raVNzU09JbEU4NGRtMzJJY1JOKwpZamp1ZWZuVnNKL3JralE4eUVFQ0F3RUFBYU5DTUVBd0RnWURWUjBQQVFIL0JBUURBZ0trTUE4R0ExVWRFd0VCCi93UUZNQU1CQWY4d0hRWURWUjBPQkJZRUZJVjhCSUN2a01QelkyYmZVdnRFdWgybHV4OFVNQTBHQ1NxR1NJYjMKRFFFQkN3VUFBNElCQVFCOFExMkxiLzcvcGRXZDNuWjEyMUFobS9QZFdHbkxLSWVqdUtxbEVVRWc5cFJEcGI5Mwppbjg4TmpIVFRnY2ZScE5zbzZjYnJmUEtCRW10Sk9XRjRFWWdDdThXb0loV0ZPWXRqckdKZUtkOGhTbS9XY2M3Cm9nN1YxKzQ0MkxsYS81Wk9SRHlmRmhTeThtRit3ZnBoQ25mTklGUW4veGY2ME1WWWJ3YkJhL3ord0J2Uis4UmgKTS91NG9hNFU5aUhDRkE4UFhOU0ZKUGdWdVFSUU5lSDNOSDhrU1FtSk9MbC95MWRmYXoxMFlQWmNsSkZFQ1pRegpobXFPMGpMR29QbVlERGtrY0E5NTdCa1NRTTRvSy9nQkdmSENpOU1UTFdHaCtRNDRyZXFTbjBOQWQvYzM3Z0g3Cm1XL0tqeDkzRlJCdnAzcUdLeklVaWFjSU5XUE9DTWdjMUNsZwotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==
    server: ""
  name: kubernetes
contexts:
- context:
    cluster: kubernetes
    namespace: dev
    user: userdev
  name: kubernetes
current-context: ""
kind: Config
preferences: {}
users:
- name: userdev
  user:
    client-certificate-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURoRENDQW15Z0F3SUJBZ0lVZWhLUU9EV3IrQ0VJVTQzQUNaNWwvYnZvb0RJd0RRWUpLb1pJaHZjTkFRRUwKQlFBd0ZURVRNQkVHQTFVRUF4TUthM1ZpWlhKdVpYUmxjekFlRncweU1ERXlNRFF3TXpJNE1EQmFGdzB5TVRFeQpNRFF3TXpJNE1EQmFNR0l4Q3pBSkJnTlZCQVlUQWtOT01SQXdEZ1lEVlFRSUV3ZENaV2xLYVc1bk1SQXdEZ1lEClZRUUhFd2RDWldsS2FXNW5NUXd3Q2dZRFZRUUtFd05yT0hNeER6QU5CZ05WQkFzVEJsTjVjM1JsYlRFUU1BNEcKQTFVRUF4TUhkWE5sY21SbGRqQ0NBU0l3RFFZSktvWklodmNOQVFFQkJRQ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qcXVBZnJQRC9pSGdkbGtXVHluaUkrMHBWazQvcG1JUjVPN29CdC9aNUdDNGNFdk9ERUQvWG9PQVpGCi9ZTklkUUtCZ0RXMXFtNHAzNGRlL25IdzB6SUs2a2hLU0xGVEYydTBWWS9UMkxsTHU2LzhBS2YwZWZWa1JUaVQKcU1FSm0xUGlBMzhkdXJIdVFGOGtENmJiTW4rMEVMRXQxS05HbHBRVmUwNE1mSFl1cEJZRzdnNjBDalozTTIrSgpJSS9XOHNDVkgxZllNc2dtU0duc3V0Z1QwT1VCaXRBV3dscmVWN1dyM0lVVkwwU1I0aGRlCi0tLS0tRU5EIFJTQSBQUklWQVRFIEtFWS0tLS0tCg==
[root@master cert]# kubectl create rolebinding userdev-admin-binding --clusterrole=admin --user=userdev --namespace=dev
rolebinding.rbac.authorization.k8s.io/userdev-admin-binding created

本文链接: http://www.dtmao.cc/news_show_450109.shtml

附件下载

相关教程

    暂无相关的数据...

共有条评论 网友评论

验证码: 看不清楚?