This automation will install EFK stack in OpenShift 4.x per (https://docs.openshift.com/container-platform/4.1/logging/efk-logging-deploying.html#efk-logging-deploy-subscription_efk-logging-deploying).
- An OpenShift 4 cluster (tested on OCP 4.1.8)
- k8s Ansible Module (https://docs.ansible.com/ansible/latest/modules/k8s_module.html)
git clone https://github.com/themoosman/ocp4-install-efk
This is what the k8s Ansible module will use to authenticate to OpenShift.
#Update as necessary
export KUBECONFIG=/home/themoosman/.kube/config
#Update as necessary
export KUBECONFIG=/home/.kube/config
cd ocp4-install-efk
ansible-playbook install_efk.yaml
./cleanup.sh
Current the following variables are hardcoded and need to be made dynamic.
channel
- useoc get packagemanifest elasticsearch-operator -n openshift-marketplace -o jsonpath='{.status.channels[].name}'
to get the value.csv
- useoc get packagemanifest elasticsearch-operator -n openshift-marketplace -o jsonpath='{.status.channels[].currentCSV}'
to get the value.clv
- useoc get packagemanifest cluster-logging -n openshift-marketplace -o jsonpath='{.status.channels[].currentCSV}'
to get the value.