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
| 安装 HwameiStor 并启用 DRBD | |
| # 参考 https://github.com/hwameistor/documentation/blob/main/docs/02installation/01helm-chart.md | |
| # 安装 HwameiStor | |
| helm repo add daocloud https://release.daocloud.io/chartrepo/daocloud | |
| helm repo update | |
| helm upgrade hwameistor daocloud/hwameistor --install -n hwameistor --create-namespace --set k8sImageRegistry=quay.m.daocloud.io --set hwameistorImageRegistry=ghcr.m.daocloud.io | |
| # 安装 SC https://github.com/hwameistor/local-storage/blob/main/deploy/storageclass-lvm-ha.yaml |
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
| # 适用于 Ubuntu、x86 和 arm版本 | |
| export POD_CIDR="192.168.0.0/16" | |
| export K8S_GCR_REPO=k8s-gcr.m.daocloud.io | |
| # 配置内核 | |
| cat <<EOF | sudo tee /etc/modules-load.d/k8s.conf | |
| br_netfilter | |
| 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
| # https://longhorn.io/docs/1.3.0/deploy/install/#installation-requirements | |
| cd /tmp | |
| wget http://ghproxy.com/https://raw.githubusercontent.com/longhorn/longhorn/v1.3.0/scripts/environment_check.sh | |
| cat environment_check.sh| sed 's/image: alpine/image: docker.m.daocloud.io\/alpine/g' > e.sh | |
| bash e.sh | |
| https://longhorn.io/docs/1.3.0/deploy/install/install-with-kubectl/ |
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 "http://ghproxy.com/https://raw.githubusercontent.com/rancher/local-path-provisioner/v0.0.24/deploy/local-path-storage.yaml" | |
| cat local-path-storage.yaml| sed 's/image: rancher/image: docker.m.daocloud.io\/rancher/g' | sed 's/image: busybox/image: docker.m.daocloud.io\/busybox/g' > l.yaml | |
| kubectl apply -f l.yaml | |
| kubectl annotate sc local-path storageclass.kubernetes.io/is-default-class=true |
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
| # 参考 https://docs.cilium.io/en/v1.9/gettingstarted/k8s-install-connectivity-test/ | |
| kubectl create ns cilium-test | |
| wget http://ghproxy.com/https://raw.githubusercontent.com/cilium/cilium/v1.9/examples/kubernetes/connectivity-check/connectivity-check.yaml | |
| cat connectivity-check.yaml| sed 's/image: docker.io\/cilium/image: quay.m.daocloud.io\/cilium/g' | sed 's/image: docker.io/image: docker.m.daocloud.io/g' > c.yaml | |
| kubectl apply -n cilium-test -f c.yaml | |
| kubectl get pods -n cilium-test |
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
| helm repo add node-feature-discovery https://kubernetes-sigs.github.io/node-feature-discovery/charts | |
| helm install node-feature-discovery -n node-feature-discovery node-feature-discovery/node-feature-discovery --set image.repository=gcr.m.daocloud.io/k8s-staging-nfd/node-feature-discovery --create-namespace |
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
| helm repo add addon https://release.daocloud.io/chartrepo/addon | |
| helm repo update | |
| helm upgrade --install metrics-server -n kube-system addon/metrics-server --set image.repository=k8s.m.daocloud.io/metrics-server/metrics-server --set defaultArgs="{--kubelet-insecure-tls,--cert-dir=/tmp,--kubelet-preferred-address-types=InternalIP\,ExternalIP\,Hostname}" --create-namespace | |
| kubectl get pods -n kube-system |grep metrics |
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
| wget https://ghproxy.com/github.com/aquasecurity/kube-bench/blob/main/job.yaml | |
| cat job.yaml | sed 's/image: aquasec/image: docker.m.daocloud.io\/aquasec/g' > jobm.yaml | |
| kubectl apply -f jobm.yaml | |
| kubectl get pods | |
| kubectl logs kube-bench-j76s9 |
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
| # 前提条件,LB 和 PV 能力 | |
| helm repo add community https://release.daocloud.io/chartrepo/community | |
| helm install wp -n wp community/wordpress --set global.imageRegistry=docker.m.daocloud.io --create-namespace | |
| kubectl get pods -n wp --watch | |
| kubectl get svc --namespace wp -w wp-wordpress |
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 roles | |
| git clone git@github.com:geerlingguy/ansible-role-ntp.git | |
| write a ntp.yml file | |
| ``` | |
| --- | |
| - name: Check ansible version | |
| import_playbook: ansible_version.yml | |
| - hosts: k8s_cluster |