anyone can help me on how to edit service yaml files, suppose i have created fluent-bit deamonset and i want to edit env variable in pod

anyone can help me on how to edit service yaml files, suppose i have created fluent-bit deamonset and i want to edit env variable in pod

If you want to edit an already “installed” spec you can use kubectl edit service <servicename>.

If you’re wanting to edit things locally then create your specs locally and kube kubectl apply -f myfile.yaml.

If you’re wanting to expose an environment variable to a pod you’ll use the env property:

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: mysql
  labels:
    app: mysql
spec:
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: mysql
        tier: mysql
    spec:
      containers:
      - image: mysql:5.6
        name: mysql
        env:
        - name: MYSQL_DATABASE
          value: $MYSQL_DATABASE
        - name: MYSQL_USER
          value: $MYSQL_USER
        - name: MYSQL_PASSWORD
          value: $MYSQL_PASSWORD
        - name: MYSQL_ROOT_PASSWORD
          value: $MYSQL_ROOT_PASSWORD
        ports:
        - containerPort: 3306
          name: mysql
        volumeMounts:
        - name: mysql-persistent-storage
          mountPath: /var/lib/mysql
      volumes:
      - name: mysql-persistent-storage
        persistentVolumeClaim:
          claimName: mysql