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
  • 相关阅读:
    数据库使用动态监听导致EM起不来的解决方法
    OCP-1Z0-053-V12.02-115题
    OCP-1Z0-053-V12.02-150题
    OCP-1Z0-053-V12.02-136题
    OCP-1Z0-053-V12.02-154题
    OCP-1Z0-053-V12.02-149题
    OCP-1Z0-053-V12.02-146题
    OCP-1Z0-053-V12.02-160题
    OCP-1Z0-053-V12.02-157题
    OCP-1Z0-053-V12.02-164题
  • 原文地址:https://www.cnblogs.com/S--S/p/10887468.html
Copyright © 2011-2022 走看看