I am trying to execute nifi commands through cli as a kubernetes job, unable to execute the command.
Error:
Error executing command 'pg-list' : Connection refused (Connection refused)
Kubernetes job
apiVersion: batch/v1
kind: Job
metadata:
name: nifi
spec:
template:
spec:
containers:
- name: nifi
image: abhi09623/nifi1:latest
command:
- "/bin/sh"
- -c
- ../nifi-toolkit-1.17.0/bin/cli.sh nifi pg-list
restartPolicy: Never
backoffLimit: 4
../nifi-toolkit-1.17.0/bin/cli.sh nifi pg-list,This command is running inside pod as job.
While trying to execute nifi pg-list, it is resolving it as a localhost, but due to https unable to resolve.