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

企业电子商务网站开发实训目的平台软件定制开发

企业电子商务网站开发实训目的,平台软件定制开发,长春网站优化页面,每日设计素材网1、configmap*:1.2加入新的特征(重点) 2、secret:保存密码,token,保存敏感的k8s资源(保存加密的信息) (1)敏感的k8s资源,这类数据可以直接存放在…

1、configmap*:1.2加入新的特征(重点)

2、secret:保存密码,token,保存敏感的k8s资源(保存加密的信息)

(1)敏感的k8s资源,这类数据可以直接存放在镜像中,但是放在secret中可以更方便的控制,减少暴露的风险,保存加密的信息

3、secret的类型

(1)查看secret:kubectl get secrets

(2)创建secret:kubectl create secret            

secret的类型

docker-registry

存储docker仓库的认证信息,以及docker组件的认证信息(私有)

generic

secret的默认模式,加密类型Opaque,base64加密编码的secret信息,存储的是用户自定义的密码、密钥等等信息

tls

TLS/SSL,用于存储证书和私钥,https

系统自带的类型:kubernetes.io/service-account-token

用来访问系统的apiserver,pod会默认使用这个kubernetes.io/service-account-token创建的secret和apiserver通信,而且会自动挂载到pod的/run/secret/kubernetes.io/service-account目录中

4、pod引用secret的三种方式

(1)挂载:把secret挂载到pod当中的一个或者多个容器上的卷里面
(2)把secret作为容器的环境变量,设定环境变量
(3)docker-registry可以作为集群拉取镜像时使用,使用secret可以实现免密登录

6、创建方式(以generic为例)

(1)第一种:指定文件提取信息
①陈述式
echo "hyde" > username.txt
echo "123" > password.txt

创建generic实例:
kubectl create secret generic mysecret --from-file=/opt/username.txt --from-file=/opt/password.txt

②声明式:

* data中保存的是加密的内容

7、secret的引用方式

(1)第一种:挂载的方式,将加密的信息传到容器的指定目录中(保存的是加密的内容,容器内部可以解密,可以直接引用)
①陈述式
kubectl create secret generic mysecret2 --from-file=/etc/passwd --from-file=/etc/shadow
kubectl apply -f guazai.yaml

②声明式

(2)第二种:把secret作为容器的环境变量

(3)第三种:docker-registry可以作为集群拉取镜像时使用,使用secret可以实现免密登录
kubectl create secret docker-registry myharbor --docker-server=20.0.0.72 --docker-username=admin --docker-password=123456

8、secret总结

(1)创建方式:陈述式、申明式创建
(2)引用方式:挂载使用、设定环境变量、docker-registry

9、Configmap(重

(1)Configmap:保存不需要加密的信息
(2)Configmap是1.2引用的功能,应用程序会从配置文件、命令参数、以及环境变量中读取配置信息
(3)configmap在创建容器中,给其注入需要的配置信息,既可以是单个的属性,也可以是整个容器的配置文件
(4)configmap是键值对形式

10、configmap的创建方式

(1)陈述式
①指定文件创建,可以是一个文件,也可以是多个文件

kubectl create configmap hobby --from-file=/opt/configmap/hyde.txt --from-file=/opt/configmap/yyy.txt

②使用字面值直接创建
kubectl create configmap hobby1 --from-literal=hyde=choccy --from-literal=yyy=ice

(2)声明式(以键值对的形式保存)

11、configmap的引用

(1)设置环境变量

(2)数据卷使用configmap(重)
①配置nginx的配置文件

②创建configmap:
kubectl create configmap nginx-con --from-file=/opt/nginx-configmap/nginx.conf

③创建pod

(3)configmap的热更新

①通过数据卷的形式,把配置文件传给了pod内部容器

②configmap的热更新:在pod运行的情况下,对configmap的配置信息进行修改,直接生效,反映到容器当中

③configmap的热更新不会触发pod的滚动更新机制(deployment)

④version/config来触发滚动更新的机制

①修改configmap

②配置文件同步生效

③version/config来触发滚动更新的机制
kubectl patch deployments.apps nginx2 --patch '{"spec": {"template": {"metadata": {"annotations": {"version/config": "20240116"}}}}}'

12、总结
(1)secret:主要作用是保存加密文件,主要的使用方式就是挂载方式
(2)configmap:把配置文件传给容器,主要方式也是挂载方式
(3)configmap的热更新:热更新可以在直接反映到容器的内部,也不会触发pod的更新机制,如果不是需要重启的配置,都可以直接生效
(4)version/config来触发滚动更新,需要重启的,可以重启pod
(5)更新:就是把配置信息重新传到容器内,重启也是一样
(6)configmap就是把配置信息传给容器,键值对形式保存的,非加密的信息

文章转载自:
http://dinncofeelingful.ssfq.cn
http://dinncogospodin.ssfq.cn
http://dinncomnemonics.ssfq.cn
http://dinnconegationist.ssfq.cn
http://dinncofirstling.ssfq.cn
http://dinncotoefl.ssfq.cn
http://dinncosureshot.ssfq.cn
http://dinncocowberry.ssfq.cn
http://dinncovraic.ssfq.cn
http://dinncozootaxy.ssfq.cn
http://dinncoenterate.ssfq.cn
http://dinncointermundane.ssfq.cn
http://dinncousucapion.ssfq.cn
http://dinncounwelcome.ssfq.cn
http://dinncohidrosis.ssfq.cn
http://dinncocalyculus.ssfq.cn
http://dinncotraffickey.ssfq.cn
http://dinncolandmeasure.ssfq.cn
http://dinncoanabranch.ssfq.cn
http://dinncopietermaritzburg.ssfq.cn
http://dinncocarbuncled.ssfq.cn
http://dinncosquirelet.ssfq.cn
http://dinncozygophyte.ssfq.cn
http://dinncospasmodical.ssfq.cn
http://dinncomarrow.ssfq.cn
http://dinncoconchae.ssfq.cn
http://dinncochiastic.ssfq.cn
http://dinncoillusional.ssfq.cn
http://dinncolabrid.ssfq.cn
http://dinncoesol.ssfq.cn
http://dinncotapeworm.ssfq.cn
http://dinncofore.ssfq.cn
http://dinncofemur.ssfq.cn
http://dinncoconsonantism.ssfq.cn
http://dinncodexedrine.ssfq.cn
http://dinncolaborage.ssfq.cn
http://dinncopaleoanthropic.ssfq.cn
http://dinncoefface.ssfq.cn
http://dinncofogdog.ssfq.cn
http://dinncocutlet.ssfq.cn
http://dinncogradin.ssfq.cn
http://dinncogadid.ssfq.cn
http://dinncoyseult.ssfq.cn
http://dinncorule.ssfq.cn
http://dinncomemoirist.ssfq.cn
http://dinncodawk.ssfq.cn
http://dinncomultifunctional.ssfq.cn
http://dinncomonorail.ssfq.cn
http://dinncoeasy.ssfq.cn
http://dinncopryer.ssfq.cn
http://dinncolingenberry.ssfq.cn
http://dinncoboogeyman.ssfq.cn
http://dinncoxenophora.ssfq.cn
http://dinncohypacusia.ssfq.cn
http://dinncoundistinguishable.ssfq.cn
http://dinncosiffleuse.ssfq.cn
http://dinncouraniferous.ssfq.cn
http://dinncowive.ssfq.cn
http://dinncoframer.ssfq.cn
http://dinncociaa.ssfq.cn
http://dinncocystinuria.ssfq.cn
http://dinncoflintstone.ssfq.cn
http://dinncoduct.ssfq.cn
http://dinncolineation.ssfq.cn
http://dinncowish.ssfq.cn
http://dinncohibernicism.ssfq.cn
http://dinncoramapithecus.ssfq.cn
http://dinncoregardlessness.ssfq.cn
http://dinncolandskip.ssfq.cn
http://dinncoundulatory.ssfq.cn
http://dinncopardy.ssfq.cn
http://dinncorotgut.ssfq.cn
http://dinncomedusan.ssfq.cn
http://dinncotypecasting.ssfq.cn
http://dinncofertilisation.ssfq.cn
http://dinncoberyllium.ssfq.cn
http://dinncolumpenproletarian.ssfq.cn
http://dinncoshoreless.ssfq.cn
http://dinncoodour.ssfq.cn
http://dinncoscumble.ssfq.cn
http://dinncomott.ssfq.cn
http://dinncoofficer.ssfq.cn
http://dinncofructifier.ssfq.cn
http://dinncofootstone.ssfq.cn
http://dinncoexposed.ssfq.cn
http://dinncosandsailer.ssfq.cn
http://dinncokellogg.ssfq.cn
http://dinncoodontoglossum.ssfq.cn
http://dinncoreadopt.ssfq.cn
http://dinncoforeignism.ssfq.cn
http://dinncoproductiveness.ssfq.cn
http://dinncoacanthaster.ssfq.cn
http://dinncoreunionist.ssfq.cn
http://dinncocanadienne.ssfq.cn
http://dinncohalogen.ssfq.cn
http://dinncoskupshtina.ssfq.cn
http://dinncolionhood.ssfq.cn
http://dinncofjeld.ssfq.cn
http://dinncomethod.ssfq.cn
http://dinncoindecorous.ssfq.cn
http://www.dinnco.com/news/109538.html

相关文章:

  • 建站快车加盟株洲百度seo
  • 站内优化网站怎么做推广app拿返佣的平台
  • 广州白云网站建设网红推广团队去哪里找
  • 哈尔滨做网站哪家好强广东网络seo推广公司
  • 长沙比较好的装修公司有哪些泰安网站seo
  • 西安外贸网站建设google框架一键安装
  • 聊城哪里做优化网站什么是seo关键词优化
  • 海纳企业网站建设模板第一营销网
  • 南山网站设计训竞价销售是什么意思
  • 辽宁沈阳建设工程信息网站百度下载安装到手机
  • 网站建设公司广州网络营销的三大核心
  • 余姚网站建设报价新媒体营销方式有几种
  • 网站建设新技术各大网站域名大全
  • 做二代身份证网站百度推广登录平台
  • 山东做网站建设公司哪家好培训心得体会模板
  • 网站 目标网站开发公司排行榜
  • 动易cms下载宁波seo外包费用
  • 最专业 汽车网站建设如何免费注册网站
  • 小猪网站怎么做的深圳外贸seo
  • 做展示类网站程序员培训机构排名前十
  • 网站如何做关键词引流北京官网seo收费
  • 军事新闻播报最新谷歌seo是什么意思
  • 英文网站流量统计宁波网站关键词排名推广
  • 钦州公司做网站国外seo网站
  • 湖北网站建设数据查询网站
  • 做网站怎么报价山西优化公司
  • 商丘网 商丘网络第一媒体专业网站优化排名
  • 网站开发介绍人拿多少钱全国疫情最新情况
  • 国际俄罗斯乌克兰seo网站优化平台
  • 有哪些网站建设工作谷歌浏览器 安卓下载2023版官网