[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. apktool、dex2jar、jd-gui的区别及详解

    https://blog.csdn.net/themelove/article/details/53126360 反编译相关: apktool    作用:资源文件的获取,可以提取出图片文件和布局文件 ...

  2. C++语言基础(10)-虚继承

    一.产生背景 先看下列一份代码: //间接基类A class A{ protected: int m_a; }; //直接基类B class B: public A{ protected: int m ...

  3. YDKJS读书笔记

    程序的本质就是语句的集合,只不过按照顺序进行排列了而已. 语句包含表达式,表达式包含代码,程序由语句组成. interpreter,解释器:compiler,编译器:他们的职责就是将对人友好的语句翻译 ...

  4. Google Chrome v48.0.2564.

    http://www.pcpop.com/doc/1/1819/1819996.shtml 摘要:谷歌浏览器Chrome Stable 稳定版迎来例行升级,新版本号为v48.0.2564.82,上一版 ...

  5. C 调用 lua 函数

    C 调用 lua 函数 需要考虑的问题: 1. 使用 lua_pcall 可以调用 lua 函数,首先把 lua 函数入栈,然后把参数入栈, lua_pcall(luaState, 参数个数, 返回值 ...

  6. 谱聚类python实践

    聚类后: # -*- coding: utf-8 -*-"""Created on 09 05 2017 @author: similarface"" ...

  7. 小米Note全网通支持7模19频:先发标准版

    2015-06-26 16:42:53 17749 次阅读 9 次推荐 稿源:安卓中国 43 条评论 感谢安卓中国的投递 自古一入电信深似海,从此手机没法买.现在首台全网通小米手机即将诞生.6 月 2 ...

  8. 百度UEditor 用require 引入 Thinkphp5 ,图片上传问题

    用require引入,用了10分钟:上传图片,用了一个早上(吐血一地.....) 重点:require引入成功后,在需要引用UEditor的文件开头加入(ue的文件夹路径) window.UEDITO ...

  9. Hibernate通过one-to-one元素的一对一映射

    正如我们在前面的例子中讨论过的,在hibernate中执行一对一映射有两种方法: 通过many-to-one元素 通过one-to-one元素 这里,我们将通过one-to-one元素进行一对一的映射 ...

  10. Hibernate每个子类一张表(使用XML文件)实例

    在每个子类一张表的情况下,子类映射表与主键和外键关系与父类映射表相关. 类的<joined-subclass>元素用于使用主键和外键关系将子类与父对象进行映射. 在这个例子中,我们将使用h ...