DEV Community

Cover image for CKS Challenge 1
Shahriyar Al Mustakim Mitul
Shahriyar Al Mustakim Mitul

Posted on

CKS Challenge 1

Glad that you have reached that far (vi restrictinbound.yaml) from our YouTube channel and now set this metada:

Image description

to app: alpha-xyz
Then apply it

k apply -f restrict-inbound.yaml
Enter fullscreen mode Exit fullscreen mode

k get networkpolicies.networking.k8s.io
Delete the busybox pod:

Image description
k delete po busybox --force
Now you might see this while pressing the check button.

Image description

Now copy this part from the apparmor page.

annotations:
    # Tell Kubernetes to apply the AppArmor profile "k8s-apparmor-example-deny-write".
    # Note that this is ignored if the Kubernetes node is not running version 1.4 or greater.
    container.apparmor.security.beta.kubernetes.io/hello: localhost/k8s-apparmor-example-deny-write
Enter fullscreen mode Exit fullscreen mode

Then go to here:
k edit deployments.apps alpha-xyz

after app: alpha-xyz, paste this part.

Image description
Then annotate it properly and then use nginx image here.

Image description

Moreover, you have to right the annotations and then use custom-nginx image.

Image description

We are done!

Image description

Top comments (0)