Doc updates for controller namespace

Make all namespace settings explicit and add more documentation around
setting appropriate namespace when installing.
This commit is contained in:
Jason Taylor
2020-04-29 15:27:21 -04:00
parent d6be7e120d
commit 0802d19711
3 changed files with 19 additions and 6 deletions

View File

@@ -60,7 +60,7 @@ The Volume Snapshot feature now depends on a new, volume snapshot controller in
Therefore, it is strongly recommended that Kubernetes distributors bundle and deploy the controller and CRDs as part of their Kubernetes cluster management process (independent of any CSI Driver). Therefore, it is strongly recommended that Kubernetes distributors bundle and deploy the controller and CRDs as part of their Kubernetes cluster management process (independent of any CSI Driver).
If your cluster does not come pre-installed with the correct components, you may manually install these components by executing the following steps. If your Kubernetes distribution does not bundle the snapshot controller, you may manually install these components by executing the following steps. Note that the snapshot controller YAML files in the git repository deploy into the default namespace for system testing purposes. For general use, update the snapshot controller YAMLs with an appropriate namespace prior to installing. For example, on a Vanilla Kubernetes cluster update the namespace from 'default' to 'kube-system' prior to issuing the kubectl create command.
Install Snapshot Beta CRDs: Install Snapshot Beta CRDs:
* kubectl create -f config/crd * kubectl create -f config/crd
@@ -68,6 +68,7 @@ Install Snapshot Beta CRDs:
* Do this once per cluster * Do this once per cluster
Install Common Snapshot Controller: Install Common Snapshot Controller:
* Update the namespace to an appropriate value for your environment (e.g. kube-system)
* kubectl create -f deploy/kubernetes/snapshot-controller * kubectl create -f deploy/kubernetes/snapshot-controller
* https://github.com/kubernetes-csi/external-snapshotter/tree/master/deploy/kubernetes/snapshot-controller * https://github.com/kubernetes-csi/external-snapshotter/tree/master/deploy/kubernetes/snapshot-controller
* Do this once per cluster * Do this once per cluster

View File

@@ -1,8 +1,15 @@
# RBAC file for the snapshot controller. # RBAC file for the snapshot controller.
#
# The snapshot controller implements the control loop for CSI snapshot functionality.
# It should be installed as part of the base Kubernetes distribution in an appropriate
# namespace for components implementing base system functionality. For installing with
# Vanilla Kubernetes, kube-system makes sense for the namespace.
apiVersion: v1 apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
metadata: metadata:
name: snapshot-controller name: snapshot-controller
namespace: default # TODO: replace with the namespace you want for your controller, e.g. kube-system
--- ---
kind: ClusterRole kind: ClusterRole
@@ -44,8 +51,7 @@ metadata:
subjects: subjects:
- kind: ServiceAccount - kind: ServiceAccount
name: snapshot-controller name: snapshot-controller
# replace with non-default namespace name namespace: default # TODO: replace with the namespace you want for your controller, e.g. kube-system
namespace: default
roleRef: roleRef:
kind: ClusterRole kind: ClusterRole
# change the name also here if the ClusterRole gets renamed # change the name also here if the ClusterRole gets renamed
@@ -56,7 +62,7 @@ roleRef:
kind: Role kind: Role
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
metadata: metadata:
namespace: default # TODO: replace with the namespace you want for your controller namespace: default # TODO: replace with the namespace you want for your controller, e.g. kube-system
name: snapshot-controller-leaderelection name: snapshot-controller-leaderelection
rules: rules:
- apiGroups: ["coordination.k8s.io"] - apiGroups: ["coordination.k8s.io"]
@@ -68,11 +74,11 @@ kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
metadata: metadata:
name: snapshot-controller-leaderelection name: snapshot-controller-leaderelection
namespace: default # TODO: replace with the namespace you want for your controller namespace: default # TODO: replace with the namespace you want for your controller, e.g. kube-system
subjects: subjects:
- kind: ServiceAccount - kind: ServiceAccount
name: snapshot-controller name: snapshot-controller
namespace: default # TODO: replace with the namespace you want for your controller namespace: default # TODO: replace with the namespace you want for your controller, e.g. kube-system
roleRef: roleRef:
kind: Role kind: Role
name: snapshot-controller-leaderelection name: snapshot-controller-leaderelection

View File

@@ -1,10 +1,16 @@
# This YAML file shows how to deploy the snapshot controller # This YAML file shows how to deploy the snapshot controller
# The snapshot controller implements the control loop for CSI snapshot functionality.
# It should be installed as part of the base Kubernetes distribution in an appropriate
# namespace for components implementing base system functionality. For installing with
# Vanilla Kubernetes, kube-system makes sense for the namespace.
--- ---
kind: StatefulSet kind: StatefulSet
apiVersion: apps/v1 apiVersion: apps/v1
metadata: metadata:
name: snapshot-controller name: snapshot-controller
namespace: default # TODO: replace with the namespace you want for your controller, e.g. kube-system
spec: spec:
serviceName: "snapshot-controller" serviceName: "snapshot-controller"
replicas: 1 replicas: 1