Monday, July 8, 2019

UBUNTU18+KVM+VAGRANT+KUBERNETES 9)nfs server and nfs provisioning from k8s




UBUNTU18+KVM+VAGRANT+KUBERNETES 9)nfs server and nfs provisioning from k8s



This short article explains how to install kubectl PersistentVolume and PersistentVolumeClaim using outer nfs server.
We should prepare nfs node.(10.1.0.7 is my nfs server installed kvm env.



Prerequisites)
Vagrant knowledge. Beforhand articles about Ubuntu18+k8s+kvm+vagrant on my blog. Linux Command.

I refered below link. That is very awesome github. Thank you.
https://github.com/kubernetes-incubator/external-storage/blob/master/nfs-client/deploy/
https://github.com/kubernetes-incubator/external-storage/tree/master/nfs-client

1.Nfs sERver install on centos7. Adding vagrant node centos7 for nfs server. - 10.1.0.7 is nfs server


   config.vm.define "nfserver" do |nfserver|
   nfserver.vm.box = "centos/7"
   nfserver.vm.provision "shell", path: "check_key.sh"
   nfserver.vm.provision "file", source: "id_rsa",destination: "/home/vagrant/.ssh/id_rsa"
   nfserver.vm.provision "shell", :path => "k8s_docker_install.sh"
   nfserver.vm.network "private_network", ip:"10.1.0.7"
   nfserver.vm.provision "annfs", type:"ansible" do |ansible|
      ansible.playbook = "nfsFileSystem.yaml"
   end
   nfserver.vm.provision "nfsdocker", type:"shell", :path => "nfsDocker.sh"
   nfserver.vm.host_name = "nfserver"
     nfserver.vm.provider :libvirt do |lv|
      lv.storage_pool_name = "data"
      lv.cpus = 1
      lv.memory = 512
      lv.storage :file, :size => '5G', :type => 'raw'
     end
   end

oyj@oyj-X555QG:~/INSTALL/u18kvk8s/k8s$ vagrant up nfserver
Bringing machine 'nfserver' up with 'libvirt' provider...
==> nfserver: Checking if box 'centos/7' version '1902.01' is up to date...
==> nfserver: A newer version of the box 'centos/7' for provider 'libvirt' is
==> nfserver: available! You currently have version '1902.01'. The latest is version
==> nfserver: '1905.1'. Run `vagrant box update` to update.
==> nfserver: Creating image (snapshot of base box volume).
==> nfserver: Creating domain with the following settings...
==> nfserver:  -- Name:              k8s_nfserver
==> nfserver:  -- Domain type:       kvm
==> nfserver:  -- Cpus:              1
==> nfserver:  -- Feature:           acpi
==> nfserver:  -- Feature:           apic
==> nfserver:  -- Feature:           pae
==> nfserver:  -- Memory:            512M
==> nfserver:  -- Management MAC:  
==> nfserver:  -- Loader:          
==> nfserver:  -- Nvram:           
==> nfserver:  -- Base box:          centos/7
==> nfserver:  -- Storage pool:      data
==> nfserver:  -- Image:             /data/k8s_nfserver.img (41G)
==> nfserver:  -- Volume Cache:      default
==> nfserver:  -- Kernel:          
==> nfserver:  -- Initrd:          
==> nfserver:  -- Graphics Type:     vnc
==> nfserver:  -- Graphics Port:     -1
==> nfserver:  -- Graphics IP:       127.0.0.1
==> nfserver:  -- Graphics Password: Not defined
==> nfserver:  -- Video Type:        cirrus
==> nfserver:  -- Video VRAM:        9216
==> nfserver:  -- Sound Type:  
==> nfserver:  -- Keymap:            en-us
==> nfserver:  -- TPM Path:        
==> nfserver:  -- Disks:         vdb(raw,5G)
==> nfserver:  -- Disk(vdb):     /data/k8s_nfserver-vdb.raw
==> nfserver:  -- INPUT:             type=mouse, bus=ps2
==> nfserver: Creating shared folders metadata...
==> nfserver: Starting domain.
==> nfserver: Waiting for domain to get an IP address...







#On below link, you can find related sources such as whole Vagrantfile above.
https://github.com/ohyoungjooung2/u18kvk8s/tree/master/k8s



2. deployment. Create deployment.
oyj@oyj-X555QG:~/INSTALL/u18kvk8s/k8s/nfsProvisioning$ vi ext-nfs-pro.yaml
oyj@oyj-X555QG:~/INSTALL/u18kvk8s/k8s/nfsProvisioning$ cat ext-nfs-pro.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
  name: nfs-client-provisioner
---
kind: Deployment
apiVersion: extensions/v1beta1
metadata:
  name: nfs-client-provisioner
spec:
  replicas: 1
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: nfs-client-provisioner
    spec:
      serviceAccountName: nfs-client-provisioner
      containers:
        - name: nfs-client-provisioner
          image: quay.io/external_storage/nfs-client-provisioner:latest
          volumeMounts:
            - name: nfs-client-root
              mountPath: /persistentvolumes
          env:
            - name: PROVISIONER_NAME
              value: fuseim.pri/ifs
            - name: NFS_SERVER
              value: 10.1.0.7
            - name: NFS_PATH
              value: /
      volumes:
        - name: nfs-client-root
          nfs:
            server: 10.1.0.7
            path: /

oyj@oyj-X555QG:~/INSTALL/u18kvk8s/k8s/nfsProvisioning$ kb create -f ext-nfs-pro.yaml
serviceaccount/nfs-client-provisioner created
deployment.extensions/nfs-client-provisioner created
oyj@oyj-X555QG:~/INSTALL/u18kvk8s/k8s/nfsProvisioning$ kb get po | grep nfs
nfs-client-provisioner-78665db465-xp2wr   0/1     ContainerCreating   0          5s


oyj@oyj-X555QG:~/INSTALL/u18kvk8s/k8s/nfsProvisioning$ kb get po | grep nfs
nfs-client-provisioner-78665db465-xp2wr   1/1     Running   0          31s
oyj@oyj-X555QG:~/INSTALL/u18kvk8s/k8s/nfsProvisioning$



3. Create class.

oyj@oyj-X555QG:~/INSTALL/u18kvk8s/k8s/nfsProvisioning$ cat storageClass.yaml
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: managed-nfs-storage
provisioner: fuseim.pri/ifs # or choose another name, must match deployment's env PROVISIONER_NAME'
parameters:
  archiveOnDelete: "false" # When set
oyj@oyj-X555QG:~/INSTALL/u18kvk8s/k8s/nfsProvisioning$ kb create -f storageClass.yaml
storageclass.storage.k8s.io/managed-nfs-storage created
oyj@oyj-X555QG:~/INSTALL/u18kvk8s/k8s/nfsProvisioning$ kb get sc | grep nfs
managed-nfs-storage   fuseim.pri/ifs                 7s




4. Authorization. In my case I installed kubernets 1.15, by default RBAC is configured.
So I need to configure authorization process.

By default RBAC is on.
[vagrant@kubemaster ~]$  ps -ef | grep RBAC
root      4573  4518  4 17:27 ?        00:09:36 kube-apiserver --advertise-address=10.1.0.2 \
--allow-privileged=true --authorization-mode=Node,RBAC --client-ca-file=/etc/kubernetes/pki/ca.crt \
 --enable-admission-plugins=NodeRestriction --enable-bootstrap-token-auth=true --etcd-cafile=/etc/kubernetes/pki/etcd/ca.crt \
 --etcd-certfile=/etc/kubernetes/pki/apiserver-etcd-client.crt --etcd-keyfile=/etc/kubernetes/pki/apiserver-etcd-client.key \
--etcd-servers=https://127.0.0.1:2379 --insecure-port=0 --kubelet-client-certificate=/etc/kubernetes/pki/apiserver-kubelet-client.crt\
 --kubelet-client-key=/etc/kubernetes/pki/apiserver-kubelet-client.key --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname \
--proxy-client-cert-file=/etc/kubernetes/pki/front-proxy-client.crt --proxy-client-key-file=/etc/kubernetes/pki/front-proxy-client.key\
 --requestheader-allowed-names=front-proxy-client --requestheader-client-ca-file=/etc/kubernetes/pki/front-proxy-ca.crt \
--requestheader-extra-headers-prefix=X-Remote-Extra- --requestheader-group-headers=X-Remote-Group \
--requestheader-username-headers=X-Remote-User --secure-port=6443 --service-account-key-file=/etc/kubernetes/pki/sa.pub
 --service-cluster-ip-range=10.96.0.0/12 --tls-cert-file=/etc/kubernetes/pki/apiserver.crt --tls-private-key-file=/etc/kubernetes/pki/apiserver.key


Create authoriztion.
oyj@oyj-X555QG:~/INSTALL/u18kvk8s/k8s/nfsProvisioning$ vi clusterRoleAuth.yaml
oyj@oyj-X555QG:~/INSTALL/u18kvk8s/k8s/nfsProvisioning$ cat clusterRoleAuth.yaml
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
  #name: nfs-client-provisioner-runner
  name: nfs-client-provisioner
rules:
  - apiGroups: [""]
    resources: ["persistentvolumes"]
    verbs: ["get", "list", "watch", "create", "delete"]
  - apiGroups: [""]
    resources: ["persistentvolumeclaims"]
    verbs: ["get", "list", "watch", "create", "update"]
  - apiGroups: ["storage.k8s.io"]
    resources: ["storageclasses"]
    verbs: ["get", "list", "watch"]
  - apiGroups: [""]
    resources: ["events"]
    verbs: ["create", "watch", "list", "get", "update", "patch"]
  - apiGroups: [""]
    resources: ["endpoints"]
    verbs: ["get", "list", "watch", "create", "update", "patch"]
oyj@oyj-X555QG:~/INSTALL/u18kvk8s/k8s/nfsProvisioning$ kb create -f clusterRoleAuth.yaml
clusterrole.rbac.authorization.k8s.io/nfs-client-provisioner created
oyj@oyj-X555QG:~/INSTALL/u18kvk8s/k8s/nfsProvisioning$ kb get clusterRole | grep nfs
nfs-client-provisioner                                                 8s


oyj@oyj-X555QG:~/INSTALL/u18kvk8s/k8s/nfsProvisioning$ vi clusterRoleBinding.yaml
oyj@oyj-X555QG:~/INSTALL/u18kvk8s/k8s/nfsProvisioning$ cat clusterRoleBinding.yaml
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
  name: nfs-client-provisioner
subjects:
  - kind: ServiceAccount
    name: nfs-client-provisioner
    namespace: default
roleRef:
  kind: ClusterRole
  name: nfs-client-provisioner
  apiGroup: rbac.authorization.k8s.io
oyj@oyj-X555QG:~/INSTALL/u18kvk8s/k8s/nfsProvisioning$ kb create -f clusterRoleBinding.yaml
clusterrolebinding.rbac.authorization.k8s.io/nfs-client-provisioner created
oyj@oyj-X555QG:~/INSTALL/u18kvk8s/k8s/nfsProvisioning$ kubectl get clusterRoleBinding | grep nfs
nfs-client-provisioner                                 10s




5.Storage claim(persistentVolumeClaim)
oyj@oyj-X555QG:~/INSTALL/u18kvk8s/k8s/nfsProvisioning$ cat storageClaimForWp.yaml
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: storage-claim-for-wp
  annotations:
    volume.beta.kubernetes.io/storage-class: "managed-nfs-storage"
spec:
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: 1Gi
oyj@oyj-X555QG:~/INSTALL/u18kvk8s/k8s/nfsProvisioning$ kb create -f storageClaimForWp.yaml
persistentvolumeclaim/storage-claim-for-wp created
oyj@oyj-X555QG:~/INSTALL/u18kvk8s/k8s/nfsProvisioning$ kb get pvc | grep for-wp
storage-claim-for-wp                 Bound    pvc-8c82beed-6a8a-4de9-b7de-a8d6bcecbc1c   1Gi        RWX            managed-nfs-storage   12s



!Congratulations! on us!No errors.
[vagrant@kubemaster pvc]$ kubectl logs nfs-client-provisioner-74bc458c8b-rqwqv

I0707 20:49:05.579562       1 controller.go:631] Starting provisioner controller fuseim.pri/ifs_nfs-client-provisioner-78665db465-xp2wr_b45597ab-a0f7-11e9-b54f-62e8ccc05947!
I0707 20:49:05.579664       1 event.go:221] Event(v1.ObjectReference{Kind:"Endpoints", Namespace:"default", Name:"fuseim.pri-ifs", UID:"af67b9e0-1056-4f78-af42-2604ee734c0b", APIVersion:"v1", ResourceVersion:"190065", FieldPath:""}): type: 'Normal' reason: 'LeaderElection' nfs-client-provisioner-78665db465-xp2wr_b45597ab-a0f7-11e9-b54f-62e8ccc05947 became leader
I0707 20:49:05.696694       1 controller.go:680] Started provisioner controller fuseim.pri/ifs_nfs-client-provisioner-78665db465-xp2wr_b45597ab-a0f7-11e9-b54f-62e8ccc05947!
I0707 20:51:52.219703       1 controller.go:987] provision "default/storage-claim-for-wp" class "managed-nfs-storage": started
I0707 20:51:52.226059       1 event.go:221] Event(v1.ObjectReference{Kind:"PersistentVolumeClaim", Namespace:"default", Name:"storage-claim-for-wp", UID:"8c82beed-6a8a-4de9-b7de-a8d6bcecbc1c", APIVersion:"v1", ResourceVersion:"190411", FieldPath:""}): type: 'Normal' reason: 'Provisioning' External provisioner is provisioning volume for claim "default/storage-claim-for-wp"
I0707 20:51:52.230764       1 controller.go:1087] provision "default/storage-claim-for-wp" class "managed-nfs-storage": volume "pvc-8c82beed-6a8a-4de9-b7de-a8d6bcecbc1c" provisioned
I0707 20:51:52.230839       1 controller.go:1101] provision "default/storage-claim-for-wp" class "managed-nfs-storage": trying to save persistentvvolume "pvc-8c82beed-6a8a-4de9-b7de-a8d6bcecbc1c"
I0707 20:51:52.249339       1 controller.go:1108] provision "default/storage-claim-for-wp" class "managed-nfs-storage": persistentvolume "pvc-8c82beed-6a8a-4de9-b7de-a8d6bcecbc1c" saved
I0707 20:51:52.249413       1 controller.go:1149] provision "default/storage-claim-for-wp" class "managed-nfs-storage": succeeded
I0707 20:51:52.249516       1 event.go:221] Event(v1.ObjectReference{Kind:"PersistentVolumeClaim", Namespace:"default", Name:"storage-claim-for-wp", UID:"8c82beed-6a8a-4de9-b7de-a8d6bcecbc1c", APIVersion:"v1", ResourceVersion:"190411", FieldPath:""}): type: 'Normal' reason: 'ProvisioningSucceeded' Successfully provisioned volume pvc-8c82beed-6a8a-4de9-b7de-a8d6bcecbc1c

Now like Linux volume manager, I claim some storage from external nfs server. Just for dev test, 1Gi.


I already deploy wordpress with below ...configuration.
oyj@oyj-X555QG:~/INSTALL/u18kvk8s/k8s/nfsProvisioning$ kb get svc | grep word
wordpress        NodePort    10.98.100.201   <none>        8070:32333/TCP   35h
oyj@oyj-X555QG:~/INSTALL/u18kvk8s/k8s/nfsProvisioning$ kb describe svc wordpress
Name:                     wordpress
Namespace:                default
Labels:                   app=wordpress
Annotations:              <none>
Selector:                 app=wordpress
Type:                     NodePort
IP:                       10.98.100.201
Port:                     http  8070/TCP
TargetPort:               80/TCP
NodePort:                 http  32333/TCP
Endpoints:                10.244.2.37:80,10.244.2.38:80
Session Affinity:         None
External Traffic Policy:  Cluster
Events:                   <none>

oyj@oyj-X555QG:~/INSTALL/u18kvk8s/k8s/nfsProvisioning$ kb get po | grep wordpress
wordpress-749f7f984-pk6hb                 1/1     Running   3          35h
wordpress-749f7f984-t85gw                 1/1     Running   3          35h
oyj@oyj-X555QG:~/INSTALL/u18kvk8s/k8s/nfsProvisioning$



oyj@oyj-X555QG:~/INSTALL/u18kvk8s/k8s/nfsProvisioning$ kb describe deploy wordpress
Name:               wordpress
Namespace:          default
CreationTimestamp:  Sat, 06 Jul 2019 18:57:44 +0900
Labels:             app=wordpress
Annotations:        deployment.kubernetes.io/revision: 1
                    kubectl.kubernetes.io/last-applied-configuration:
                      {"apiVersion":"apps/v1","kind":"Deployment","metadata":{"annotations":{},"labels":{"app":"wordpress"},"name":"wordpress","namespace":"defa...
Selector:           app=wordpress
Replicas:           2 desired | 2 updated | 2 total | 2 available | 0 unavailable
StrategyType:       Recreate
MinReadySeconds:    0
Pod Template:
  Labels:  app=wordpress
  Containers:
   wordpress:
    Image:      wordpress:4.8-apache
    Port:       80/TCP
    Host Port:  0/TCP
    Environment:
      WORDPRESS_DB_HOST:      mariadb-master
      WORDPRESS_DB_PASSWORD:  <set to the key 'password' in secret 'mariadb-pass-hmt2hb8m6g'>  Optional: false
    Mounts:
      /var/www/html from wordpress-persistent-storage (rw)
  Volumes:
   wordpress-persistent-storage:
    Type:       PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
    ClaimName:  wp-pv-claim
    ReadOnly:   false
Conditions:
  Type           Status  Reason
  ----           ------  ------
  Progressing    True    NewReplicaSetAvailable
  Available      True    MinimumReplicasAvailable
OldReplicaSets:  <none>
NewReplicaSet:   wordpress-749f7f984 (2/2 replicas created)
Events:          <none>


!!!But these two pod is running on same nodes kubeworker1 that has local-disks provisioned.!!!..

 
oyj@oyj-X555QG:~/INSTALL/u18kvk8s/k8s/nfsProvisioning$ kb describe po wordpress-749f7f984-pk6hb | grep kube
Node:           kubeworker1/192.168.121.6
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-7pn58 (ro)
Tolerations:     node.kubernetes.io/not-ready:NoExecute for 300s
                 node.kubernetes.io/unreachable:NoExecute for 300s
oyj@oyj-X555QG:~/INSTALL/u18kvk8s/k8s/nfsProvisioning$ kb describe po wordpress-749f7f984-t85gw | grep kube
Node:           kubeworker1/192.168.121.6
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-7pn58 (ro)
Tolerations:     node.kubernetes.io/not-ready:NoExecute for 300s
                 node.kubernetes.io/unreachable:NoExecute for 300s

So I am going to change this two pod to be running in different nodes to balance.

oyj@oyj-X555QG:~/INSTALL/u18kvk8s/k8s/nfsProvisioning$ cat wp-dp.yaml
---
apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
kind: Deployment
metadata:
  name: wordpress
  labels:
    app: wordpress
spec:
  replicas: 2
  selector:
    matchLabels:
      app: wordpress
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: wordpress
    spec:
      containers:
      - image: wordpress:4.8-apache
        name: wordpress
        env:
        - name: WORDPRESS_DB_HOST
          #Previsous mariadb-master svc, I already created.!
          value: mariadb-master
        - name: WORDPRESS_DB_PASSWORD
          valueFrom:
            secretKeyRef:
              name: mariadb-pass
              key: password
        ports:
        - containerPort: 80
          name: wordpress
        volumeMounts:
        - name: wordpress-persistent-storage
          mountPath: /var/www/html
      volumes:
      - name: wordpress-persistent-storage
        persistentVolumeClaim:
          #claimName: wp-pv-claim => this line (using local-disk provisiong) is changed into below that using nfs.
          claimName: storage-claim-for-wp
oyj@oyj-X555QG:~/INSTALL/u18kvk8s/k8s/nfsProvisioning$ cat kustomization.yaml
secretGenerator:
- name: mariadb-pass
  literals:
  - password=StrongPass$^^$
resources:
  - wp-dp.yaml

#Existiing pod is being replaced with new pod(wordpress of course) like below.
oyj@oyj-X555QG:~/INSTALL/u18kvk8s/k8s/nfsProvisioning$ kb get po
NAME                                      READY   STATUS        RESTARTS   AGE
mariadb-master-0                          1/1     Running       18         3d2h
mariadb-slave-0                           1/1     Running       7          2d3h
mariadb-slave-1                           1/1     Running       7          2d3h
nfs-client-provisioner-78665db465-xp2wr   1/1     Running       0          23m
wordpress-749f7f984-pk6hb                 1/1     Terminating   3          35h
wordpress-749f7f984-t85gw                 1/1     Terminating   3          35h
oyj@oyj-X555QG:~/INSTALL/u18kvk8s/k8s/nfsProvisioning$ kb get po | grep wordpress
NAME                                      READY   STATUS              RESTARTS   AGE
mariadb-master-0                          1/1     Running             18         3d2h
mariadb-slave-0                           1/1     Running             7          2d3h
mariadb-slave-1                           1/1     Running             7          2d3h
nfs-client-provisioner-78665db465-xp2wr   1/1     Running             0          23m
wordpress-6bb56544f9-hbzkr                1/1     Running             0          5s

oyj@oyj-X555QG:~/INSTALL/u18kvk8s/k8s/nfsProvisioning$ kb get po | grep word

wordpress-6bb56544f9-hbzkr                1/1     Running             0          10s
wordpress-6bb56544f9-zxmw5                0/1     ContainerCreating   0          10s

oyj@oyj-X555QG:~/INSTALL/u18kvk8s/k8s/nfsProvisioning$ kb get po | grep wordpress
wordpress-6bb56544f9-hbzkr                1/1     Running   0          72s
wordpress-6bb56544f9-zxmw5                1/1     Running   0          72s

oyj@oyj-X555QG:~/INSTALL/u18kvk8s/k8s/nfsProvisioning$ kb describe po wordpress-6bb56544f9-hbzkr | grep kube
Node:           kubeworker1/192.168.121.6
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-7pn58 (ro)
Tolerations:     node.kubernetes.io/not-ready:NoExecute for 300s
                 node.kubernetes.io/unreachable:NoExecute for 300s
  Normal  Scheduled  3m20s  default-scheduler     Successfully assigned default/wordpress-6bb56544f9-hbzkr to kubeworker1
  Normal  Pulled     3m18s  kubelet, kubeworker1  Container image "wordpress:4.8-apache" already present on machine
  Normal  Created    3m18s  kubelet, kubeworker1  Created container wordpress
  Normal  Started    3m17s  kubelet, kubeworker1  Started container wordpress
oyj@oyj-X555QG:~/INSTALL/u18kvk8s/k8s/nfsProvisioning$ kb describe po wordpress-6bb56544f9-zxmw5 | grep kube
Node:           kubeworker3/192.168.121.232
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-7pn58 (ro)
Tolerations:     node.kubernetes.io/not-ready:NoExecute for 300s
                 node.kubernetes.io/unreachable:NoExecute for 300s
  Normal  Scheduled  3m42s  default-scheduler     Successfully assigned default/wordpress-6bb56544f9-zxmw5 to kubeworker3
  Normal  Pulling    3m40s  kubelet, kubeworker3  Pulling image "wordpress:4.8-apache"
  Normal  Pulled     2m58s  kubelet, kubeworker3  Successfully pulled image "wordpress:4.8-apache"
  Normal  Created    2m58s  kubelet, kubeworker3  Created container wordpress
  Normal  Started    2m57s  kubelet, kubeworker3  Started container wordpress



With browser connect below link, will show wordpress install page.
http://10.1.0.4:32333/wp-admin/install.php




ssh tunneling for convenient connection to wordpress that is being run in kubernet pod..etc.
[vagrant@kubemaster storage_test]$ ssh -L 9000:10.106.208.28:80 vagrant@10.1.0.2

oyj@oyj-ThinkPad-E465:~/kuber$ ssh -L 9000:localhost:9000 vagrant@10.1.0.2


http://localhost:9000 will suffice.



#Nfs servers directory...
[vagrant@nfserver ~]$ ls /nfs/
default-storage-claim-for-wp-pvc-8c82beed-6a8a-4de9-b7de-a8d6bcecbc1c  test
[vagrant@nfserver ~]$ ls /nfs/default-storage-claim-for-wp-pvc-8c82beed-6a8a-4de9-b7de-a8d6bcecbc1c/
index.php    wp-activate.php     wp-comments-post.php  wp-content   wp-links-opml.php  wp-mail.php      wp-trackback.php
license.txt  wp-admin            wp-config-sample.php  wp-cron.php  wp-load.php        wp-settings.php  xmlrpc.php
readme.html  wp-blog-header.php  wp-config.php         wp-includes  wp-login.php       wp-signup.php
[vagrant@nfserver ~]$

2 comments: