Skip to content

Latest commit

 

History

History
38 lines (32 loc) · 572 Bytes

File metadata and controls

38 lines (32 loc) · 572 Bytes
kubectl config use-context cluster1-admin@cluster1

Generate manifest file via cli.

k run appsec-pod --image ubuntu:22.04 --dry-run=client -o yaml > 7.yaml
  1. Edit manifest by adding security configurations.
# vim 7.yaml
apiVersion: v1
kind: Pod
metadata:
  labels:
    run: appsec-pod
  name: appsec-pod
spec:
  containers:
  - image: ubuntu:22.04
    name: appsec-pod
    args:
    - sleep
    - "4800"
    securityContext:
      capabilities:
        add: ["SYS_TIME"]
      runAsUser: 0
  1. Apply updated changes.
k apply -f 7.yaml