[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. 应用phpexcel导出excel文件后打不开的问题解决方法

    应用phpexcel导出excel文件后打不开,提示“文件格式或文件扩展名无效,请确定文件未损坏,并且文件扩展名与文件的格式匹配”. 试了以下方法: 1.首先区分文件格式是2003,还是2007. 参 ...

  2. TCP/IP ---分层

    TCP/IP的分层 ICMP是IP协议的附属协议.IP层用它来与其他主机或路由器交换错误报文和其他重要信息.尽管ICMP主要被IP使用,但应用程序也有可能访问它.我们将分析两个流行的诊断工具,Ping ...

  3. C++语言基础(5)-this和static关键字

    一.this关键字 this是一个指针,可用其访问成员变量或成员函数 下面是使用this的一个完整示例: #include <iostream> using namespace std; ...

  4. C# Activator.CreateInstance 动态创建类的实例(二)

    using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.T ...

  5. shell实现洗牌随机

    洗牌问题: 洗一副扑克,有什么好办法?既能洗得均匀,又能洗得快?即相对于一个文件来说怎样 高效率的实现乱序排列? 关于洗牌问题,其实已经有了一个很好的shell解法,这里另外给三个基于AWK的方法, ...

  6. PyCharm创建文件时自动添加头注释

    进入设置 File->settings->Editor->File and Code Templates->Python Script 添加以下代码: #!/usr/bin/e ...

  7. java继承机制

    1 继承  关键字:extends   java没有多重继承 实例 父类: package unit4; public class Base { public int publicVarofBase= ...

  8. out传值

    public void Out(out int a, out int b)        {//out相当于return返回值            //可以返回多个值            //拿过 ...

  9. php方法重写:Declaration of should be compatible with that

    <?php// this code does trigger a strict messageerror_reporting( E_ALL | E_STRICT ); class cc exte ...

  10. Ultra-QuickSort - poj 2299 (归并排序+统计逆序数)

    利用归并排序统计逆序数,利用归并求逆序在对子序列s1和s2在归并时(s1,s2已经排好序),若s1[i]>s2[j](逆序状况),则逆序数加上s1.length-i,因为s1中i后面的数字对于s ...