➜ k8s git:(master) kubectl describe svc trint-mongo-mongodb-replicaset --context zapotec (git)-[master]
Name: test-mongo-mongodb-replicaset
Namespace: dev
Labels: app=mongodb-replicaset
chart=mongodb-replicaset-0.2.0
heritage=Tiller
release=test-mongo
Annotations: service.alpha.kubernetes.io/tolerate-unready-endpoints=true
Selector: app=mongodb-replicaset,release=test-mongo
Type: ClusterIP
IP: None
Port: peer 27017/TCP
Endpoints: 10.2.6.6:27017,10.2.84.5:27017,10.2.84.6:27017
Session Affinity: None
Events: <none>--
You received this message because you are subscribed to the Google Groups "Kubernetes user discussion and Q&A" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-users+unsubscribe@googlegroups.com.
To post to this group, send email to kubernetes-users@googlegroups.com.
Visit this group at https://groups.google.com/group/kubernetes-users.
For more options, visit https://groups.google.com/d/optout.
diff --git a/stable/mongodb-replicaset/templates/mongodb-service.yaml b/stable/mongodb-replicaset/templates/mongodb-service.yaml
index d2903e7..bd952b9 100644
--- a/stable/mongodb-replicaset/templates/mongodb-service.yaml
+++ b/stable/mongodb-replicaset/templates/mongodb-service.yaml
@@ -14,8 +14,8 @@ metadata:
release: {{ .Release.Name }}
name: {{ template "fullname" . }}
spec:
- type: ClusterIP
- clusterIP: None
+ type: NodePort
+ clusterIP: 10.3.0.28
ports:
- name: peer
port: {{ .Values.port }}➜ mongodb-replicaset git:(feature/mongo/update-type) ✗ kubectl get svc (git)-[feature/mongo/update-type]
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
test-mongodb-replicaset 10.3.0.28 <nodes> 27017:31876/TCP 3m
Tolerations: <none>
Events:
FirstSeen LastSeen Count From SubObjectPath Type Reason Message
--------- -------- ----- ---- ------------- -------- ------ -------
9m 9m 2 default-scheduler Warning FailedScheduling [SchedulerPredicates failed due to PersistentVolumeClaim is not bound: "datadir-test-mongodb-replicaset-0", which is unexpected., SchedulerPredicates failed due to PersistentVolumeClaim is not bound: "datadir-test-mongodb-replicaset-0", which is unexpected., SchedulerPredicates failed due to PersistentVolumeClaim is not bound: "datadir-test-mongodb-replicaset-0", which is unexpected., SchedulerPredicates failed due to PersistentVolumeClaim is not bound: "datadir-test-mongodb-replicaset-0", which is unexpected., SchedulerPredicates failed due to PersistentVolumeClaim is not bound: "datadir-test-mongodb-replicaset-0", which is unexpected., SchedulerPredicates failed due to PersistentVolumeClaim is not bound: "datadir-test-mongodb-replicaset-0", which is unexpected.]
9m 9m 1 default-scheduler Normal Scheduled Successfully assigned test-mongodb-replicaset-0 to ip-10-0-10-229.eu-west-2.compute.internal
9m 9m 1 attachdetach Warning FailedMount Failed to attach volume "pvc-88927d4f-5da9-11e7-93c0-06b40d25fce3" on node "ip-10-0-10-229.eu-west-2.compute.internal" with: Error attaching EBS volume "vol-03817831fe7d0c29e" to instance "i-04695822170b439ea": IncorrectState: vol-03817831fe7d0c29e is not 'available'.
status code: 400, request id: b7de11b0-9650-4acc-b1f8-935dcfed4895
9m 9m 1 attachdetach Warning FailedMount Failed to attach volume "pvc-88927d4f-5da9-11e7-93c0-06b40d25fce3" on node "ip-10-0-10-229.eu-west-2.compute.internal" with: Error attaching EBS volume "vol-03817831fe7d0c29e" to instance "i-04695822170b439ea": IncorrectState: vol-03817831fe7d0c29e is not 'available'.
persistentVolume:
enabled: true
## If defined, volume.beta.kubernetes.io/storage-class: <storageClass>
## Default: volume.alpha.kubernetes.io/storage-class: default
##
# storageClass: fast
accessModes:
- ReadWriteOnce
size: 30Gi
annotations: {}--
You received this message because you are subscribed to a topic in the Google Groups "Kubernetes user discussion and Q&A" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kubernetes-users/Bq1BbhSZqoU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kubernetes-users+unsubscribe@googlegroups.com.
To post to this group, send email to kubernetes-users@googlegroups.com.
Visit this group at https://groups.google.com/group/kubernetes-users.
For more options, visit https://groups.google.com/d/optout.
➜ Sandboxes kubectl describe po test-mongo-mongodb-replicaset-0
Name: test-mongo-mongodb-replicaset-0
Namespace: dev
Node: ip-10-0-10-229.eu-west-2.compute.internal/10.0.10.229
Start Time: Fri, 30 Jun 2017 17:09:15 +0100
Labels: app=mongodb-replicaset
release=test-mongo
Annotations: kubernetes.io/created-by={"kind":"SerializedReference","apiVersion":"v1","reference":{"kind":"StatefulSet","namespace":"dev","name":"test-mongo-mongodb-replicaset","uid":"76eb1449-5dae-11e7-93c0-06b4...
pod.beta.kubernetes.io/hostname=test-mongo-mongodb-replicaset-0
pod.beta.kubernetes.io/subdomain=test-mongo-mongodb-replicaset
Status: Pending
IP: 10.2.84.5
Controllers: StatefulSet/test-mongo-mongodb-replicaset
Init Containers:
install:
Container ID: docker://c3ba12e715b8e14bea4342e587ffb22b95bf4d7cd38b1705c07eaa0a5827d450
Image: gcr.io/google_containers/mongodb-install:0.4
Image ID: docker-pullable://gcr.io/google_containers/mongodb-install@sha256:2028aa0e1f1377a045993032fc84c203a07b533f0fae2b39a6674bbee6e39f06
Port:
Args:
--work-dir=/work-dir
State: Terminated
Reason: Completed
Exit Code: 0
Started: Fri, 30 Jun 2017 17:09:33 +0100
Finished: Fri, 30 Jun 2017 17:09:33 +0100
Ready: True
Restart Count: 0
Environment: <none>
Mounts:
/config from config (rw)
/var/run/secrets/kubernetes.io/serviceaccount from default-token-wwsc0 (ro)
/work-dir from workdir (rw)
bootstrap:
Container ID: docker://a4c53dd4f84849244e0745d7c7a97236f309791d2cb8ae4a0138088edca9963f
Image: mongo:3.4
Image ID: docker-pullable://mongo@sha256:f1ae736ea5f115822cf6fcef6458839d87bdaea06f40b97934ad913ed348f67d
Port:
Command:
/work-dir/peer-finder
Args:
-on-start=/work-dir/on-start.sh
-service=test-mongo-mongodb-replicaset
State: Running
Started: Fri, 30 Jun 2017 17:09:34 +0100
Ready: False
Restart Count: 0
Environment:
POD_NAMESPACE: dev (v1:metadata.namespace)
REPLICA_SET: rs0
Mounts:
/config from config (rw)
/data/db from datadir (rw)
/var/run/secrets/kubernetes.io/serviceaccount from default-token-wwsc0 (ro)
/work-dir from workdir (rw)
Containers:
mongodb-replicaset:
Container ID:
Image: mongo:3.4
Image ID:
Port: 27017/TCP
Command:
mongod
--config=/config/mongod.conf
State: Waiting
Reason: PodInitializing
Ready: False
Restart Count: 0
Liveness: exec [mongo --eval db.adminCommand('ping')] delay=30s timeout=5s period=10s #success=1 #failure=3
Readiness: exec [mongo --eval db.adminCommand('ping')] delay=5s timeout=1s period=10s #success=1 #failure=3
Environment: <none>
Mounts:
/config from config (rw)
/data/db from datadir (rw)
/var/run/secrets/kubernetes.io/serviceaccount from default-token-wwsc0 (ro)
/work-dir from workdir (rw)
Conditions:
Type Status
Initialized False
Ready False
PodScheduled True
Volumes:
datadir:
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
ClaimName: datadir-test-mongo-mongodb-replicaset-0
ReadOnly: false
config:
Type: ConfigMap (a volume populated by a ConfigMap)
Name: test-mongo-mongodb-replicaset
Optional: false
workdir:
Type: EmptyDir (a temporary directory that shares a pod's lifetime)
Medium:
default-token-wwsc0:
Type: Secret (a volume populated by a Secret)
SecretName: default-token-wwsc0
Optional: false
QoS Class: BestEffort
Node-Selectors: <none>
Tolerations: <none>
Events: <none>
➜ Sandboxes kubectl logs po test-mongo-mongodb-replicaset-0
Error from server (NotFound): pods "po" not found
➜ Sandboxes kubectl logs test-mongo-mongodb-replicaset-0
Error from server (BadRequest): container "mongodb-replicaset" in pod "test-mongo-mongodb-replicaset-0" is waiting to start: PodInitializing