Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PS C:\git\personal\kubectl-test> kubectl create configmap soccer-config --from-literal=postgres_user=player --from-literal=postgres_db=soccer --from-literal=postgres_password=goal --from-literal=postgres_host=soccerdb
- configmap "soccer-config" created
- PS C:\git\personal\kubectl-test> kubectl create -f soccerdb-all.yml
- service "soccerdb" created
- deployment "soccerdb" created
- persistentvolume "soccerdb-pv" created
- persistentvolumeclaim "soccerdb-pv-claim" created
- PS C:\git\personal\kubectl-test> kubectl get pods
- NAME READY STATUS RESTARTS AGE
- soccerdb-ffd68986-g2jzl 0/1 CreateContainerError 0 10s
- PS C:\git\personal\kubectl-test> kubectl describe pod soccerdb-ffd68986-g2jzl
- Controlled By: ReplicaSet/soccerdb-ffd68986
- Containers:
- soccerdb:
- Container ID:
- Image: postgres:10-alpine
- Image ID:
- Port: 5432/TCP
- State: Waiting
- Reason: CreateContainerError
- Ready: False
- Restart Count: 0
- Environment:
- POSTGRES_USER: <set to the key 'postgres_user' of config map 'soccer-config'> Optional: false
- POSTGRES_PASSWORD: <set to the key 'postgres_password' of config map 'soccer-config'> Optional: false
- POSTGRES_DB: <set to the key 'postgres_db' of config map 'soccer-config'> Optional: false
- Mounts:
- /var/lib/postgresql/data from postgres-storage (rw)
- /var/run/secrets/kubernetes.io/serviceaccount from default-token-rwsh8 (ro)
- Conditions:
- Type Status
- Initialized True
- Ready False
- PodScheduled True
- Volumes:
- postgres-storage:
- Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
- ClaimName: soccerdb-pv-claim
- ReadOnly: false
- default-token-rwsh8:
- Type: Secret (a volume populated by a Secret)
- SecretName: default-token-rwsh8
- Optional: false
- QoS Class: BestEffort
- Node-Selectors: <none>
- Tolerations: node.kubernetes.io/not-ready:NoExecute for 300s
- node.kubernetes.io/unreachable:NoExecute for 300s
- Events:
- Type Reason Age From Message
- ---- ------ ---- ---- -------
- Normal Scheduled 27s default-scheduler Successfully assigned soccerdb-ffd68986-g2jzl to docker-for-desktop
- Normal SuccessfulMountVolume 26s kubelet, docker-for-desktop MountVolume.SetUp succeeded for volume "default-token-rwsh8"
- Normal SuccessfulMountVolume 26s kubelet, docker-for-desktop MountVolume.SetUp succeeded for volume "soccerdb-pv"
- Warning DNSConfigForming 11s (x5 over 26s) kubelet, docker-for-desktop Search Line limits were exceeded, some search paths have been omitted, the applied search line is: default.svc.cluster.local svc.cluster.local cluster.local
- Normal Pulled 11s (x4 over 26s) kubelet, docker-for-desktop Container image "postgres:10-alpine" already present on machine
- Warning Failed 11s (x4 over 26s) kubelet, docker-for-desktop Error: Error response from daemon: invalid mode: /var/lib/postgresql/data
- PS C:\git\personal\kubectl-test> kubectl get pv
- NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE
- soccerdb-pv 250M RWO Retain Bound default/soccerdb-pv-claim hostpath 44s
- PS C:\git\personal\kubectl-test> kubectl describe pv soccerdb-pv
- Name: soccerdb-pv
- Labels: type=local
- Annotations: pv.kubernetes.io/bound-by-controller=yes
- StorageClass: hostpath
- Status: Bound
- Claim: default/soccerdb-pv-claim
- Reclaim Policy: Retain
- Access Modes: RWO
- Capacity: 250M
- Message:
- Source:
- Type: HostPath (bare host directory volume)
- Path: C:\temp\soccerdb-pv
- HostPathType:
- Events: <none>
Add Comment
Please, Sign In to add comment