zoukankan      html  css  js  c++  java
  • k8s-calico

    1 按照官方指导文档安装

    https://docs.projectcalico.org/v2.6/getting-started/kubernetes/installation/integration

    注意事项:

    1.1 master需要配置环境变量

    ETCD_ENDPOINTS=http://192.168.56.110:2379
    1.2 node上面的配置文件
    ubuntu@k8s-node:~$ cat /etc/cni/net.d/10-calico.conf
    {
        "name": "calico-k8s-network",
        "cniVersion": "0.1.0",
        "type": "calico",
        "etcd_endpoints": "http://192.168.56.110:2379",
        "log_level": "info",
        "ipam": {
            "type": "calico-ipam",
            "assign_ipv4": "true",
            "ipv4_pools": ["10.1.0.0/16"]
        },
        "policy": {
            "type": "k8s"
        },
        "kubernetes": {
            "kubeconfig": "/var/lib/kubelet/kubeconfig"
        }
    }
    

      1.3 需要添加地址池

    ubuntu@k8s-master:~$ cat ippool.yaml
    apiVersion: v1
    kind: ipPool
    metadata:
      cidr: "10.1.0.0/16"
    spec:
      ipip:
        enabled: true
        mode: cross-subnet
      nat-outgoing: true
      disabled: false
    ubuntu@k8s-master:~$ calicoctl apply -f ippool.yaml
    

      

     1.4 修改kubelet的配置,使其使用calico

    ubuntu@k8s-node:~$ sudo cat /etc/kubernetes/kubelet
    #KUBELET_ADDRESS="--address=127.0.0.1"
    KUBELET_HOSTNAME="--hostname-override=192.168.56.111"
    #KUBELET_API_SERVER="--api-servers=http://192.168.56.110:8080"
    # pod infrastructure container
    KUBELET_POD_INFRA_CONTAINER="--pod-infra-container-image=registry.access.redhat.com/rhel7/pod-infrastructure:latest"
    KUBELET_ARGS="--enable-server=true --enable-debugging-handlers=true --fail-swap-on=false --kubeconfig=/var/lib/kubelet/kubeconfig --network-plugin=cni  --cni-conf-dir=/etc/cni/net.d  --cni-bin-dir=/opt/cni/bin"
    

     1.5 calico-kube-controller 容器,需要在master上面创建

    ubuntu@k8s-master:~$ cat a
    apiVersion: extensions/v1beta1
    kind: Deployment
    metadata:
      name: calico-policy-controller
      namespace: kube-system
      labels:
        k8s-app: calico-policy
    spec:
      replicas: 1
      strategy:
        type: Recreate
      template:
        metadata:
          name: calico-policy-controller
          namespace: kube-system
          labels:
            k8s-app: calico-policy
        spec:
          hostNetwork: true
          containers:
            - name: calico-policy-controller
              image: quay.io/calico/kube-policy-controller:v0.7.0
              env:
                - name: ETCD_ENDPOINTS
                  value: "http://192.168.56.110:2379"
                - name: K8S_API
                  value: "https://kubernetes.default:443"
                - name: CONFIGURE_ETC_HOSTS
                  value: "true"
    

      

     

      

     
  • 相关阅读:
    wifi通信过程的研究--(2)Wifi传输认证过程
    wifi通信过程的研究--(1)Wifi基本属性介绍
    wifi通信过程的研究--(3)传输过程概念细分
    网络编程之TCP/IP各层详解
    持续集成CI与自动化构建
    IEEE 802.11标准列表
    IEEE802.11协议基础知识
    IEEE 802.11协议基础知识整理
    beacon帧字段结构最全总结(三)——VHT字段总结
    beacon帧字段结构最全总结(二)——HT字段总结
  • 原文地址:https://www.cnblogs.com/peterinblog/p/8135510.html
Copyright © 2011-2022 走看看