Completek8s Classroom notes 22/Oct/2023

kube-bench report

  • Bring up the kubeadm cluster
  • install krew to add plugins to kubectl Refer Here
(
  set -x; cd "$(mktemp -d)" &&
  OS="$(uname | tr '[:upper:]' '[:lower:]')" &&
  ARCH="$(uname -m | sed -e 's/x86_64/amd64/' -e 's/\(arm\)\(64\)\?.*/\1\2/' -e 's/aarch64$/arm64/')" &&
  KREW="krew-${OS}_${ARCH}" &&
  curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/latest/download/${KREW}.tar.gz" &&
  tar zxvf "${KREW}.tar.gz" &&
  ./"${KREW}" install krew
)
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
  • Now install tree plugin for kubectl
kubectl krew install tree
kubectl create deployment nginx --image nginx:1.16
  • Wait for the reports to be generated
  • Install trivy operator will create custom resources which are highlighted
kubectl get configauditreports.aquasecurity.github.io replicaset-nginx-85bfcd86d5 -o wide
# to get the report
kubectl get configauditreports.aquasecurity.github.io replicaset-nginx-85bfcd86d5 -o json


* Refer Here for the vulnerabilities

  • Find me resolutions to atleast 2 critical vulnerabilities

Attacker Gains Access to Pod

  • Default behavior of k8s allows us to access Pods across namespaces with in the cluster
  • The only way for us to stop this is by using a Network Policy
  • Next Steps
    • GateKeeper
    • App Armour
    • Certificates
Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a ReplyCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Animated Social Media Icons by Acurax Wordpress Development Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Exit mobile version
%%footer%%