kubernetes pv pvc

{
  "kind": "PersistentVolume",
  "apiVersion": "v1",
  "metadata": {
    "name": "pvc-d9812f60-512b-11e8-88c7-0800273938d3",
    "selfLink": "/api/v1/persistentvolumes/pvc-d9812f60-512b-11e8-88c7-0800273938d3",
    "uid": "d9a18a6f-512b-11e8-88c7-0800273938d3",
    "resourceVersion": "31821",
    "creationTimestamp": "2018-05-06T12:49:01Z",
    "annotations": {
      "hostPathProvisionerIdentity": "433af89e-4ff2-11e8-ac42-0800273938d3",
      "pv.kubernetes.io/provisioned-by": "k8s.io/minikube-hostpath"
    },
    "finalizers": [
      "kubernetes.io/pv-protection"
    ]
  },
  "spec": {
    "capacity": {
      "storage": "8Gi"
    },
    "hostPath": {
      "path": "/tmp/hostpath-provisioner/pvc-d9812f60-512b-11e8-88c7-0800273938d3",
      "type": ""
    },
    "accessModes": [
      "ReadWriteOnce"
    ],
    "claimRef": {
      "kind": "PersistentVolumeClaim",
      "namespace": "default",
      "name": "funky-umbrellabird-jenkins",
      "uid": "d9812f60-512b-11e8-88c7-0800273938d3",
      "apiVersion": "v1",
      "resourceVersion": "31800"
    },
    "persistentVolumeReclaimPolicy": "Delete",
    "storageClassName": "standard"
  },
  "status": {
    "phase": "Bound"
  }
}

 

 

printf $(kubectl get secret --namespace default foolish-sponge-jenkins -o jsonpath="{.data.jenkins-admin-password}" | base64 --decode);echo

 

helm install stable/jenkins --set rbac.install=true

 

{
  "kind": "PersistentVolumeClaim",
  "apiVersion": "v1",
  "metadata": {
    "name": "funky-umbrellabird-jenkins",
    "namespace": "default",
    "selfLink": "/api/v1/namespaces/default/persistentvolumeclaims/funky-umbrellabird-jenkins",
    "uid": "d9812f60-512b-11e8-88c7-0800273938d3",
    "resourceVersion": "31888",
    "creationTimestamp": "2018-05-06T12:49:00Z",
    "labels": {
      "app": "funky-umbrellabird-jenkins",
      "chart": "jenkins-0.13.5",
      "heritage": "Tiller",
      "release": "funky-umbrellabird"
    },
    "annotations": {
      "control-plane.alpha.kubernetes.io/leader": "{\"holderIdentity\":\"433af970-4ff2-11e8-ac42-0800273938d3\",\"leaseDurationSeconds\":15,\"acquireTime\":\"2018-05-06T12:49:01Z\",\"renewTime\":\"2018-05-06T12:49:32Z\",\"leaderTransitions\":0}",
      "pv.kubernetes.io/bind-completed": "yes",
      "pv.kubernetes.io/bound-by-controller": "yes",
      "volume.beta.kubernetes.io/storage-provisioner": "k8s.io/minikube-hostpath"
    },
    "finalizers": [
      "kubernetes.io/pvc-protection"
    ]
  },
  "spec": {
    "accessModes": [
      "ReadWriteOnce"
    ],
    "resources": {
      "requests": {
        "storage": "8Gi"
      }
    },
    "volumeName": "pvc-d9812f60-512b-11e8-88c7-0800273938d3",
    "storageClassName": "standard"
  },
  "status": {
    "phase": "Bound",
    "accessModes": [
      "ReadWriteOnce"
    ],
    "capacity": {
      "storage": "8Gi"
    }
  }
}

 

 

{
  "kind": "StorageClass",
  "apiVersion": "storage.k8s.io/v1",
  "metadata": {
    "name": "standard",
    "selfLink": "/apis/storage.k8s.io/v1/storageclasses/standard",
    "uid": "7708e9a2-456f-11e8-8668-0800273938d3",
    "resourceVersion": "364",
    "creationTimestamp": "2018-04-21T14:22:47Z",
    "labels": {
      "addonmanager.kubernetes.io/mode": "Reconcile"
    },
    "annotations": {
      "kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"storage.k8s.io/v1\",\"kind\":\"StorageClass\",\"metadata\":{\"annotations\":{\"storageclass.beta.kubernetes.io/is-default-class\":\"true\"},\"labels\":{\"addonmanager.kubernetes.io/mode\":\"Reconcile\"},\"name\":\"standard\",\"namespace\":\"\"},\"provisioner\":\"k8s.io/minikube-hostpath\"}\n",
      "storageclass.beta.kubernetes.io/is-default-class": "true"
    }
  },
  "provisioner": "k8s.io/minikube-hostpath",
  "reclaimPolicy": "Delete",
  "volumeBindingMode": "Immediate"
}

 

 

kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name: local-storage
provisioner: kubernetes.io/no-provisioner
volumeBindingMode: WaitForFirstConsumer

 

posted @ 2018-05-07 22:11  二奎  阅读(828)  评论(0编辑  收藏  举报