Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I start a pod in privileged mode from a manifest?

Tags:

kubernetes

I am trying to start a pod in privileged mode using the following manifest but it doesn't work for me.

                     
apiVersion: v1
kind: Pod
metadata:
  name: ftp
spec:
  privileged: true
  hostNetwork: true
  containers:
  - name: ftp
    image: 84d3f7ba5876/ftp-run
like image 710
Jose Matinez Avatar asked Oct 24 '25 22:10

Jose Matinez


1 Answers

privileged: true needs to be in securityContext in the spec section of the pod template.

apiVersion: v1
kind: Pod
metadata:
  name: ftp
spec:
  hostNetwork: true
  containers:
  - name: ftp
    image: 84d3f7ba5876/ftp-run
    securityContext:
            privileged: true


        

You can refer to this doc for detailed information for privileged mode

like image 136
Sai Chandra Gadde Avatar answered Oct 26 '25 17:10

Sai Chandra Gadde