kcli
kcli copied to clipboard
nfs for openshift doesn't install.
sudo kcli create app openshift nfs
KUBECONFIG not set...Using .kube/config instead
Adding app nfs
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
nfs-kernel-server is already the newest version (1:2.6.1-1ubuntu1.2).
The following packages were automatically installed and are no longer required:
libflashrom1 libftdi1-2 libllvm13
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 38 not upgraded.
Synchronizing state of nfs-kernel-server.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable nfs-kernel-server
namespace/nfs created
Cloning into 'nfs-subdir'...
remote: Enumerating objects: 7784, done.
remote: Counting objects: 100% (1630/1630), done.
remote: Compressing objects: 100% (282/282), done.
remote: Total 7784 (delta 1428), reused 1379 (delta 1345), pack-reused 6154
Receiving objects: 100% (7784/7784), 8.45 MiB | 9.93 MiB/s, done.
Resolving deltas: 100% (4451/4451), done.
Already on project "nfs" on server "https://api.hub.karmalabs.corp:6443".
serviceaccount/nfs-client-provisioner created
role.rbac.authorization.k8s.io/leader-locking-nfs-client-provisioner created
rolebinding.rbac.authorization.k8s.io/leader-locking-nfs-client-provisioner created
Error from server (AlreadyExists): error when creating "nfs-subdir/deploy/rbac.yaml": clusterroles.rbac.authorization.k8s.io "nfs-client-provisioner-runner" already exists
Error from server (AlreadyExists): error when creating "nfs-subdir/deploy/rbac.yaml": clusterrolebindings.rbac.authorization.k8s.io "run-nfs-client-provisioner" already exists
clusterrole.rbac.authorization.k8s.io/system:openshift:scc:hostmount-anyuid added: "nfs-client-provisioner"
deployment.apps/nfs-client-provisioner created
error: error parsing nfs-subdir/deploy/class.yaml: error converting YAML to JSON: yaml: line 4: did not find expected key
had to use sudo but still doesn't quite work yet. Where is this nfs-subdir/deploy/class.yaml?
kcli remove app openshift -P cluster=mykube nfs
needs sudo, but some resources are not deleted cleanly so reinstall will give out :
Already on project "nfs" on server "https://api.hub.karmalabs.corp:6443".
serviceaccount/nfs-client-provisioner created
role.rbac.authorization.k8s.io/leader-locking-nfs-client-provisioner created
rolebinding.rbac.authorization.k8s.io/leader-locking-nfs-client-provisioner created
Error from server (AlreadyExists): error when creating "nfs-subdir/deploy/rbac.yaml": clusterroles.rbac.authorization.k8s.io "nfs-client-provisioner-runner" already exists
Error from server (AlreadyExists): error when creating "nfs-subdir/deploy/rbac.yaml": clusterrolebindings.rbac.authorization.k8s.io "run-nfs-client-provisioner" already exists
clusterrole.rbac.authorization.k8s.io/system:openshift:scc:hostmount-anyuid added: "nfs-client-provisioner"
/tmp/tmpze86wnkc
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: nfs
annotations:
storageclass.kubernetes.io/is-default-class: "true"
provisioner: k8s-sigs.io/nfs-subdir-external-provisioner
parameters:
pathPattern: "${.PVC.namespace}/${.PVC.name}"
onDelete: delete
deployment.apps/nfs-client-provisioner created
Error from server (AlreadyExists): error when creating "nfs-subdir/deploy/class.yaml": storageclasses.storage.k8s.io "nfs" already exists
root@bayes-ser:/usr/lib/python3/dist-packages/kvirt/cluster/openshift/apps/nfs#
let me check this and get back at you
finally addressed in https://github.com/karmab/kcli/commit/18ba66f4277a8870335ac841c60b0590a411de9b sorry for the long time, this workflow was always intended to be run as root, since part of if tries to deploy an nfs server locally when missing