Tất cả tài liệu
D-FKE hỗ trợ tạo Service type Load Balancer giúp user có thể dễ dàng public ứng dụng ra ngoài cluster. Hệ thống hỗ trợ cả public và private LB.
Service type LoadBalacer dạng Public để có thể truy cập từ internet. Dạng này cần có Public IP free để sử dụng.
VD file yaml:
apiVersion: v1
kind: Service
metadata:
name: web
namespace: default
spec:
selector:
app: web
ports:
– protocol: TCP
name: http
port: 80
targetPort: 80
– protocol: TCP
name: https
port: 443
targetPort: 443
type: LoadBalancer
Service type LoadBalacer dạng Private với mục đích sử dụng để truy cập nội bộ, không truy cập từ internet. Dạng này không cần có Public IP free để sử dụng.
VD file yaml:
apiVersion: v1
kind: Service
metadata:
annotations:
service.beta.kubernetes.io/fpt-load-balancer-internal: “true”
name: web
namespace: default
spec:
selector:
app: web
ports:
– protocol: TCP
name: http
port: 80
targetPort: 80
– protocol: TCP
name: https
port: 443
targetPort: 443
type: LoadBalancer
Kiểm tra service tạo thành công.
kubectl get svc
Chỉnh sửa lại Internal IP của Load Balancer. Nhập dải IP bạn muốn hệ thống cấp tự động cho LB Virtual IP:
Lưu ý: Dải IP này không được trùng với các subnet đã tạo trên hệ thống.
kubectl edit cm fptcloud-ccm-configmap -n kube-system
loadbalancer:
oneArm:
startIP: “169.254.64.1”
endIP: “169.254.127.254”
Chỉnh sửa lại startIP và endIP theo dải IP mong muốn và thực hiên save.
Thực hiện rollout để nhận config mới.
kubectl rollout restart deployment fptcloud-ccm -n kube-system
Cookie | Thời gian | Mô tả |
---|---|---|
cookielawinfo-checbox-analytics | 11 Tháng | |
cookielawinfo-checbox-functional | 11 Tháng | |
cookielawinfo-checbox-others | 11 Tháng | |
cookielawinfo-checkbox-necessary | 11 Tháng | |
cookielawinfo-checkbox-performance | 11 Tháng | |
viewed_cookie_policy | 11 Tháng |