Lỗi enable Hubble UI bị Keypair permission denied
Lỗi setup cluster k8s
Sau khi nhận thông tin về việc khách hàng setup bộ cluster k8s mới, khách chạy lệnh sau để enable hubble lên thì bị lỗi
cilium hubble enable –ui
kubectl logs hubble-relay-84584b846-wzn72 -n kube-system Error: failed to load keypair: open /var/lib/hubble-relay/tls/client.crt: permission denied
Check version cilium của khách đang chạy version v0.10.6
Xin ID cluster của khách để bên dịch vụ kiểm tra.
Phía dịch vụ kiểm tra thấy cài đặt của khách đang bị thiếu security-context (vì lý do gì chưa rõ)
Báo khách kiểm tra phần deployment hubble-relay ở namespace kube-system rồi bổ sung thêm security-context như sau:
securityContext:
capabilities:
drop:
- ALL
runAsGroup: 65532
runAsNonRoot: true
runAsUser: 65532
(hình ảnh mô tả)
Phần này khách hàng sẽ edit thẳng luôn ở file yaml qua câu lệnh:
kubectl edit deployment hubble-relay -n kube-system
Sau khi khách hàng đã thêm đoạn code cho file yaml trên nhưng vẫn bị báo lỗi invalid.
# deployments.apps "hubble-relay" was not valid: # * patch: Invalid value: "map[spec:map[template:map[spec:map[securityContext:map[capabilities:map[drop:[ALL]] runAsGroup:65532 runAsNonRoot:true runAsUser:65532]]]]]": strict decoding error: unknown field "spec.template.spec.securityContext.capabilities"
Lý do là khách hàng đã thiếu 1 đoạn code cho securityContext, khách chỉ cần thêm đoạn code sau cho securityContext như sau:
securityContext: {} chuyển thành
securityContext:
fsGroup: 65532
Sau khi khách hàng edit xong file yaml theo hướng dẫn trên thì đã setup thành công.
Bizfly Cloud chúc các bạn thành công!