This file contains hidden or 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
| [k8s@node01 ~]$ curl -L -s http://$(kubectl get svc wordpress -n default -o jsonpath='{.spec.clusterIP}') | |
| ### OUTPUT ### | |
| <!DOCTYPE html> | |
| <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US"> | |
| <head> | |
| <meta name="viewport" content="width=device-width" /> | |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
| <meta name="robots" content="noindex,nofollow" /> | |
| <title>WordPress › Installation</title> |
This file contains hidden or 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
| [cagri@BookPro ~ ]$ kubectl get deploy,po,svc | |
| NAME READY UP-TO-DATE AVAILABLE AGE | |
| deployment.apps/wordpress 1/1 1 1 22m | |
| deployment.apps/wordpress-mysql 1/1 1 1 48m | |
| NAME READY STATUS RESTARTS AGE | |
| pod/wordpress-5b886cf59b-x6csw 1/1 Running 0 22m | |
| pod/wordpress-mysql-b9ddd6d4c-rq5lw 1/1 Running 0 48m | |
| NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE |
This file contains hidden or 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
| [cagri@BookPro ~ ]$ kubectl get pv,pvc | |
| NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE | |
| persistentvolume/pvc-bb311074-9fad-4e8e-a490-7ae9626b23da 20Gi RWO Delete Bound default/wp-pv-claim rook-ceph-block 21m | |
| persistentvolume/pvc-cec93699-d695-4225-8a97-442f0e0e4b97 20Gi RWO Delete Bound default/mysql-pv-claim rook-ceph-block 47m | |
| NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE | |
| persistentvolumeclaim/mysql-pv-claim Bound pvc-cec93699-d695-4225-8a97-442f0e0e4b97 20Gi RWO rook-ceph-block 47m | |
| persistentvolumeclaim/wp-pv-claim Bound pvc-bb311074-9fad-4e8e-a490-7ae9626b23da 20Gi RWO rook-ceph-block 21m |
This file contains hidden or 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
| # Change service type to ClusterIP | |
| [cagri@BookPro ~]$ sed -i "s# type: LoadBalancer# type: ClusterIP#g" rook/cluster/examples/kubernetes/wordpress.yaml | |
| # Deploy mysql | |
| [cagri@BookPro ~]$ kubectl create -f rook/cluster/examples/kubernetes/mysql.yaml | |
| service/wordpress-mysql created | |
| persistentvolumeclaim/mysql-pv-claim created | |
| deployment.apps/wordpress-mysql created | |
| # Deploy wordpress |
This file contains hidden or 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
| apiVersion: ceph.rook.io/v1 | |
| kind: CephBlockPool | |
| metadata: | |
| name: replicapool | |
| namespace: rook-ceph | |
| spec: | |
| failureDomain: host | |
| replicated: | |
| size: 3 | |
| requireSafeReplicaSize: true |
This file contains hidden or 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
| [cagri@BookPro ~ ]$ kubectl exec \ | |
| -n rook-ceph \ | |
| -it $(kubectl get po -n rook-ceph |egrep rook-ceph-tools |awk '{print $1}') \ | |
| -- ceph osd lspools | |
| ### OUTPUT ### | |
| 1 replicapool |
This file contains hidden or 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
| [cagri@BookPro ~]$ kubectl get storageclasses.storage.k8s.io | |
| NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE | |
| rook-ceph-block rook-ceph.rbd.csi.ceph.com Delete Immediate true 55m |
This file contains hidden or 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
| [cagri@BookPro ~]$ kubectl apply -f rook/cluster/examples/kubernetes/ceph/csi/rbd/storageclass.yaml | |
| cephblockpool.ceph.rook.io/replicapool unchanged | |
| storageclass.storage.k8s.io/rook-ceph-block unchanged |
This file contains hidden or 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
| [root@rook-ceph-tools-68df79ddb6-mxglj /]# ceph osd status | |
| +----+--------+-------+-------+--------+---------+--------+---------+-----------+ | |
| | id | host | used | avail | wr ops | wr data | rd ops | rd data | state | | |
| +----+--------+-------+-------+--------+---------+--------+---------+-----------+ | |
| | 0 | node03 | 1025M | 48.9G | 0 | 0 | 0 | 0 | exists,up | | |
| | 1 | node02 | 1025M | 48.9G | 0 | 0 | 0 | 0 | exists,up | | |
| | 2 | node01 | 1025M | 48.9G | 0 | 0 | 0 | 0 | exists,up | |
This file contains hidden or 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
| [root@rook-ceph-tools-68df79ddb6-mxglj /]# ceph status | |
| cluster: | |
| id: 37ac2df9-2a8a-4aa9-a0bf-ba303ba3134c | |
| health: HEALTH_OK | |
| services: | |
| mon: 3 daemons, quorum a,b,c (age 108m) | |
| mgr: a(active, since 46m) | |
| osd: 3 osds: 3 up (since 106m), 3 in (since 106m) |
NewerOlder