__director

2021年2月23日

docker harbor 保存chart.tgz 包

摘要: heml version: helm3 harbor 需要装插件。 helm 需要安装helml-push 插件 helm plugin install https://github.com/chartmuseum/helm-push.git 或者 wget https://github.com/c 阅读全文

posted @ 2021-02-23 21:43 __director 阅读(150) 评论(0) 推荐(0) 编辑

2021年2月22日

kubernetes 获取deployment在使用的镜像(不全)

摘要: for i in `kubectl get deployments.apps | awk 'NR>1{print $1}'`;do kubectl get deployment $i -o jsonpath="{.spec.template.spec.containers[0].image}" ; 阅读全文

posted @ 2021-02-22 20:06 __director 阅读(603) 评论(0) 推荐(0) 编辑

kubernetes get deployment xxx -o yaml > deployment.yaml

摘要: 过滤噪音 for i in `ls $1`;do sed -i '/{}/d' $1\/$i sed -i '/^status:/,$d' $1\/$i sed -i '/managedFields:/,/manager: kube-controller-manager/d' $1\/$i sed 阅读全文

posted @ 2021-02-22 20:02 __director 阅读(123) 评论(0) 推荐(0) 编辑

镜像清理

摘要: #!/usr/bin/env bash#Author: 原件#Data: 2020/12/30#Description: 清理无标签的镜像,保留a56爆大奖在线娱乐镜像最新的5个tag。 docker system prune -f docker images | awk '{print $1}' | awk '{ 阅读全文

posted @ 2021-02-22 20:00 __director 阅读(43) 评论(0) 推荐(0) 编辑

2021年2月20日

kubectl get cm XXXX -o yaml 出现换行符 \n \n

摘要: 解决办法 kubectl get -n kube-system -o yaml cm aws-auth | sed -E 's/[[:space:]]+\\n/\\n/g' | kubectl apply -f - 或者原文件 sed -i -E 's/[[:space:]]+\\n/\\n/g' 阅读全文

posted @ 2021-02-20 23:25 __director 阅读(1464) 评论(0) 推荐(0) 编辑

2021年2月10日

shell 99乘法表

摘要: #!/bin/bash for (( i=1;i<=9;i++)) do for ((j=1;j<=i;j++)) do let sum=i*j printf "%-8s" $j"x"$i=$sum done echo done #!/bin/bash for(( i=1 ;i<=9;i++ )) 阅读全文

posted @ 2021-02-10 11:34 __director 阅读(97) 评论(0) 推荐(0) 编辑

python 输出99乘法表

摘要: i = 1while i <= 9: i += 1 j = 1 while j <= i-1: print("{}*{}=".format(j,i-1),j*(i-1),sep='',end=' ') j += 1 print('') for i in range(1,10): for y in r 阅读全文

posted @ 2021-02-10 11:28 __director 阅读(72) 评论(0) 推荐(0) 编辑

2020年6月14日

nignx-configmap

摘要: apiVersion: apps/v1 kind: Deployment metadata: name: nginx spec: replicas: 1 selector: matchLabels: app: nginx template: metadata: labels: app: nginx 阅读全文

posted @ 2020-06-14 18:07 __director 阅读(365) 评论(0) 推荐(0) 编辑

2020年6月9日

Cluster health status changed from [RED] to [YELLOW] (reason: [shards started [[.kibana_1][0], [.kibana_task_manager][0]] ...])

摘要: 1. curl http://192.168.12.128:9200/_cat/health?v 2. http://192.168.1.33:9200/_cat/shards 3. curl -XPUT http://192.168.12.128:9200/_settings?pretty -d 阅读全文

posted @ 2020-06-09 08:55 __director 阅读(5105) 评论(0) 推荐(0) 编辑

2020年5月31日

mysql-deployment

摘要: apiVersion: apps/v1 kind: Deployment metadata: name: mysql2 spec: replicas: 1 selector: matchLabels: app: mysql2 template: metadata: labels: app: mysq 阅读全文

posted @ 2020-05-31 14:57 __director 阅读(312) 评论(0) 推荐(0) 编辑

导航