This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #需要先安装 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"}}' | |
| #安装命令行 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ``` | |
| apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| name: kuard | |
| spec: | |
| selector: | |
| matchLabels: | |
| run: kuard | |
| replicas: 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## 安装 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 | |
| ##安装 命令行 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #安装 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 安装 命令行 | |
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 安装 命令行 | |
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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软件源信息 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 安装 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 |