-
Notifications
You must be signed in to change notification settings - Fork 260
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #82 from jiaxunsongucb/add_install_instructions
doc: add install instructions
- Loading branch information
Showing
4 changed files
with
122 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/bash | ||
|
||
# Copyright 2020 The Kubernetes Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
set -euo pipefail | ||
|
||
ver="master" | ||
if [[ "$#" -gt 0 ]]; then | ||
ver="$1" | ||
fi | ||
|
||
repo="https://raw.githubusercontent.com/kubernetes-csi/csi-driver-nfs/$ver/deploy/kubernetes" | ||
if [[ "$#" -gt 1 ]]; then | ||
if [[ "$2" == *"local"* ]]; then | ||
echo "use local deploy" | ||
repo="./deploy/kubernetes" | ||
fi | ||
fi | ||
|
||
if [ $ver != "master" ]; then | ||
repo="$repo/$ver" | ||
fi | ||
|
||
echo "Installing NFS CSI driver, version: $ver ..." | ||
kubectl apply -f $repo/rbac-csi-nfs-controller.yaml | ||
kubectl apply -f $repo/csi-nfs-driverinfo.yaml | ||
kubectl apply -f $repo/csi-nfs-controller.yaml | ||
kubectl apply -f $repo/csi-nfs-node.yaml | ||
echo 'NFS CSI driver installed successfully.' |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/bash | ||
|
||
# Copyright 2020 The Kubernetes Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
set -euo pipefail | ||
|
||
ver="master" | ||
if [[ "$#" -gt 0 ]]; then | ||
ver="$1" | ||
fi | ||
|
||
repo="https://raw.githubusercontent.com/kubernetes-csi/csi-driver-nfs/$ver/deploy/kubernetes" | ||
if [[ "$#" -gt 1 ]]; then | ||
if [[ "$2" == *"local"* ]]; then | ||
echo "use local deploy" | ||
repo="./deploy/kubernetes" | ||
fi | ||
fi | ||
|
||
if [ $ver != "master" ]; then | ||
repo="$repo/$ver" | ||
fi | ||
|
||
echo "Uninstalling NFS driver, version: $ver ..." | ||
kubectl delete -f $repo/csi-nfs-controller.yaml --ignore-not-found | ||
kubectl delete -f $repo/csi-nfs-node.yaml --ignore-not-found | ||
kubectl delete -f $repo/csi-nfs-driverinfo.yaml --ignore-not-found | ||
kubectl delete -f $repo/rbac-csi-nfs-controller.yaml --ignore-not-found | ||
echo 'Uninstalled NFS driver successfully.' |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Install NFS CSI driver master version on a kubernetes cluster | ||
|
||
If you have already installed Helm, you can also use it to install NFS CSI driver. Please see [Installation with Helm](../charts/README.md). | ||
|
||
## Install with kubectl | ||
- remote install | ||
```console | ||
curl -skSL https://raw.githubusercontent.com/kubernetes-csi/csi-driver-nfs/master/deploy/kubernetes/install-driver.sh | bash -s master -- | ||
``` | ||
|
||
- local install | ||
```console | ||
git clone https://github.com/kubernetes-csi/csi-driver-nfs.git | ||
cd csi-driver-nfs | ||
./deploy/kubernetes/install-driver.sh master local | ||
``` | ||
|
||
- check pods status: | ||
```console | ||
kubectl -n kube-system get pod -o wide -l app=csi-nfs-controller | ||
kubectl -n kube-system get pod -o wide -l app=csi-nfs-node | ||
``` | ||
|
||
example output: | ||
|
||
```console | ||
NAME READY STATUS RESTARTS AGE IP NODE | ||
csi-nfs-controller-56bfddd689-dh5tk 4/4 Running 0 35s 10.240.0.19 k8s-agentpool-22533604-0 | ||
csi-nfs-controller-56bfddd689-8pgr4 4/4 Running 0 35s 10.240.0.35 k8s-agentpool-22533604-1 | ||
csi-nfs-node-cvgbs 3/3 Running 0 35s 10.240.0.35 k8s-agentpool-22533604-1 | ||
csi-nfs-node-dr4s4 3/3 Running 0 35s 10.240.0.4 k8s-agentpool-22533604-0 | ||
``` | ||
|
||
- clean up NFS CSI driver | ||
```console | ||
curl -skSL https://raw.githubusercontent.com/kubernetes-csi/csi-driver-nfs/master/deploy/kubernetes/uninstall-driver.sh | bash -s master -- | ||
``` |