CKS시험대비덤프데모, CKS최신버전시험공부

그 외, ExamPassdump CKS 시험 문제집 일부가 지금은 무료입니다: https://drive.google.com/open?id=1XFgNuXum0Ff_ijJ9H9m23EK71xaGbn1K

IT업계의 치열한 경쟁속에 살아 남으려면 자신의 능력을 증명하여야 합니다. 국제승인을 받는 IT인증자격증을 많이 취득하시면 취직이든 승진이든 이직이든 모든 면에서 이득을 볼수 있습니다. 최근 Linux Foundation인증 CKS시험에 도전하는 분이 많은데 ExamPassdump에서 Linux Foundation인증 CKS시험에 대비한 가장 최신버전 덤프공부가이드를 제공해드립니다.

Linux Foundation CKS Exam Syllabus Topics:

SectionWeightObjectives
Topic 1: Monitoring, Logging and Runtime Security15%- Runtime threat detection
- Audit logging and monitoring
Topic 2: Cluster Setup15%- Hardening cluster components
- Secure installation configuration
Topic 3: System Hardening15%- Host security controls
- Kernel and node security configuration
Topic 4: Supply Chain Security20%- Image scanning and verification
- Secure CI/CD practices
Topic 5: Cluster Hardening15%- API server security
- Authentication and authorization
Topic 6: Minimizing Microservice Vulnerabilities20%- Pod security standards
- Container isolation and security contexts

>> CKS시험대비 덤프데모 <<

최근 인기시험 CKS시험대비 덤프데모 덤프샘플문제

ExamPassdump 에서는 IT인증시험에 대비한 퍼펙트한Linux Foundation 인증CKS덤프를 제공해드립니다. 시험공부할 시간이 충족하지 않은 분들은ExamPassdump 에서 제공해드리는Linux Foundation 인증CKS덤프로 시험준비를 하시면 자격증 취득이 쉬워집니다. 덤프를 구매하시면 일년무료 업데이트서비스도 받을수 있습니다.

최신 Kubernetes Security Specialist CKS 무료샘플문제 (Q11-Q16):

질문 # 11
SIMULATION
Use the kubesec docker images to scan the given YAML manifest, edit and apply the advised changes, and passed with a score of 4 points.
kubesec-test.yaml
apiVersion: v1
kind: Pod
metadata:
name: kubesec-demo
spec:
containers:
- name: kubesec-demo
image: gcr.io/google-samples/node-hello:1.0
securityContext:
readOnlyRootFilesystem: true
Hint: docker run -i kubesec/kubesec:512c5e0 scan /dev/stdin < kubesec-test.yaml

정답:A


질문 # 12
You are running a critical web application on Kubernetes. You have implemented Pod Security Policies (PSPs) to enforce security restrictions on your pods. You want to configure PSPs to enforce the following security requirements:
Only allow specific image registries: Ensure pods can only pull images from authorized registries like 'docker.ios and 'gcr.ios. Restrict container privileges: Enforce the principle of least privilege by ensuring that only a minimum number of containers have root privileges. Limit resource usage: Prevent resource starvation by restricting the CPU and memory requests of pods.
Provide the detailed configuration for your PSP to enforce these security requirements.

정답:

설명:
Solution (Step by Step) :
1. create a PSP YAML file:

2. Apply the PSP: bash kubectl apply -f restricted-psp.yaml 3. Create a Deployment with a securityContext

4. Apply the Deployment: bash kubectl apply -f myapp-deploymentyaml Note: This configuration assumes that the 'restricted-psps is applied to your entire namespace. You can use a more granular approach by applying the PSP to specific pods or deployments.


질문 # 13
SIMULATION
Create a PSP that will prevent the creation of privileged pods in the namespace.
Create a new PodSecurityPolicy named prevent-privileged-policy which prevents the creation of privileged pods.
Create a new ServiceAccount named psp-sa in the namespace default.
Create a new ClusterRole named prevent-role, which uses the newly created Pod Security Policy prevent-privileged-policy.
Create a new ClusterRoleBinding named prevent-role-binding, which binds the created ClusterRole prevent-role to the created SA psp-sa.
Also, Check the Configuration is working or not by trying to Create a Privileged pod, it should get failed.

정답:

설명:
Create a PSP that will prevent the creation of privileged pods in the namespace.
$ cat clusterrole-use-privileged.yaml
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: use-privileged-psp
rules:
- apiGroups: ['policy']
resources: ['podsecuritypolicies']
verbs: ['use']
resourceNames:
- default-psp
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: privileged-role-bind
namespace: psp-test
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: use-privileged-psp
subjects:
- kind: ServiceAccount
name: privileged-sa
$ kubectl -n psp-test apply -f clusterrole-use-privileged.yaml
After a few moments, the privileged Pod should be created.
Create a new PodSecurityPolicy named prevent-privileged-policy which prevents the creation of privileged pods.
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
name: example
spec:
privileged: false # Don't allow privileged pods!
# The rest fills in some required fields.
seLinux:
rule: RunAsAny
supplementalGroups:
rule: RunAsAny
runAsUser:
rule: RunAsAny
fsGroup:
rule: RunAsAny
volumes:
- '*'
And create it with kubectl:
kubectl-admin create -f example-psp.yaml
Now, as the unprivileged user, try to create a simple pod:
kubectl-user create -f- <<EOF
apiVersion: v1
kind: Pod
metadata:
name: pause
spec:
containers:
- name: pause
image: k8s.gcr.io/pause
EOF
The output is similar to this:
Error from server (Forbidden): error when creating "STDIN": pods "pause" is forbidden: unable to validate against any pod security policy: [] Create a new ServiceAccount named psp-sa in the namespace default.
$ cat clusterrole-use-privileged.yaml
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: use-privileged-psp
rules:
- apiGroups: ['policy']
resources: ['podsecuritypolicies']
verbs: ['use']
resourceNames:
- default-psp
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: privileged-role-bind
namespace: psp-test
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: use-privileged-psp
subjects:
- kind: ServiceAccount
name: privileged-sa
$ kubectl -n psp-test apply -f clusterrole-use-privileged.yaml
After a few moments, the privileged Pod should be created.
Create a new ClusterRole named prevent-role, which uses the newly created Pod Security Policy prevent-privileged-policy.
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
name: example
spec:
privileged: false # Don't allow privileged pods!
# The rest fills in some required fields.
seLinux:
rule: RunAsAny
supplementalGroups:
rule: RunAsAny
runAsUser:
rule: RunAsAny
fsGroup:
rule: RunAsAny
volumes:
- '*'
And create it with kubectl:
kubectl-admin create -f example-psp.yaml
Now, as the unprivileged user, try to create a simple pod:
kubectl-user create -f- <<EOF
apiVersion: v1
kind: Pod
metadata:
name: pause
spec:
containers:
- name: pause
image: k8s.gcr.io/pause
EOF
The output is similar to this:
Error from server (Forbidden): error when creating "STDIN": pods "pause" is forbidden: unable to validate against any pod security policy: [] Create a new ClusterRoleBinding named prevent-role-binding, which binds the created ClusterRole prevent-role to the created SA psp-sa.
apiVersion: rbac.authorization.k8s.io/v1
# This role binding allows "jane" to read pods in the "default" namespace.
# You need to already have a Role named "pod-reader" in that namespace.
kind: RoleBinding
metadata:
name: read-pods
namespace: default
subjects:
# You can specify more than one "subject"
- kind: User
name: jane # "name" is case sensitive
apiGroup: rbac.authorization.k8s.io
roleRef:
# "roleRef" specifies the binding to a Role / ClusterRole
kind: Role #this must be Role or ClusterRole
name: pod-reader # this must match the name of the Role or ClusterRole you wish to bind to apiGroup: rbac.authorization.k8s.io apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata:
namespace: default
name: pod-reader
rules:
- apiGroups: [""] # "" indicates the core API group
resources: ["pods"]
verbs: ["get", "watch", "list"]


질문 # 14
You have an Nginx pod deployed in your Kubernetes cluster. You need to set up a PodSecurityPolicy (PSP) that allows the Nginx pod to access only specific network ports and disallows it from accessing other ports. Describe the steps you would take to implement this PSP.

정답:

설명:
Solution (Step by Step) :
1. Create PodSecurityPolicy (PSP):
- Define a PodSecurityPolicy (PSP) YAML file. This file will restrict the Nginx pod's network access.
- For example, you could define a PSP that allows the Nginx pod to access ports 80 and 443 (HTTP and HTTPS) but restricts access to all other ports:

2. Apply the PSPI - Apply the PSP YAML file using 'kubectl apply -f nginx-psp.yaml' 3. Bind the PSP to the Nginx Pod: - Update the Nginx deployment or pod definition to include the 'securityContext' field with a reference to the created PSP:

4. Verify the psp: - Check that the Nginx pod is using the PSP by running 'kubectl describe pod ' . You should see the PSP name listed in the "Security Context" section. 5. Test Access: - Verity that the Nginx pod can access ports 80 and 443 but not other ports. You can use tools like 'telnet or 'nc' to test connectivity.


질문 # 15
You can switch the cluster/configuration context using the following command:
[desk@cli] $ kubectl config use-context prod-account
Context:
A Role bound to a Pod's ServiceAccount grants overly permissive permissions. Complete the following tasks to reduce the set of permissions.
Task:
Given an existing Pod named web-pod running in the namespace database.
1. Edit the existing Role bound to the Pod's ServiceAccount test-sa to only allow performing get operations, only on resources of type Pods.
2. Create a new Role named test-role-2 in the namespace database, which only allows performing update operations, only on resources of type statuefulsets.
3. Create a new RoleBinding named test-role-2-bind binding the newly created Role to the Pod's ServiceAccount.
Note: Don't delete the existing RoleBinding.

정답:

설명:
$ k edit role test-role -n database
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
creationTimestamp: "2021-06-04T11:12:23Z"
name: test-role
namespace: database
resourceVersion: "1139"
selfLink: /apis/rbac.authorization.k8s.io/v1/namespaces/database/roles/test-role uid: 49949265-6e01-499c-94ac-5011d6f6a353 rules:
- apiGroups:
- ""
resources:
- pods
verbs:
- * # Delete
- get # Fixed
$ k create role test-role-2 -n database --resource statefulset --verb update
$ k create rolebinding test-role-2-bind -n database --role test-role-2 --serviceaccount=database:test-sa Explanation
[desk@cli]$ k get pods -n database
NAME READY STATUS RESTARTS AGE LABELS
web-pod 1/1 Running 0 34s run=web-pod
[desk@cli]$ k get roles -n database
test-role
[desk@cli]$ k edit role test-role -n database
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
creationTimestamp: "2021-06-13T11:12:23Z"
name: test-role
namespace: database
resourceVersion: "1139"
selfLink: /apis/rbac.authorization.k8s.io/v1/namespaces/database/roles/test-role uid: 49949265-6e01-499c-94ac-5011d6f6a353 rules:
- apiGroups:
- ""
resources:
- pods
verbs:
- "*" # Delete this
- get # Replace by this
[desk@cli]$ k create role test-role-2 -n database --resource statefulset --verb update role.rbac.authorization.k8s.io/test-role-2 created [desk@cli]$ k create rolebinding test-role-2-bind -n database --role test-role-2 --serviceaccount=database:test-sa rolebinding.rbac.authorization.k8s.io/test-role-2-bind created Reference: https://kubernetes.io/docs/reference/access-authn-authz/rbac/ role.rbac.authorization.k8s.io/test-role-2 created
[desk@cli]$ k create rolebinding test-role-2-bind -n database --role test-role-2 --serviceaccount=database:test-sa rolebinding.rbac.authorization.k8s.io/test-role-2-bind created
[desk@cli]$ k create role test-role-2 -n database --resource statefulset --verb update role.rbac.authorization.k8s.io/test-role-2 created [desk@cli]$ k create rolebinding test-role-2-bind -n database --role test-role-2 --serviceaccount=database:test-sa rolebinding.rbac.authorization.k8s.io/test-role-2-bind created Reference: https://kubernetes.io/docs/reference/access-authn-authz/rbac/


질문 # 16
......

목표를 이루는 방법은 여러가지가 있는데 어느 방법을 선택하면 가장 빨리 목표를 이룰수 있을가요? Linux Foundation인증 CKS시험을 패스하는 길에는ExamPassdump의Linux Foundation인증 CKS덤프를 공부하는 것이 가장 좋은 방법이라는것을 굳게 약속드립니다. ExamPassdump의Linux Foundation인증 CKS덤프는 시험문제에 초점을 두어 제작된 공부자료이기에Linux Foundation인증 CKS패스를 가장 빠른 시일내에 한방에 할수 있도록 도와드립니다.

CKS최신버전 시험공부: https://www.exampassdump.com/CKS_valid-braindumps.html

참고: ExamPassdump에서 Google Drive로 공유하는 무료 2026 Linux Foundation CKS 시험 문제집이 있습니다: https://drive.google.com/open?id=1XFgNuXum0Ff_ijJ9H9m23EK71xaGbn1K