Skip to content

Instantly share code, notes, and snippets.

View yankay's full-sized avatar
🦆
I love nature

Kay Yan yankay

🦆
I love nature
  • DaoCloud
  • Shanghai, China
  • 14:32 (UTC +08:00)
  • LinkedIn in/yankay
View GitHub Profile
@yankay
yankay / gist:0b2c5dbe278ae85be2a079acd51bd52d
Last active July 20, 2022 10:57
快速 安装 metallb
cd /tmp
wget https://codeload.github.com/metallb/metallb/tar.gz/refs/tags/v0.13.3
mv v0.13.3 v0.13.3.tar.gz
tar -zxvf v0.13.3.tar.gz
cd metallb-0.13.3/
cat config/manifests/metallb-native.yaml |sed 's/quay/quay.m.daocloud/g' | kubectl apply -f -
cd /tmp
tee -a m.yaml <<EOF
@yankay
yankay / gist:1984c6e6ea90535772fc94712106baaf
Last active April 19, 2022 05:18
快速安装 argocd(kind)
#需要先安装 metallb
kubectl create namespace argocd
wget https://ghproxy.com/https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
cat install.yaml | sed 's/image: quay.io/image: quay.m.daocloud.io/g' | sed 's/image: ghcr.io/image: ghcr.m.daocloud.io/g' | sed 's/image: redis/image: docker.m.daocloud.io\/redis/g' > i.yaml
kubens argocd
kubectl apply -n argocd -f i.yaml
kubectl patch svc argocd-server -n argocd -p '{"spec": {"type": "LoadBalancer"}}'
#安装命令行
@yankay
yankay / gist:fc37052a8119f5d053e14bc5b1aff7d6
Created April 2, 2022 03:38
快速安装 kuard (比 2048 更好用)
```
apiVersion: apps/v1
kind: Deployment
metadata:
name: kuard
spec:
selector:
matchLabels:
run: kuard
replicas: 2
@yankay
yankay / gist:85423451ec8b5e6c3e9ded1ed73e6bce
Last active April 20, 2022 06:37
快速安装 tekton
## 安装 pipeline
wget https://ghproxy.com/https://github.com/tektoncd/pipeline/releases/download/v0.34.1/release.yaml
cat release.yaml | sed 's/gcr.io/gcr.m.daocloud.io/g' | sed -E 's/@sha256:[0-9a-f]{64}//g' | sed 's/distroless\/base"/distroless\/base:debug"/g'> r.yaml
kubectl apply -f r.yaml
kubectl get pods --namespace tekton-pipelines --watch
##安装 命令行
@yankay
yankay / gist:8fda9bf83d08d5bcd9f7399a935b7bae
Last active April 24, 2022 03:14
快速安装 argocd workflow(kind)
#安装 argo
kubectl create ns argo
wget https://ghproxy.com/https://raw.githubusercontent.com/argoproj/argo-workflows/master/manifests/quick-start-postgres.yaml
cat quick-start-postgres.yaml | sed 's/image: quay.io/image: quay.m.daocloud.io/g' | sed 's/image: minio/image: docker.m.daocloud.io\/minio/g' | sed 's/image: postgres/image: docker.m.daocloud.io\/postgres/g' > qs.yaml
kubectl apply -n argo -f qs.yaml
#安装 命令行
curl -sLO https://ghproxy.com/https://github.com/argoproj/argo-workflows/releases/download/v3.3.2/argo-linux-amd64.gz
@yankay
yankay / gist:19f79b30dfe40a1ba771c69f9dff44a6
Last active May 9, 2022 06:23
快速安装 kubectl (centos)
export KUBE_VERSION="1.22.1"
# 安装 Kubectl
cat <<EOF > /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/
enabled=1
gpgcheck=1
# 安装 命令行
cd /tmp
https://ghproxy.com/https://github.com/fluxcd/flux2/releases/download/v0.30.2/flux_0.30.2_linux_amd64.tar.gz
tar -xzvf flux_0.30.2_linux_amd64.tar.gz
mv flux /usr/local/bin/
# 安装 flux
flux install
@yankay
yankay / gist:9640743be589d7565871eb9ec6eaa73f
Last active May 9, 2022 09:47
Flux Helm Controller 一键安装
# 安装 命令行
cd /tmp
https://ghproxy.com/https://github.com/fluxcd/flux2/releases/download/v0.30.2/flux_0.30.2_linux_amd64.tar.gz
tar -xzvf flux_0.30.2_linux_amd64.tar.gz
mv flux /usr/local/bin/
# 只安装 helm controller
flux install --components=source-controller,helm-controller
@yankay
yankay / gist:43bf4b1b87c5b68b25473aea30c76914
Created May 13, 2022 14:06
快速配置 docker-ce 和 kube 的 apt源 (Ubuntu)
sudo apt-get update
sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common
# step 2: 安装GPG证书
curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
# Step 3: 写入Docker软件源信息
sudo add-apt-repository "deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
# Set 4: 写入Kube软件源信息
@yankay
yankay / 00readme.txt
Last active August 5, 2025 08:07
快速 启动一套 kubespray 集群(Ubuntu)
# 安装 kubespray
cd /opt
git clone https://github.com/kubernetes-sigs/kubespray.git
cd kubespray
pip3 install -r requirements.txt -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
# 配置集群
# Copy ``inventory/sample`` as ``inventory/mycluster``
cp -rfp inventory/sample inventory/mycluster