【在Rancher中添加为中国区优化的k8s应用商店的步骤和方法】教程文章相关的互联网学习教程文章

在Rancher中添加为中国区优化的k8s应用商店的步骤和方法

1、停用 rancher 应用商店中的“Rancher官方认证”商店和“社区贡献”商店2、添加应用商店:名称 地址 分支======================================================library https://github.com/niusmallnan/rancher-catalog.git k8s-cncommunity https://github.com/rancher/community-catalog.git masterharbor ...

k8s 连接harbor 的私有仓库的两种方法 一种是secret 绑定到sa serviceaccount 账号下 一种是需要绑定到 imagePullSecrets: - name: boanbrowser【代码】

方法一:[root@npChain004 ~/broseryaml]# kubectl describe serviceaccount default Name: default Namespace: default Labels: <none> Annotations: <none> Image pull secrets: <none> Mountable secrets: default-token-rcfbj Tokens: default-token-rcfbj Events: <none> 方法二: imagePullSecrets: - name: boanbrowser原文:https://...

k8s中configmap的使用方法【代码】

??ConfigMaps允许您将配置构件与映像内容解耦,以保持容器化应用程序的可移植性。本文展示如何创建configmap,修改configmap以及如何把configmap应用于pod.创建configmap1.configmap的yaml文件 myconfigmap.yaml,内容如下apiVersion: v1 kind: ConfigMap metadata:name: special-confignamespace: default data:special.how: very --- apiVersion: v1 kind: ConfigMap metadata:name: env-confignamespace: default data:log_leve...

获取k8s admin token的方法【代码】

1.先创建 vim k8s-admin.yaml apiVersion: v1 kind: ServiceAccount metadata:name: dashboard-adminnamespace: kube-system --- kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1beta1 metadata:name: dashboard-admin subjects:- kind: ServiceAccountname: dashboard-adminnamespace: kube-system roleRef:kind: ClusterRolename: cluster-adminapiGroup: rbac.authorization.k8s.iokubectl apply -f k8s-ad...

K8s Master当作Node使用的方法【代码】

1、使用下面的命令操作使得master 可以作为node使用 承载podkubectl taint nodes --all node-role.kubernetes.io/master-可能会出现下面的结果 因为taint(master标记的污点已经被去掉了)没有关系taint "node-role.kubernetes.io/master" not found taint "node-role.kubernetes.io/master" not found2、可以用下面的 kubectl describe nodes master1 |grep Taint 命令确认一下taint已经没有了[root@master1 ~]# kubectl describe...

k8s正确删除pod的方法【代码】

[root@k8s-master ~]# kubectl get podsNAME READY STATUS RESTARTS AGE nginx-86c57db685-2nrfp 1/1 Running 0 48m nginx3-bc84fb766-vh8v5 1/1 Running 0 46m现在我想删除nginx先删除deployment:查询:[root@k8s-master ~]# kubectl get deploymentNAME READY UP-TO-DATE AVAILABLE AGE nginx 1/1 1 1 49m nginx3 1/1 ...