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
CSI Proxy (which might be more aptly named "csi-node-proxy") is a binary that exposes a set of gRPC APIs (over named pipes) around local storage operations for nodes in Windows. A container, such as CSI node plugins, can mount the named pipes depending on operations it wants to exercise on the host and
4
-
invoke the APIs. This allows a storage plugin to run as if were a CSI plugin on linux which have the ability to perform "privileged" actions on the windows host OS.
3
+
CSI Proxy is a Go library providing convenience methods to execute privileged storage operations in Windows, such as formatting and mounting volumes.
4
+
A container, such as CSI node plugins, can import the CSI Proxy library to get a Go interface for storage-related Windows system calls.
5
+
Since the commands executed are privileged instructions, containers must run as [HostProcess containers](https://kubernetes.io/docs/tasks/configure-pod-container/create-hostprocess-pod/).
5
6
6
-

7
+
Closely related functionalities are bundled as API groups that target specific areas of storage. The available API groups are
7
8
8
-
In the above diagram, there are 3 communication channels being utilized for CSI proxy:
9
-
10
-
-`csi.sock` : This usually lives at c:/var/lib/kubelet/plugins/csi-plugin/csi.sock, and is used for the host OS to communicate with the CSI node plugin
11
-
-`csi-plugin-reg.sock` : This lives here, c:/var/lib/kubelet/plugins_registry/csi-plugin-reg.sock, and is used for the kubelet itself to get metadata as needed from the csi plugin .
12
-
-`\\.\pipe\csi-proxy` : This will live in a pipe, i.e. at \\.\pipe/csi-proxy-api-group-v-... : upon receipt of specific requests from the Node plugin, it carries out actions on the node plugins behalf. Since it doesn't execute arbitrary commands on the host, its more secure then simply being a black-box proxy to run host commands.
13
-
14
-
Each named pipe will support a specific version of an API (e.g. v1alpha1, v1beta1, v1beta2, v1)
15
-
that targets a specific area of storage (e.g. disk, volume, file, SMB, iSCSI).
16
-
17
-
## Overview
18
-
19
-
CSI drivers are recommended to be deployed as containers. Node plugin containers need to run with privileges to perform storage related operations. However, Windows does not support privileged containers currently. With CSIProxy, the node plugins can now be deployed as unprivileged pods that use the proxy to perform privileged storage operations on the node. Kubernetes administrators will need to install and maintain csi-proxy.exe on all Windows nodes in a manner similar to kubelet.exe.
9
+
- Disk
10
+
- Filesystem
11
+
- SMB
12
+
- Volume
13
+
- iSCSI (experimental)
14
+
- System (experimental)
20
15
21
16
## Compatibility
22
17
23
-
Recommended K8s Version: 1.18
24
-
25
-
## Feature status
26
-
27
-
CSI Proxy is in a stable status ([GA Blogpost](https://kubernetes.io/blog/2021/08/09/csi-windows-support-with-csi-proxy-reaches-ga/)), the latest versions of the API Groups are:
| iSCSI | v1alpha2 |[link to proto](./client/api/iscsi/v1alpha2/api.proto)|
36
-
| System | v1alpha1 |[link to proto](./client/api/system/v1alpha1/api.proto)|
37
-
38
-
## Build
39
-
40
-
`csi-proxy.exe` binary has not published yet. You need to clone the repo and build it. The easiest way to build this binary is using the makefile in this repo.
On successful execution of `make build`, the output binary `csi-proxy.exe` will be available under `/bin` directory.
48
-
49
-
## Installation
50
-
51
-
csi-proxy.exe can be installed and run as binary or run as a Windows service on each Windows node. See the following as an example to run CSI Proxy as a web service.
If you are using kube-up to start a Windows cluster, node startup script will automatically run csi-proxy as a service. For GKE 1.18+, csi-proxy will be installed automatically.
18
+
Recommended K8s Version: 1.23
59
19
60
20
## Usage
61
21
62
-
### Command line options
63
-
64
-
*`--kubelet-path`: This is the prefix path of the kubelet path directory in the host file system (`C:\var\lib\kubelet` is used by default).
65
-
*`--working-dir` (repeated flag): Prefix path where CSI Proxy is allowed to make privileged operations in the host file system (no value by default).
66
-
67
-
### Setup for CSI Driver Deployment
68
-
69
-
Deploy and start csiproxy.exe on all Windows hosts in the cluster. Next, the named
70
-
pipes can be mounted in a CSI node plugin DaemonSet YAML in the following manner:
0 commit comments