k8s big-ip control 安装使用
k8s big-ip control 安装使用
0. 准备工作
网络打通,这里没有使用fannel,没有使用vxlan 。
在f5界面 创建f5分区。这里是cce-test。
1. 安装bigip control
kubectl create serviceaccount bigip-ctlr -n kube-system
kubectl get sa -n kube-system
创建ClusterRole ,ClusterRole
f5-k8s-sample-rbac.yaml
# for use in k8s clusters only
# for OpenShift, use the OpenShift-specific examples
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: bigip-ctlr-clusterrole
rules:
- apiGroups: ["", "extensions"]
resources: ["nodes", "services", "endpoints", "namespaces", "ingresses", "pods"]
verbs: ["get", "list", "watch"]
- apiGroups: ["", "extensions"]
resources: ["configmaps", "events", "ingresses/status"]
verbs: ["get", "list", "watch", "update", "create", "patch"]
- apiGroups: ["", "extensions"]
resources: ["secrets"]
resourceNames: ["<secret-containing-bigip-login>"]
verbs: ["get", "list", "watch"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: bigip-ctlr-clusterrole-binding
namespace: kube-system
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: bigip-ctlr-clusterrole
subjects:
- apiGroup: ""
kind: ServiceAccount
name: bigip-ctlr
namespace: kube-system
kubectl get clusterroles.rbac.authorization.k8s.io -n kube-system
NAME AGE
admin 2d12h
aggregate-network-attachment-definitions-admin 2d12h
aggregate-network-attachment-definitions-edit 2d12h
aggregate-network-attachment-definitions-view 2d12h
bigip-ctlr-clusterrole 46h
cluster-admin 2d12h
copaddon-nginx-ingress 2d12h
coredns 2d12h
edit 2d12h
kubectl get clusterrolebindings.rbac.authorization.k8s.io -n kube-system
NAME AGE
auto-approve-csrs-for-group 2d12h
auto-approve-renewals-for-nodes 2d12h
auto-approve-renewals-for-nodes-server 2d12h
bigip-ctlr-clusterrole-binding 46h
f5-k8s-bigip-ctlr_basic.yaml
kubectl create secret generic bigip-login --namespace kube-system --from-literal=username=admin --from-literal=password=admin
kubectl describe secret bigip-login -n kube-system
kubectl apply -f f5-k8s-bigip-ctlr_basic.yaml
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: k8s-bigip-ctlr-deployment
namespace: kube-system
spec:
# DO NOT INCREASE REPLICA COUNT
replicas: 1
template:
metadata:
name: k8s-bigip-ctlr
labels:
app: k8s-bigip-ctlr
spec:
# Name of the Service Account bound to a Cluster Role with the required
# permissions
serviceAccountName: bigip-ctlr
containers:
- name: k8s-bigip-ctlr
image: "f5networks/k8s-bigip-ctlr"
imagePullPolicy: IfNotPresent
env:
- name: BIGIP_USERNAME
valueFrom:
secretKeyRef:
# Replace with the name of the Secret containing your login
# credentials
name: bigip-login
key: username
- name: BIGIP_PASSWORD
valueFrom:
secretKeyRef:
# Replace with the name of the Secret containing your login
# credentials
name: bigip-login
key: password
command: ["/app/bin/k8s-bigip-ctlr"]
args: [
# See the k8s-bigip-ctlr documentation for information about
# all config options
# https://clouddocs.f5.com/products/connectors/k8s-bigip-ctlr/latest
"--bigip-username=$(BIGIP_USERNAME)",
"--bigip-password=$(BIGIP_PASSWORD)",
"--bigip-url=xxxxxxxxx",
"--bigip-partition=cce-test",
"--pool-member-type=cluster"
]
# imagePullSecrets:
# # Secret that gives access to a private docker registry
# - name: f5-docker-images
# # Secret containing the BIG-IP system login credentials
# - name: bigip-login
指定bigip-url
bigip-partition
pool-member-type
看下deployment日志有没有报错:
kubectl logs k8s-bigip-ctlr-deployment-bcf87fdb8-ztj9f -n kube-system
2. 创建应用和对应f5 vs的configmap
创建应用,这里以nginx为例:
kubectl create deployment --image=nginx nginx1
kubectl expose deployment nginx1 --port=80
创建f5vs的configmap
f5-resource-vs-example.configmap.yaml
kind: ConfigMap
apiVersion: v1
metadata:
name: nginx1.vs
labels:
f5type: virtual-server
data:
# See the f5-schema table for schema-controller compatibility
# https://clouddocs.f5.com/containers/latest/releases_and_versioning.html#f5-schema
schema: "f5schemadb://bigip-virtual-server_v0.1.7.json"
data: |
{
"virtualServer": {
"backend": {
"servicePort": 80,
"serviceName": "nginx1",
"healthMonitors": [{
"interval": 30,
"protocol": "http",
"send": "GET / HTTP/1.1\r\nHost:abc.com\r\n\r\n",
"recv": "200|OK",
"timeout": 120
}]
},
"frontend": {
"virtualAddress": {
"port": 80,
"bindAddr": "xxxxxxxxxx"
},
"partition": "cce-test",
"balance": "least-connections-member",
"mode": "http"
}
}
}
填写backend, frontend。
官网有比较详细的解释,参数可以添加很多。https://clouddocs.f5.com/products/connectors/k8s-bigip-ctlr/v1.10/
k8s big-ip control 安装使用的更多相关文章
- Istio(二):在Kubernetes(k8s)集群上安装部署istio1.14
目录 一.模块概览 二.系统环境 三.安装istio 3.1 使用 Istioctl 安装 3.2 使用 Istio Operator 安装 3.3 生产部署情况如何? 3.4 平台安装指南 四.Ge ...
- Sublime Text以及Package Control安装方法
官方下载:Sublime Text 中国论坛:Sublime 论坛 Sublime Text 是一个代码编辑器,具有漂亮的用户界面和强大的功能,并且它还是一个跨平台的编辑器,同时支持Windows.L ...
- Mac下sublime text 的“package control”安装
小伙伴们好,我根据昨晚的经历写一个小总结:关于“Mac下sublime text 的“package control”安装”.本来安装package control是一个无比简单的事情,即使是初次使用 ...
- 006_Mac下sublime text 的“package control”安装,sublimepackage
Mac下sublime text 的“package control”安装,sublimepackage 小伙伴们好,我根据昨晚的经历写一个小总结:关于“Mac下sublime text 的“pack ...
- 国内不fq安装K8S三: 使用helm安装kubernet-dashboard
目录 3 使用helm安装kubernet-dashboard 3.1 Helm的安装 3.2 使用Helm部署Nginx Ingress 3.3 使用Helm部署dashboard 3.4 使用He ...
- 【K8S】K8S 1.18.2安装dashboard(基于kubernetes-dashboard 2.0.0版本)
[K8S]K8S 1.18.2安装dashboard(基于kubernetes-dashboard 2.0.0版本) 写在前面 K8S集群部署成功了,如何对集群进行可视化管理呢?别着急,接下来,我们一 ...
- k8s第二回之k8s集群的安装
1. k8s集群的安装 目录 1. k8s集群的安装 1.架构: 2.环境准备 3.master节点安装etcd 4. master节点安装kubernetes 5.node节点安装kubernete ...
- Sublime Text 3常用快捷键 以及package control 安装
网络上搜索到的,现整理下来备用: package control安装 view下 ctrl+~ import urllib.request,os; pf = 'Package Control.subl ...
- 通过 Sublime Package Control 安装插件后不能用的解决办法
最近使用 Sublime 写 SASS 的时候需要使用高亮功能,通过 Package Control 安装了相关插件,但是安装之后没有反应,再次打开 Package Control 的时候,已经搜索不 ...
随机推荐
- php表格--大数据处理
参考来源1:https://blog.csdn.net/tim_phper/article/details/77581071 参考来源2:https://blog.csdn.net/qq_376822 ...
- 2019-2020-1 20199325《Linux内核原理与分析》第七周作业
第七周作业 1.进程描述符task_struct数据结构(一) 为了管理进程,内核必须对每个进程进行清晰的描述,进程描述符提供了内核所需了解的进程信息. struct task_struct数据结构很 ...
- Spring Boot JPA中关联表的使用
文章目录 添加依赖 构建Entity 构建Repository 构建初始数据 测试 Spring Boot JPA中关联表的使用 本文中,我们会将会通过一个Book和Category的关联关系,来讲解 ...
- Tomcat7 启动慢的问题解决
[问题] 由于上面标记部分,导致启动耗时将近160s,不能忍! [原因] 此于jvm环境配置有关,请打开jvm安装目录中jre/lib/security/java.security文件,找到secur ...
- 安装并使用pyecharts库
在cmd命令行中输入安装命令, pyecharts库的安装命令如下: pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pyecharts ...
- Vue移动端项目中下拉刷新和上拉加载
Vue2.0中引入Mint-UI的下拉刷新和上拉加载.简单粗暴 安装Mint-UI npm i mint-ui -S 引入 打开项目的main.js入口文件,引入并使用.注意,为了方便,这里是全部引入 ...
- Linux打开文件句柄/proc/sys/fs/file-max和ulimit -n的区别
max-file 表示系统级别的能够打开的文件句柄的数量.是对整个系统的限制,并不是针对用户的.ulimit -n 控制进程级别能够打开的文件句柄的数量.提供对shell及其启动的进程的可用文件句柄的 ...
- 重识TCP/IP协议族与HTTP基础
不忘初心 砥砺前行, Tomorrow Is Another Day ! 本文概要: TCP/IP协议族的网络分层 TCP三次握手四次挥手 Http简介 报文结构 Http的请求方法及状态码 常用的H ...
- 地表最强的MySQL安装一键式安装,信不信你下完我就给你装好!附各种Mysql安装失败的解决办法(什么你安装失败了?快来看这个)
这里还有数据库相关的优质文章:快戳我,快戳我
- CF1288C-Two Arrays (DP)
You are given two integers n and m. Calculate the number of pairs of arrays (a,b) such that: the len ...