• docker&k8s-配置/常用命令


      kubectl delete deployment,ingress,svc demo-mml-jp-ylmopt-web-1 -n demo-mml   #删除预生产环境mml组ylmopt-web工程的pod,elb,svc服务
     

    [root@gitlab-server ~]# kubectl cluster-info  --查看集群信息
    Kubernetes master is running at https://192.168.27.22:5443
    CoreDNS is running at https://192.168.27.22:5443/api/v1/namespaces/kube-system/services/coredns:dns/proxy

    [root@gitlab-server ~]# kubectl get nodes --all-namespaces   --查看节点
    NAME STATUS ROLES AGE VERSION
    192.168.109.243 Ready <none> 73d v1.13.7-r0-CCE2.0.24.B001
    192.168.119.75 Ready slave 99d v1.13.7-r0-CCE2.0.24.B001
    192.168.13.34 Ready <none> 73d v1.13.7-r0-CCE2.0.24.B001
    192.168.39.197 Ready <none> 73d v1.13.7-r0-CCE2.0.24.B001
    192.168.41.41 Ready <none> 73d v1.13.7-r0-CCE2.0.24.B001
    192.168.44.182 Ready <none> 99d v1.13.7-r0-CCE2.0.24.B00

    [root@gitlab-server ~]# kubectl get pod --all-namespaces
    NAMESPACE NAME                READY  STATUS    RESTARTS    AGE

    demo-mml      demo-mml-jp-minipay-core-1-77fbbbff4f-bzwmn                1/1     Running       0          73d

    kubectl describe pod demo-mml-jp-minipay-core-1-77fbbbff4f-bzwmn -n demo-mml #例子,查pod是否正常

    kubectl get pod,svc,ingress -n demo-mml -o wide  --查看服务和调度和容器

    [root@gitlab-server ~]# yum list installed|grep docker  --查看安装的带docker的工具
    containerd.io.x86_64 1.2.6-3.3.el7 @docker-ce-stable
    docker-ce.x86_64 3:18.09.7-3.el7 @docker-ce-stable
    docker-ce-cli.x86_64 1:18.09.7-3.el7 @docker-ce-stable

    [root@gitlab-server ~]# kubectl version  --kubelet版本
    Client Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.5", GitCommit:"2166946f41b36dea2c4626f90a77706f426cdea2", GitTreeState:"clean", BuildDate:"2019-03-25T15:26:52Z", GoVersion:"go1.11.5", Compiler:"gc", Platform:"linux/amd64"}
    Server Version: version.Info{Major:"1", Minor:"13+", GitVersion:"v1.13.7-r0-CCE2.0.24.B001", GitCommit:"6d6b92b05374cffe1efef44479ffa1ea72fc7aed", GitTreeState:"clean", BuildDate:"2019-07-18T08:24:49Z", GoVersion:"go1.11.5", Compiler:"gc", Platform:"linux/amd64"}

  • 相关阅读:
    设置页面标题title
    路由跳转,页面位置不在顶部
    PyTorch深度学习入门
    删除ubuntu后开机进入grub的解决办法
    研一上英语
    python中常用的几个函数的正确用法-lambda/filter/map/reduce
    【Python教程】 re 模块中findall() 函数返回值展现方式的用法详解
    【Python教程】5种常见字符串去除空格的操作方法
    对python中浅拷贝和深拷贝分析详细介绍
    Git使用
  • 原文地址:https://www.cnblogs.com/zhiqiao/p/11690205.html
Copyright © 2020-2023  润新知