zoukankan      html  css  js  c++  java
  • k8s kube-proxy 生成kube-config文件

    接着上面的博客继续写

      pwd

      /etc/kubernetes

      设置集群参数

      kubectl config set-cluster kubernetes --certificate-authority=/etc/kubernetes/ssl/ca.pem --server=https://192.168.1.71:6443 --kubeconfig=kube-proxy.kubeconfig

      设置客户端认证参数

      kubectl config set-credentials kube-proxy --client-certificate=/etc/kubernetes/ssl/kube-proxy-1-71.pem --client-key=/etc/kubernetes/ssl/kube-proxy-1-71.key --kubeconfig=kube-proxy.kubeconfig

      设置上下文参数

      kubectl config set-context default --cluster=kubernetes --user=kube-proxy --kubeconfig=kube-proxy.kubeconfig

      设置默认上下文

      kubectl config use-context default --kubeconfig=kube-proxy.kubeconfig

      

      cat kube-proxy.kubeconfig  

    apiVersion: v1
    clusters:
    - cluster:
        certificate-authority: ssl/ca.pem
        server: https://192.168.1.71:6443
      name: kubernetes
    contexts:
    - context:
        cluster: kubernetes
        user: kube-proxy
      name: default
    current-context: default
    kind: Config
    preferences: {}
    users:
    - name: kube-proxy
      user:
        as-user-extra: {}
        client-certificate: ssl/kube-proxy-1-71.pem
        client-key: ssl/kube-proxy-1-71.key
  • 相关阅读:
    隔离级别 && SNAPSHOT
    多态性&& 虚函数 && 抽象类
    socket编程
    [APIO2015]巴邻旁之桥
    LuoguP3701 「伪模板」主席树
    线段树标记永久化
    [HNOI2015]开店
    NOIP2017划水记
    FFTNTT总结
    [THUWC 2017]在美妙的数学王国中畅游
  • 原文地址:https://www.cnblogs.com/S--S/p/10887468.html
Copyright © 2011-2022 走看看