Created
August 13, 2017 17:48
-
-
Save sunnykrGupta/881a103bdb03c6cde37761f6a0799a44 to your computer and use it in GitHub Desktop.
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
## To view Nodes in a cluster | |
$kubectl get nodes | |
NAME STATUS AGE | |
gke-test-cluster-default-pool-2d123aa1-012f Ready 2d | |
gke-test-cluster-default-pool-2d123aa1-e23k Ready 2d | |
## To view the Deployment we created run: | |
$ kubectl get deployments | |
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE | |
hello-node 1 1 1 1 3m | |
## To view the Pod created by the deployment run: | |
$ kubectl get pods | |
NAME READY STATUS RESTARTS AGE | |
hello-node-714049816-ztzrb 1/1 Running 0 6m | |
## To view the Pod created by the deployment run: | |
$ kubectl get pods | |
NAME READY STATUS RESTARTS AGE | |
hello-node-714049816-ztzrb 1/1 Running 0 6m | |
## To view detailed information of the Pod: | |
$ kubectl get pods -o wide | |
or | |
$ kubectl get pods --output=wide | |
NAME READY STATUS RESTARTS AGE IP | |
dd-agent-0f75g 1/1 Running 0 23d 10.204.5.16 | |
## To view the stdout / stderr from a Pod run: | |
$ kubectl logs <POD-NAME> | |
## To view metadata about the cluster run: | |
$ kubectl cluster-info |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment