You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -61,64 +61,75 @@ You should see an output similar to the following printed on the terminal showin
61
61
result of deploying the hostpath driver, external provisioner, external attacher and snapshotter components. Note that the following output is from Kubernetes 1.17:
using image: registry.k8s.io/sig-storage/hostpathplugin:v1.15.0
116
130
service/hostpath-service created
117
131
statefulset.apps/csi-hostpath-socat created
118
-
11:37:57 waiting for hostpath deployment to complete, attempt #0
119
-
11:38:07 waiting for hostpath deployment to complete, attempt #1
120
-
deploying snapshotclass based on snapshotter version
121
-
volumesnapshotclass.snapshot.storage.k8s.io/csi-hostpath-snapclass created
132
+
13:49:11 waiting for hostpath deployment to complete, attempt #0
122
133
```
123
134
124
135
The [livenessprobe side-container](https://github.com/kubernetes-csi/livenessprobe) provided by the CSI community is deployed with the CSI driver to provide the liveness checking of the CSI services.
@@ -133,13 +144,14 @@ Replace external-resizer-runner to the role you want to modify
133
144
134
145
## Run example application and validate
135
146
136
-
Next, validate the deployment. First, ensure all expected pods are running properly including the external attacher, provisioner, snapshotter and the actual hostpath driver plugin:
147
+
Next, validate the deployment.
148
+
First, ensure all expected pods are running properly including the external attacher, provisioner, snapshotter and the actual hostpath driver plugin:
137
149
138
150
```shell
139
151
$ kubectl get pods
140
152
NAME READY STATUS RESTARTS AGE
141
-
csi-hostpath-socat-0 1/1 Running 0 42m
142
-
csi-hostpathplugin-0 8/8 Running 0 42m
153
+
csi-hostpath-socat-0 1/1 Running 0 8m8s
154
+
csi-hostpathplugin-0 8/8 Running 0 8m9s
143
155
```
144
156
145
157
From the root directory, deploy the application pods including a storage class, a PVC, and a pod which mounts a volume using the Hostpath driver found in directory `./examples`:
/var/run/secrets/kubernetes.io/serviceaccount from default-token-46lvh (ro)
211
+
/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-kwlwh (ro)
200
212
Conditions:
201
-
Type Status
202
-
Initialized True
203
-
Ready True
204
-
ContainersReady True
205
-
PodScheduled True
213
+
Type Status
214
+
PodReadyToStartContainers True
215
+
Initialized True
216
+
Ready True
217
+
ContainersReady True
218
+
PodScheduled True
206
219
Volumes:
207
220
my-csi-volume:
208
221
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
209
222
ClaimName: csi-pvc
210
223
ReadOnly: false
211
-
default-token-46lvh:
212
-
Type: Secret (a volume populated by a Secret)
213
-
SecretName: default-token-46lvh
214
-
Optional: false
215
-
QoS Class: BestEffort
216
-
Node-Selectors: <none>
217
-
Tolerations: node.kubernetes.io/not-ready:NoExecute for 300s
218
-
node.kubernetes.io/unreachable:NoExecute for 300s
224
+
kube-api-access-kwlwh:
225
+
Type: Projected (a volume that contains injected data from multiple sources)
226
+
TokenExpirationSeconds: 3607
227
+
ConfigMapName: kube-root-ca.crt
228
+
ConfigMapOptional: <nil>
229
+
DownwardAPI: true
230
+
QoS Class: BestEffort
231
+
Node-Selectors: <none>
232
+
Tolerations: node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
233
+
node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
219
234
Events:
220
-
Type Reason Age From Message
221
-
---- ------ ---- ---- -------
222
-
Normal Scheduled 106s default-scheduler Successfully assigned default/my-csi-app to csi-prow-worker
223
-
Normal SuccessfulAttachVolume 106s attachdetach-controller AttachVolume.Attach succeeded for volume "pvc-ad827273-8d08-430b-9d5a-e60e05a2bc3e"
224
-
Normal Pulling 102s kubelet, csi-prow-worker Pulling image "busybox"
225
-
Normal Pulled 99s kubelet, csi-prow-worker Successfully pulled image "busybox"
226
-
Normal Created 99s kubelet, csi-prow-worker Created container my-frontend
227
-
Normal Started 99s kubelet, csi-prow-worker Started container my-frontend
235
+
Type Reason Age From Message
236
+
---- ------ ---- ---- -------
237
+
Normal Scheduled 67s default-scheduler Successfully assigned default/my-csi-app to kind-control-plane
238
+
Normal SuccessfulAttachVolume 66s attachdetach-controller AttachVolume.Attach succeeded for volume "pvc-80c31c4e-27d1-45ef-b302-8b29704f3415"
239
+
Normal Pulling 57s kubelet Pulling image "busybox"
240
+
Normal Pulled 56s kubeletSuccessfully pulled image "busybox"in 807ms (807ms including waiting). Image size: 1855985 bytes.
241
+
Normal Created 56s kubeletCreated container: my-frontend
242
+
Normal Started 56s kubelet Started container my-frontend
228
243
```
229
244
230
245
## Confirm Hostpath driver works
231
-
The Hostpath driver is configured to create new volumes under `/csi-data-dir` inside the hostpath container that is specified in the plugin StatefulSet found [here](../deploy/kubernetes-1.22-test/hostpath/csi-hostpath-plugin.yaml). This path persist as long as the StatefulSet pod is up and running.
246
+
The Hostpath driver is configured to create new volumes under `/csi-data-dir` inside the hostpath container that is specified in the plugin StatefulSet found [here](../deploy/kubernetes-1.22-test/hostpath/csi-hostpath-plugin.yaml).
247
+
This path persist as long as the StatefulSet pod is up and running.
232
248
233
-
A file written in a properly mounted Hostpath volume inside an application should show up inside the Hostpath container. The following steps confirms that Hostpath is working properly. First, create a file from the application pod as shown:
249
+
A file written in a properly mounted Hostpath volume inside an application should show up inside the Hostpath container.
250
+
The following steps confirms that Hostpath is working properly. First, create a file from the application pod as shown:
234
251
235
252
```shell
236
253
$ kubectl exec -it my-csi-app /bin/sh
@@ -247,32 +264,31 @@ Then, use the following command to locate the file. If everything works OK you s
## Confirm the creation of the VolumeAttachment object
256
273
An additional way to ensure the driver is working properly is by inspecting the VolumeAttachment API object created that represents the attached volume:
0 commit comments