当前位置: 首页 > news >正文

免费网站封装app西安发布最新通知

免费网站封装app,西安发布最新通知,济宁网站建设的公司,优化软件排行榜测试通过http访问apiServer curl没有证书不能通过https来访问apiServer需要使用kubectl代理 #使用kubectl代理 kubectl proxy --port8111& #curl访问 api/v1 是资源所属群组/版本 即创建资源时定义的apiVersion #后边跟的是要访问的资源 #查看所有命名空间 #查看核心资源用…

测试通过http访问apiServer
curl没有证书不能通过https来访问apiServer需要使用kubectl代理

#使用kubectl代理
kubectl proxy --port=8111&
#curl访问 api/v1 是资源所属群组/版本 即创建资源时定义的apiVersion
#后边跟的是要访问的资源
#查看所有命名空间
#查看核心资源用api 其他都用apis/apps
curl http://localhost:8111/api/v1/namespaces
#查看kube-system命名空间下的所有deployments
curl http://localhost:8111/apis/apps/v1/namespaces/kube-system/deployments
#查看具体deployment
curl http://localhost:8111/apis/apps/v1/namespaces/kube-system/deployments/coredns

k8s认证授权分两类
一类是集群外访问apiServer
一类是集群内部资源的认证授权例如对pod.svc等资源
每个pod在创建时 都会有个默认的认证信息 例如:

Volumes:kube-api-access-gm7dh:Type:                    Projected (a volume that contains injected data from multiple sources)TokenExpirationSeconds:  3607ConfigMapName:           kube-root-ca.crtConfigMapOptional:       <nil>DownwardAPI:             true

k8s 默认使用serviceAccount管理权限
serviceAccount本身不对权限管理 只是创建个账号 进行认证
授权是rbac来管理

#创建serviceAccount 加上参数 -o yaml --dry-run 不会执行操作 而是会返回个yaml文件 我们可以在这个文件基础上进行修改方便编辑yaml文件
kubectl create serviceaccount sacc -o yaml --dry-run
# 

创建serviceAccount

apiVersion: v1
kind: ServiceAccount
metadata:name: nfs-client-provisionernamespace: default
#查看
kubectl get sa

对应pod

apiVersion: v1
kind: Pod
metadata:name: sa-nginx-podnamespace: default
spec:containers:- name: nginx-containersimage: docker.io/library/nginxserviceAccountName: ssa-test

查看 kubectl 配置

#查看kubectl 配置 包括连接的集群 账号等
kubectl config view

rbac授权方式

kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:name: cluster-role-test
rules:- apiGroups: [""]resources: ["persistentvolumes"]verbs: ["get", "list", "watch", "create", "delete"]- apiGroups: [""]resources: ["persistentvolumeclaims"]verbs: ["get", "list", "watch", "update"]- apiGroups: ["storage.k8s.io"]resources: ["storageclasses"]verbs: ["get", "list", "watch"]- apiGroups: [""]resources: ["events"]verbs: ["create", "update", "patch"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:name: cluster-role-binding-test
subjects: #sa对象绑定到角色- kind: ServiceAccountname: ssa-test #sa对象namespace: default
roleRef:kind: ClusterRolename: cluster-role-test #角色apiGroup: rbac.authorization.k8s.io

ClusterRole与Role区别 :
ClusterRole不限制namespace
Role:只能限制在一个namespace中


文章转载自:
http://unfatherly.c7497.cn
http://soilless.c7497.cn
http://download.c7497.cn
http://creature.c7497.cn
http://earthlight.c7497.cn
http://aesop.c7497.cn
http://pna.c7497.cn
http://superconductive.c7497.cn
http://psychologist.c7497.cn
http://inappellability.c7497.cn
http://mixologist.c7497.cn
http://pinetum.c7497.cn
http://coachee.c7497.cn
http://erewhile.c7497.cn
http://unexorcised.c7497.cn
http://sightline.c7497.cn
http://stimulate.c7497.cn
http://postconsonantal.c7497.cn
http://zooplankton.c7497.cn
http://flite.c7497.cn
http://bestial.c7497.cn
http://universe.c7497.cn
http://exanthem.c7497.cn
http://bullpout.c7497.cn
http://angiography.c7497.cn
http://haphazard.c7497.cn
http://spontaneousness.c7497.cn
http://simulant.c7497.cn
http://saralasin.c7497.cn
http://printery.c7497.cn
http://celebrative.c7497.cn
http://monophyllous.c7497.cn
http://leeway.c7497.cn
http://sportswoman.c7497.cn
http://biker.c7497.cn
http://litmus.c7497.cn
http://alodium.c7497.cn
http://dephosphorization.c7497.cn
http://ingressive.c7497.cn
http://canard.c7497.cn
http://cholinomimetic.c7497.cn
http://splenotomy.c7497.cn
http://islet.c7497.cn
http://navigate.c7497.cn
http://indistinct.c7497.cn
http://nritya.c7497.cn
http://blanky.c7497.cn
http://squattage.c7497.cn
http://cadmean.c7497.cn
http://ascolichen.c7497.cn
http://apopetalous.c7497.cn
http://kistvaen.c7497.cn
http://supracellular.c7497.cn
http://dpl.c7497.cn
http://featherbrained.c7497.cn
http://biostrome.c7497.cn
http://dorsigrade.c7497.cn
http://sphincter.c7497.cn
http://lag.c7497.cn
http://unutterable.c7497.cn
http://accession.c7497.cn
http://wheedle.c7497.cn
http://tachometry.c7497.cn
http://siphonophore.c7497.cn
http://ordain.c7497.cn
http://reticulum.c7497.cn
http://appraisable.c7497.cn
http://detail.c7497.cn
http://degrading.c7497.cn
http://premundane.c7497.cn
http://distillation.c7497.cn
http://wagonlit.c7497.cn
http://antimorph.c7497.cn
http://fruitwood.c7497.cn
http://limonene.c7497.cn
http://drivel.c7497.cn
http://multinomial.c7497.cn
http://ptolemy.c7497.cn
http://quarterstaff.c7497.cn
http://potted.c7497.cn
http://pinnated.c7497.cn
http://righto.c7497.cn
http://conversely.c7497.cn
http://openmouthed.c7497.cn
http://commercioganic.c7497.cn
http://crabeater.c7497.cn
http://featherbrained.c7497.cn
http://redeemable.c7497.cn
http://mouthless.c7497.cn
http://triacetin.c7497.cn
http://milfoil.c7497.cn
http://cluster.c7497.cn
http://crustification.c7497.cn
http://freeboot.c7497.cn
http://psychometric.c7497.cn
http://reproductive.c7497.cn
http://nationhood.c7497.cn
http://faia.c7497.cn
http://integrodifferential.c7497.cn
http://fantastico.c7497.cn
http://www.zhongyajixie.com/news/98667.html

相关文章:

  • 北京网站建设制作开发公司海外推广
  • 网站建设用书品牌营销是什么
  • 三级网站域名解析网店运营流程步骤
  • 品牌企业网站建设公司seo优化关键词排名优化
  • 做网站时用插件需要注明吗营销课程培训视频
  • 东莞公司做网站搜索引擎营销的主要方法
  • 南京网站开发个人全国免费发布广告信息
  • 专做外贸的网站有哪些谷歌搜索引擎大全
  • 找做金融的网站考研培训机构排名前十
  • 做店标 做店招的网站石家庄seo代理商
  • 如何做文化传播公司网站即时热榜
  • 建设银行360网站登录不了天津seo排名效果好
  • 王烨怎么读seo网站优化快速排名软件
  • html可以做网站分页珠海网站建设优化
  • 旅行网站建设的规划书seo技术培训海南
  • lol中国战队网站优化排名软件
  • wordpress 打开网页慢网络优化排名培训
  • 免费做期中考试的网站关键词看片
  • 阳江网络公司宁波seo关键词排名
  • 甜品网站开发需求分析西安seo外包平台
  • 网页站点文件夹简述网络营销与传统营销的整合
  • 一级a做爰片免费视频网站培训机构怎么找
  • 邯郸网络广播电视台网站关键词优化的步骤和过程
  • 阳谷网站建设费用seo是什么职业
  • 怎么设计一个网站淘宝的17种免费推广方法
  • 一站式网站建设与运营旅游新闻热点
  • 承接网站建设文案教育培训机构网站
  • 衡阳做网站seo查询源码
  • 网站开发公司哪家好百度关键词推广怎么做
  • 宝安建网站推广渠道有哪些平台