[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. Hive学习 系列博客

    原 Hive作业优化 原 Hive学习六:HIVE日志分析(用户画像) 原 Hive学习五--日志案例分析 原 Hive学习三 原 Hive学习二 原 Hive学习一 博客来源,https://blo ...

  2. Notes from Data Guard

    There are two types of Standby databases: 1, Physical standby database block-for-block basis the phy ...

  3. Atitit.变量的定义 获取 储存 物理结构 基本类型简化 隐式转换 类型推导 与底层原理 attilaxDSL

    Atitit.变量的定义 获取 储存 物理结构 基本类型简化 隐式转换 类型推导 与底层原理 attilaxDSL 1.1. $ 美元字符, php 黑头1 1.2. 默认变量的范围和声明:1 1.3 ...

  4. Boolean 转 string

    boolean b=false; String b= String.valueOf(b);

  5. iOS swift 代理协议

    swift中的代理实现和oc中是有区别的 protocol HXQLimitedTextFieldDelegate{ func test() } 代理中默认所有方法都是required,如果需要某个代 ...

  6. jquery.cookie.js 使用小结

    先引入jquery,再引入:jquery.cookie.js 添加一个"会话cookie" $.cookie('the_cookie', 'the_value'); 这里没有指明 ...

  7. 第二百零二节,jQuery EasyUI,Layout(布局)组件

    jQuery EasyUI,Layout(布局)组件 学习要点: 1.加载方式 2.布局属性 3.区域面板属性 4.方法列表 本节课重点了解 EasyUI 中 Layout(布局)组件的使用方法,这个 ...

  8. Unity3D学习笔记——Android重力感应控制小球

    一:准备资源 两张贴图:地图和小球贴图. 二:导入资源 在Assets下建立resources文件夹,然后将贴图导入. 三:建立场景游戏对象 1.建立灯光: 2.创建一个相机,配置默认. 3.建立一个 ...

  9. 升级Ubuntu

    最近需要升级Ubuntu,所以查了这方面的资料,做点小记: 1.apt-get update 与 apt-get ugrade 其实这个和Ubuntu升级没关系,这是升级安装包相关的命令,apt-ge ...

  10. 输入一个十进制数N,将它转换成R进制数输出(运用递归实现)

    #include<stdio.h> int cnt=0;                             //用来记录每个进制存放的位置 char num[20];   //用来存 ...