Skip to content

Instantly share code, notes, and snippets.

@sarjarapu
Created July 11, 2018 20:38
Show Gist options
  • Save sarjarapu/a0aec1fce169369c4d53e88547ff32e0 to your computer and use it in GitHub Desktop.
Save sarjarapu/a0aec1fce169369c4d53e88547ff32e0 to your computer and use it in GitHub Desktop.
A kubectl command to list all the resources that the helper script has created
# display all the resources in the namespace
kubectl -n $K8_NAMESPACE get all
# NAME READY STATUS RESTARTS AGE
# pod/mongodb-world-replicaset-0 1/1 Running 0 4m
# pod/mongodb-world-replicaset-1 1/1 Running 0 4m
# pod/mongodb-world-replicaset-2 1/1 Running 0 4m
#
# NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) # AGE
# service/mongodb-world-replicaset-svc ClusterIP None <none> 27017/TCP # 4m
# service/mongodb-world-replicaset-svc-external NodePort 10.43.252.153 <none> # 27017:31750/TCP 4m
#
# NAME DESIRED CURRENT AGE
# statefulset.apps/mongodb-world-replicaset 3 3 4m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment