apiVersion: apps/v1 kind: Deployment metadata: name: rag-app namespace: rag spec: replicas: 1 selector: matchLabels: app: rag-app template: metadata: labels: app: rag-app spec: containers: - name: rag-container image: yadavkapil23/rag-app:latest ports: - containerPort: 8000 # --- NEW CODE: INJECT HUGGINGFACE TOKEN FROM A SECRET --- env: - name: HUGGINGFACE_API_TOKEN valueFrom: secretKeyRef: # You must create a secret named 'huggingface-secret' beforehand name: huggingface-secret # Assuming the key inside the secret is also named HUGGINGFACE_API_TOKEN key: HUGGINGFACE_API_TOKEN # --------------------------------------------------------