Security
Security في Kubernetes ليست خطوة واحدة. هي طبقات: صلاحيات، Containers، Network، Images، و Secrets.
ستتعلم
Section titled “ستتعلم”| الموضوع | لماذا مهم؟ |
|---|---|
| RBAC | تحديد من يستطيع فعل ماذا |
| ServiceAccount | هوية يستخدمها Pod |
| Role و ClusterRole | تعريف الصلاحيات |
| RoleBinding | ربط الصلاحيات بالمستخدم أو ServiceAccount |
| SecurityContext | تشغيل Container بدون root وتقليل الصلاحيات |
| Pod Security Standards | قواعد أمان للـ Pods |
| Image Security | فحص Images وتقليل الحجم |
| NetworkPolicy | عزل الخدمات |
مثال SecurityContext
Section titled “مثال SecurityContext”securityContext: runAsNonRoot: true runAsUser: 10001 allowPrivilegeEscalation: falseLab مقترح
Section titled “Lab مقترح”أنشئ ServiceAccount يستطيع قراءة Pods فقط داخل Namespace محدد، ثم جرب أمر ممنوع مثل حذف Deployment وتأكد أنه يفشل.
معيار الإتقان
Section titled “معيار الإتقان”تكون جاهزا عندما تستطيع تطبيق مبدأ Least Privilege على مستخدم أو تطبيق داخل Cluster.