@@ -80,40 +80,23 @@ kubectl get pods -n kube-system |grep mcad
8080brew install jq
8181```
8282
83- ### 2.2 Install the latest version of Kustomize
83+ ### Step 2.2. Install KWOK in your KIND Cluster:
84+ ### 2.2.1 Variable Prep:
8485```
85- brew install kustomize
86+ # KWOK repository
87+ KWOK_REPO=kubernetes-sigs/kwok
88+ # Get latest
89+ KWOK_LATEST_RELEASE=$(curl "https://api.github.com/repos/${KWOK_REPO}/releases/latest" | jq -r '.tag_name')
8690```
87-
88- ### Step 2.3. Install KWOK in your KIND Cluster:
89- ### 2.3.1 Variable Prep:
90- ```
91- export KWOK_WORK_DIR=$(mktemp -d)
92- export KWOK_REPO=kubernetes-sigs/kwok
93- export KWOK_LATEST_RELEASE=$(curl "https://api.github.com/repos/${KWOK_REPO}/releases/latest" | jq -r '.tag_name')
94- ```
95- ### 2.3.2 Render kustomization yaml
96- ```
97- cat <<EOF > "${KWOK_WORK_DIR}/kustomization.yaml"
98- apiVersion: kustomize.config.k8s.io/v1beta1
99- kind: Kustomization
100- images:
101- - name: registry.k8s.io/kwok/kwok
102- newTag: "${KWOK_LATEST_RELEASE}"
103- resources:
104- - "https://github.com/${KWOK_REPO}/kustomize/kwok?ref=${KWOK_LATEST_RELEASE}"
105- EOF
106- ```
107- ### 2.3.3 Render it with the prepared variables.
91+ ### 2.2.2 Deployment kwok and set up CRDs
10892```
109- kubectl kustomize "${KWOK_WORK_DIR}" > "${KWOK_WORK_DIR }/kwok.yaml"
93+ kubectl apply -f "https://github.com/${KWOK_REPO}/releases/download/${KWOK_LATEST_RELEASE }/kwok.yaml"
11094```
111- ### Step 2.4 Install the KWOK Controller in kube-system namespace:
112- ### 2.4.1 Apply your rendered yaml file from step 1.3 above:
95+ ### 2.3.3 Set up default CRs of Stages (required)
11396```
114- kubectl apply -f "${KWOK_WORK_DIR}/kwok .yaml"
97+ kubectl apply -f "https://github.com/${KWOK_REPO}/releases/download/${KWOK_LATEST_RELEASE}/stage-fast .yaml"
11598```
116- ### 2.4.2 Check to make sure the kwok controller started:
99+ ### 2.4 Check to make sure the kwok controller started:
117100```
118101kubectl get pods -n kube-system |grep kwok-controller
119102```
@@ -170,43 +153,23 @@ kubectl get pods -A |grep mcad-controller
170153yum install make podman git tree jq go bc -y
171154```
172155
173- ### 0.5 Install the latest version of Kustomize
174- ```
175- OS=$(uname)
176- curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash
177- mv kustomize /usr/local/bin
178- kustomize version
179- ```
180-
181156## Step 1. Install KWOK in Cluster:
182157### 1.1 Variable Prep:
183158```
184- export KWOK_WORK_DIR=$(mktemp -d)
185- export KWOK_REPO=kubernetes-sigs/kwok
186- export KWOK_LATEST_RELEASE=$(curl "https://api.github.com/repos/${KWOK_REPO}/releases/latest" | jq -r '.tag_name')
187- ```
188- ### 1.2 Render kustomization yaml
189- ```
190- cat <<EOF > "${KWOK_WORK_DIR}/kustomization.yaml"
191- apiVersion: kustomize.config.k8s.io/v1beta1
192- kind: Kustomization
193- images:
194- - name: registry.k8s.io/kwok/kwok
195- newTag: "${KWOK_LATEST_RELEASE}"
196- resources:
197- - "https://github.com/${KWOK_REPO}/kustomize/kwok?ref=${KWOK_LATEST_RELEASE}"
198- EOF
159+ # KWOK repository
160+ KWOK_REPO=kubernetes-sigs/kwok
161+ # Get latest
162+ KWOK_LATEST_RELEASE=$(curl "https://api.github.com/repos/${KWOK_REPO}/releases/latest" | jq -r '.tag_name')
199163```
200- ### 1.3 Render it with the prepared variables.
164+ ### 1.2 Deployment kwok and set up CRDs
201165```
202- kubectl kustomize "${KWOK_WORK_DIR}" > "${KWOK_WORK_DIR }/kwok.yaml"
166+ kubectl apply -f "https://github.com/${KWOK_REPO}/releases/download/${KWOK_LATEST_RELEASE }/kwok.yaml"
203167```
204- ## Step 2. Install the KWOK Controller in kube-system namespace:
205- ### 2.1 Apply your rendered yaml file from step 1.3 above:
168+ ### 1.3 Set up default CRs of Stages (required)
206169```
207- kubectl apply -f "${KWOK_WORK_DIR}/kwok .yaml"
170+ kubectl apply -f "https://github.com/${KWOK_REPO}/releases/download/${KWOK_LATEST_RELEASE}/stage-fast .yaml"
208171```
209- ### 2.2 Check to make sure the kwok controller started:
172+ ### 2. Check to make sure the kwok controller started:
210173```
211174kubectl get pods -n kube-system |grep kwok-controller
212175```
0 commit comments