Mock Exam 2 -cks

Hi KodeKloud team,
I had below issues while accessing the mock exam 2.

  1. Linux is not loaded using systemd so systemctl commands do not work. Two questions need systemctl to work
  2. the last question the check does not work, even if you create pod using nginx:alpine image the score is 0.
    Could someone please check.

Thanks
Harish

Hello @harishvaidya

  1. i have tried it from my side and systemctl command is working fine but you need first to ssh into node01 to execute the command, for example in qPreformatted textuestion (6)
    # First SSH to node01 from controlplane:
    
    controlplane $ ssh node01
    
    # Next, check the process which is bound to port 8088 on this node using netstat"
    
    node01 $ netstat -natulp | grep 8088
    
    # This shows that the the process openlitespeed is the one which is using this port.
    # Check if any service is running with the same name
    
    node01 $ systemctl list-units  -t service --state active | grep -i openlitespeed
    lshttpd.service                    
    loaded active running OpenLiteSpeed HTTP Server
    
    # This shows that a service called openlitespeed is managed by lshttpd.service which is currently active.
    
    # Stop the service and disable it
    
    node01 $ systemctl stop lshttpd
    node01 $ systemctl disable lshttpd
    
    # Finally, check for the package by the same name
    
    node01 $ apt list --installed | grep openlitespeed
    
    # Uninstall the package
    
    node01 $ apt remove openlitespeed -y
    

  1. Please check the answer below and let me know if the issue still exists
    # Run trivy image scan on all of the images and check which one does not have HIGH or CRITICAL vulnerabilities.

    controlplane $ trivy image nginx:alpine

    2021-04-26T03:41:49.033Z        INFO    Detecting Alpine vulnerabilities...
    2021-04-26T03:41:49.041Z        INFO    Trivy skips scanning programming language libraries because no supported file was detected
    nginx:alpine (alpine 3.13.5)
    ============================
    Total: 0 (HIGH: 0, CRITICAL: 0)
    Next, use this image to create the pod

    controlplane $ kubectl -n seth run secure-nginx-pod --image nginx:alpine
    ```


Screen Shot 2021-06-05 at 15.19.13