• 在OCP集群中安装NSX ALB AKO


    NSX ALB + Harbor + OpenShift 4.8 UPI安装配置实验笔记系列目录

    目录

    1 在线安装NSXALB AKO

    2 离线安装AKO

    3 卸载AKO


    1 在线安装NSXALB AKO

    1). 在ocp中新建一个项目

    oc new-project avi-system

    2). 更新helm repo库:

    1. helm repo add ako https://projects.registry.vmware.com/chartrepo/ako

    3). 查看AKO版本:

    helm search repo

    4). 后成values.yaml文件,并修改:

    helm show values ako/ako --version 1.6.4 > values.yaml

    修改后的values.yaml内容如下(在实际生产环境中因安全管控,NodePort方式会较少使用,所以此LAB仅测试了Cluster IP方式):

    1. # Default values for ako.
    2. # This is a YAML-formatted file.
    3. # Declare variables to be passed into your templates.
    4. replicaCount: 1
    5. image:
    6. repository: projects.registry.vmware.com/ako/ako
    7. pullPolicy: IfNotPresent
    8. ### This section outlines the generic AKO settings
    9. AKOSettings:
    10. enableEvents: 'true' # Enables/disables Event broadcasting via AKO
    11. logLevel: WARN # enum: INFO|DEBUG|WARN|ERROR
    12. fullSyncFrequency: '1800' # This frequency controls how often AKO polls the Avi controller to update itself with cloud configurations.
    13. apiServerPort: 8080 # Internal port for AKO's API server for the liveness probe of the AKO pod default=8080
    14. deleteConfig: 'false' # Has to be set to true in configmap if user wants to delete AKO created objects from AVI
    15. disableStaticRouteSync: 'false' # If the POD networks are reachable from the Avi SE, set this knob to true.
    16. clusterName: ocp # A unique identifier for the kubernetes cluster, that helps distinguish the objects for this cluster in the avi controller. // MUST-EDIT
    17. cniPlugin: 'openshift' # Set the string if your CNI is calico or openshift. enum: calico|canal|flannel|openshift|antrea|ncp
    18. enableEVH: false # This enables the Enhanced Virtual Hosting Model in Avi Controller for the Virtual Services
    19. layer7Only: false # If this flag is switched on, then AKO will only do layer 7 loadbalancing.
    20. # NamespaceSelector contains label key and value used for namespacemigration
    21. # Same label has to be present on namespace/s which needs migration/sync to AKO
    22. namespaceSelector:
    23. labelKey: ''
    24. labelValue: ''
    25. servicesAPI: true # Flag that enables AKO in services API mode: https://kubernetes-sigs.github.io/service-apis/. Currently implemented only for L4. This flag uses the upstream GA APIs which are not backward compatible
    26. # with the advancedL4 APIs which uses a fork and a version of v1alpha1pre1
    27. vipPerNamespace: 'false' # Enabling this flag would tell AKO to create Parent VS per Namespace in EVH mode
    28. ### This section outlines the network settings for virtualservices.
    29. NetworkSettings:
    30. ## This list of network and cidrs are used in pool placement network for vcenter cloud.
    31. ## Node Network details are not needed when in nodeport mode / static routes are disabled / non vcenter clouds.
    32. # nodeNetworkList: []
    33. nodeNetworkList:
    34. - networkName: "Dswitch-WLD02"
    35. cidrs:
    36. - 192.168.170.0/24
    37. # - 11.0.0.1/24
    38. enableRHI: false # This is a cluster wide setting for BGP peering.
    39. nsxtT1LR: '' # T1 Logical Segment mapping for backend network. Only applies to NSX-T cloud.
    40. bgpPeerLabels: [] # Select BGP peers using bgpPeerLabels, for selective VsVip advertisement.
    41. # bgpPeerLabels:
    42. # - peer1
    43. # - peer2
    44. # vipNetworkList: [] # Network information of the VIP network. Multiple networks allowed only for AWS Cloud.
    45. vipNetworkList:
    46. - networkName: "Dswitch-LB02"
    47. cidr: 192.168.180.0/24
    48. ### This section outlines all the knobs used to control Layer 7 loadbalancing settings in AKO.
    49. L7Settings:
    50. defaultIngController: 'true'
    51. noPGForSNI: false # Switching this knob to true, will get rid of poolgroups from SNI VSes. Do not use this flag, if you don't want http caching. This will be deprecated once the controller support caching on PGs.
    52. serviceType: ClusterIP # enum NodePort|ClusterIP|NodePortLocal
    53. shardVSSize: LARGE # Use this to control the layer 7 VS numbers. This applies to both secure/insecure VSes but does not apply for passthrough. ENUMs: LARGE, MEDIUM, SMALL, DEDICATED
    54. passthroughShardSize: SMALL # Control the passthrough virtualservice numbers using this ENUM. ENUMs: LARGE, MEDIUM, SMALL
    55. ### This section outlines all the knobs used to control Layer 4 loadbalancing settings in AKO.
    56. L4Settings:
    57. defaultDomain: 'apps.ocp.corp.tanzu' # If multiple sub-domains are configured in the cloud, use this knob to set the default sub-domain to use for L4 VSes.
    58. autoFQDN: default # ENUM: default(<svc>.<ns>.<subdomain>), flat (<svc>-<ns>.<subdomain>), "disabled" If the value is disabled then the FQDN generation is disabled.
    59. ### This section outlines settings on the Avi controller that affects AKO's functionality.
    60. ControllerSettings:
    61. serviceEngineGroupName: OCPCluster-Group # Name of the ServiceEngine Group.
    62. controllerVersion: '21.1.3' # The controller API version
    63. cloudName: Default-Cloud # The configured cloud name on the Avi controller.
    64. controllerHost: 'nsxalb-01a.corp.tanzu' # IP address or Hostname of Avi Controller
    65. tenantName: admin # Name of the tenant where all the AKO objects will be created in AVI.
    66. nodePortSelector: # Only applicable if serviceType is NodePort
    67. key: ''
    68. value: ''
    69. resources:
    70. limits:
    71. cpu: 350m
    72. memory: 400Mi
    73. requests:
    74. cpu: 200m
    75. memory: 300Mi
    76. podSecurityContext: {}
    77. rbac:
    78. # Creates the pod security policy if set to true
    79. pspEnable: false
    80. avicredentials:
    81. username: ''
    82. password: ''
    83. authtoken:
    84. certificateAuthorityData:
    85. persistentVolumeClaim: ''
    86. mountPath: /log
    87. logFile: avi.log

    5). 部署AKO:

    helm install  ako/ako  --generate-name --version 1.6.4 -f /root/values.yaml  --set avicredentials.username=admin --set avicredentials.password=VMware1! --namespace=avi-system

    6). 查看AKO的运行情况

    1. oc -n avi-system get pod
    2. oc -n avi-system logs -f ako-0

    2 离线安装AKO

    创建NS 

    kubectl create ns avi-system

    解压AKO文件     

    tar -zxvf ako-1.6.2.tar.gz

    加载AKO image  

    1. cd /ako
    2. docker load < ako-1.6.2-docker.tar.gz

    编辑values.yaml  

    vi ako/values.yaml

    将AKO image Push进harbor    

    1. docker tag ako/ako:1.6.2 map.corp.tanzu/ako/ako:1.6.2
    2. docker push map.corp.tanzu/ako/ako:1.6.1

    离线安装AKO      

    helm install ./ako --generate-name --namespace=avi-system

    3 卸载AKO

    helm delete $(helm list -n avi-system -q) -n avi-system

  • 相关阅读:
    关于组织开展2022年广东省技术先进型服务企业认定工作的通知
    【Rust指南】配置加速Cargo下载、更新依赖库|利用随机数编写Rust猜数游戏
    『LeetCode|每日一题』---->打家劫舍||
    #{}和${}的区别
    python3多进程与进程池
    【代码精读】optee的进入和退出的方式
    Spring 依赖注入方式与自动装配
    printf scanf
    络蛋白Casein-PEG-Alkyne炔基/Biotin生物素/NHS
    【Mybatis笔记】狂神Mybatis笔记(有道云笔记链接)
  • 原文地址:https://blog.csdn.net/frank0521/article/details/125476722