Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create pod-dummy.yaml #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions pod-dummy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# https://github.com/dennyzhang/cheatsheet-kubernetes-A4
# https://cheatsheet.dennyzhang.com/kubernetes-yaml-templates
apiVersion: v1
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error Description: The default namespace should not be used
Category: Kubernetes | Severity: INFO
Resource: Pod [dummy], lines: 3 - 16

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error Description: Apply security context to your pods and containers
Category: Kubernetes | Severity: INFO
Resource: Pod [dummy], lines: 3 - 16

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error Description: Minimize the admission of root containers
Category: Kubernetes | Severity: MEDIUM
Resource: Pod [dummy], lines: 3 - 16

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error Description: Containers should run as a high UID to avoid host conflict
Category: Kubernetes | Severity: LOW
Resource: Pod [dummy], lines: 3 - 16

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error Description: Ensure that the seccomp profile is set to docker/default or runtime/default
Category: Kubernetes | Severity: INFO
Resource: Pod [dummy], lines: 3 - 16

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error Description: Ensure that Service Account Tokens are only mounted where necessary
Category: Kubernetes | Severity: INFO
Resource: Pod [dummy], lines: 3 - 16

kind: Pod
metadata:
name: dummy
namespace: default
labels:
env: test
spec:
containers:
- name: dummy
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error Description: Containers should not run with allowPrivilegeEscalation
Category: Kubernetes | Severity: MEDIUM
Resource: Pod [dummy], lines: 12 - 16

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error Description: CPU limits should be set
Category: Kubernetes | Severity: LOW
Resource: Pod [dummy], lines: 12 - 16

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error Description: CPU requests should be set
Category: Kubernetes | Severity: INFO
Resource: Pod [dummy], lines: 12 - 16

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error Description: Apply security context to your pods and containers
Category: Kubernetes | Severity: INFO
Resource: Pod [dummy], lines: 12 - 16

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error Description: Minimize the admission of containers with the NET_RAW capability
Category: Kubernetes | Severity: INFO
Resource: Pod [dummy], lines: 12 - 16

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error Description: Image should use digest
Category: Kubernetes | Severity: INFO
Resource: Pod [dummy], lines: 12 - 16

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error Description: Image Tag should be fixed - not latest or blank
Category: Kubernetes | Severity: INFO
Resource: Pod [dummy], lines: 12 - 16

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error Description: Liveness Probe Should be Configured
Category: Kubernetes | Severity: INFO
Resource: Pod [dummy], lines: 12 - 16

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error Description: Memory limits should be set
Category: Kubernetes | Severity: LOW
Resource: Pod [dummy], lines: 12 - 16

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error Description: Memory requests should be set
Category: Kubernetes | Severity: INFO
Resource: Pod [dummy], lines: 12 - 16

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error Description: Minimize the admission of containers with capabilities assigned
Category: Kubernetes | Severity: INFO
Resource: Pod [dummy], lines: 12 - 16

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error Description: Use read-only filesystem for containers where possible
Category: Kubernetes | Severity: LOW
Resource: Pod [dummy], lines: 12 - 16

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error Description: Readiness Probe Should be Configured
Category: Kubernetes | Severity: INFO
Resource: Pod [dummy], lines: 12 - 16

image: ubuntu
# image: busybox
args: [/bin/sh, -c,
'i=0; while true; do echo "$i: $(date)"; i=$((i+1)); sleep 1; done']