[root@master ~]# kubectl get nodes

NAME      STATUS    ROLES     AGE       VERSION

master    Ready     master    1h        v1.8.1

node1     Ready     <none>    1h        v1.8.1

node2     Ready     <none>    1h        v1.8.1

[root@master network]#  kubectl get po --all-namespaces

NAMESPACE     NAME                             READY     STATUS    RESTARTS   AGE

kube-system   etcd-master                      /       Running             3m

kube-system   kube-apiserver-master            /       Running             4m

kube-system   kube-controller-manager-master   /       Running             4m

kube-system   kube-dns-545bc4bfd4-kvvg2        /       Running             4m

kube-system   kube-flannel-ds-djdp4            /       Running             21s

kube-system   kube-flannel-ds-mb75s            /       Running             1m

kube-system   kube-flannel-ds-sxpkq            /       Running             18s

kube-system   kube-proxy-6s8wz                 /       Running             21s

kube-system   kube-proxy-d4snf                 /       Running             4m

kube-system   kube-proxy-lnxfv                 /       Running             18s

kube-system   kube-scheduler-master            /       Running             4m

kubectl get svc

NAME         TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)   AGE

kubernetes   ClusterIP   10.96.0.1    <none>        /TCP   8m

kubectl logs -f kubernetes-dashboard-759ccc86d9-svmlk --namespace=kube-system

// :: Starting overwatch

// :: Using in-cluster config to connect to apiserver

// :: Using service account token for csrf signing

// :: No request provided. Skipping authorization

// :: Successful initial request to the apiserver, version: v1.8.2

// :: New synchronizer has been registered: kubernetes-dashboard-key-holder-kube-system. Starting

// :: Starting secret synchronizer for kubernetes-dashboard-key-holder in namespace kube-system

// :: Generating JWE encryption key

// :: Storing encryption key in a secret

// :: Creating in-cluster Heapster client

// :: Metric client health check failed: the server could not find the requested resource (get services heapster). Retrying in  seconds.

// :: Serving insecurely on HTTP port: 

// :: Metric client health check failed: the server could not find the requested resource (get services heapster). Retrying in  seconds.

// :: Metric client health check failed: the server could not find the requested resource (get services heapster). Retrying in  seconds.

// :: Metric client health check failed: the server could not find the requested resource (get services heapster). Retrying in  seconds.

// :: Metric client health check failed: the server could not find the requested resource (get services heapster). Retrying in  seconds.

kubectl get pods -n kube-system -o wide

NAME                                    READY     STATUS    RESTARTS   AGE       IP           NODE

etcd-master                             /       Running             7m        10.10.6.11   master

kube-apiserver-master                   /       Running             8m        10.10.6.11   master

kube-controller-manager-master          /       Running             8m        10.10.6.11   master

kube-dns-545bc4bfd4-kvvg2               /       Running             8m        10.96.0.2    master

kube-flannel-ds-djdp4                   /       Running             4m        10.10.6.13   node2

kube-flannel-ds-mb75s                   /       Running             5m        10.10.6.11   master

kube-flannel-ds-sxpkq                   /       Running             4m        10.10.6.12   node1

kube-proxy-6s8wz                        /       Running             4m        10.10.6.13   node2

kube-proxy-d4snf                        /       Running             8m        10.10.6.11   master

kube-proxy-lnxfv                        /       Running             4m        10.10.6.12   node1

kube-scheduler-master                   /       Running             8m        10.10.6.11   master

kubernetes-dashboard-759ccc86d9-svmlk   /       Running             2m        10.96.2.2    node1

kubectl get svc  --all-namespaces

NAMESPACE     NAME                   TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)         AGE

default       kubernetes             ClusterIP   10.96.0.1       <none>        /TCP         1h

kube-system   kube-dns               ClusterIP   10.96.0.10      <none>        /UDP,/TCP   1h

kube-system   kubernetes-dashboard   NodePort    10.104.11.151   <none>        :/TCP    1h

[root@master ~]# 

k8s 常用命令的更多相关文章

  1. [转帖] K8S 常用命令

    k8s常用命令  原贴地址 查看集群信息: [root@kubernetes-master pods]# kubectl cluster-info kubectl cluster-info展示结果 k ...

  2. K8s常用命令操作

    K8s常用命令操作 一.kubectl命令补全 1.master安装命令补全,并临时生效 yum install -y bash-completion source /usr/share/bash-c ...

  3. k8s常用命令

    K8s一些命令:通过yaml文件创建:kubectl create -f xxx.yaml (不建议使用,无法更新,必须先delete)kubectl apply -f xxx.yaml (创建+更新 ...

  4. k8s常用命令记录

    目录 kubectl常用命令 kubectl get pod -n dev 查看日志 查看pod详情 删除pod 删除job 进入pod里面 查看namespace 创建namespace 删除nam ...

  5. k8s 常用命令汇集

    通过yaml文件创建: kubectl create -f xxx.yaml (不建议使用,无法更新,必须先delete) kubectl apply -f xxx.yaml (创建+更新,可以重复使 ...

  6. k8s常用命令演示

    kubectl run --image=xxx name_xx --port kubectl run --image=nginx nginx-app --port=80 kubectl expose ...

  7. ARTS-S k8s常用命令

    本地访问minikube的docker eval $(minikube docker-env) 删除statefulset kubectl delete statefulset web --casca ...

  8. k8s常用操作命令

    K8s常用命令操作 一.kubectl命令补全 .master安装命令补全,并临时生效 yum install -y bash-completion source /usr/share/bash-co ...

  9. 使用kubectl管理Kubernetes(k8s)集群:常用命令,查看负载,命名空间namespace管理

    目录 一.系统环境 二.前言 三.kubectl 3.1 kubectl语法 3.2 kubectl格式化输出 四.kubectl常用命令 五.查看kubernetes集群node节点和pod负载 5 ...

随机推荐

  1. vue 跨域:使用vue-cli 配置 proxyTable 实现跨域问题

    路径在/config/index.js 中,找到dev.proxyTable.如下配置示例: proxyTable: { '/api': { // 我要请求的地址 target: 'http://oa ...

  2. mac os x 使用scp取代sz rz

    在windows下,能够通过secureCRT的sz来下载文件,而用rz来上传文件.在unix/linux下则不必.由于scp命令能够完毕这项目工作. sz file替代方案为:scp usernam ...

  3. C#取调用堆栈StackTrace

    Environment.StackTrace or System.Diagnostics.StackTrace if you need a more convienient (i.e. not str ...

  4. hdu 4059 数论+高次方求和+容斥原理

    http://acm.hdu.edu.cn/showproblem.php? pid=4059 现场赛中通过率挺高的一道题 可是容斥原理不怎么会.. 參考了http://blog.csdn.net/a ...

  5. C语言基础(20)-文件操作(fopen,getc,fclose)

    一.文件操作 读文件的顺序: 1.先打开文件 2.读写文件 3.关闭文件 1.1 fopen FILE *fopen( const char *path, const char *mode ); 函数 ...

  6. char *strrchr使用

    /* 这个函数用到的少 这次用到记录一下 */ /* 函数原型: char *strrchr(const char *str, char c) * 功能: 找到字符c在字符串str中最后出现的位置,返 ...

  7. python 开发技巧(1)-- 用PyCharm安装第三方库

    在python开发中,我们经常需要安装一些python的第三方类库,包等等,用PyCharm就会安装就会超级方便 1.打开上面的小扳手 2.点击页面左边的Project Interpreter 3.点 ...

  8. js 把字符串当做方法执行

    <SCRIPT LANGUAGE="JavaScript"> function test(str){ alert(str); } eval('test("aa ...

  9. Python中threading的join和setDaemon的区别及用法[例子]

    Python多线程编程时,经常会用到join()和setDaemon()方法,今天特地研究了一下两者的区别. 1.join ()方法:主线程A中,创建了子线程B,并且在主线程A中调用了B.join() ...

  10. socket编码问题

    server.py import socket ip_port = ('127.0.0.1',9999) sk = socket.socket() sk.bind(ip_port) sk.listen ...