@@ -80,40 +80,23 @@ kubectl get pods -n kube-system |grep mcad
80
80
brew install jq
81
81
```
82
82
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:
84
85
```
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')
86
90
```
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
108
92
```
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"
110
94
```
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)
113
96
```
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"
115
98
```
116
- ### 2.4.2 Check to make sure the kwok controller started:
99
+ ### 2.4 Check to make sure the kwok controller started:
117
100
```
118
101
kubectl get pods -n kube-system |grep kwok-controller
119
102
```
@@ -170,43 +153,23 @@ kubectl get pods -A |grep mcad-controller
170
153
yum install make podman git tree jq go bc -y
171
154
```
172
155
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
-
181
156
## Step 1. Install KWOK in Cluster:
182
157
### 1.1 Variable Prep:
183
158
```
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')
199
163
```
200
- ### 1.3 Render it with the prepared variables.
164
+ ### 1.2 Deployment kwok and set up CRDs
201
165
```
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"
203
167
```
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)
206
169
```
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"
208
171
```
209
- ### 2.2 Check to make sure the kwok controller started:
172
+ ### 2. Check to make sure the kwok controller started:
210
173
```
211
174
kubectl get pods -n kube-system |grep kwok-controller
212
175
```
0 commit comments