Yes , I commented the client_authentication: required and removed all the images and elastic data also from docker desktop and rebuild the image using docker compose up --build command and hit the api using curl in the kibana container. I can see the curl response skipping the ssl certificate verification
curl -k --cacert /usr/share/kibana/config/certs/root/rootCA.crt -u elastic https://elasticsearch:9200
Enter host password for user 'elastic':
{
"name" : "elasticsearch",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "q8Zzb1CdRpibOa21sXQMgw",
"version" : {
"number" : "8.14.0",
"build_flavor" : "default",
"build_type" : "tar",
"build_hash" : "8d96bbe3bf5fed931f3119733895458eab75dca9",
"build_date" : "2024-06-03T10:05:49.073003402Z",
"build_snapshot" : false,
"lucene_version" : "9.10.0",
"minimum_wire_compatibility_version" : "7.17.0",
"minimum_index_compatibility_version" : "7.0.0"
},
"tagline" : "You Know, for Search"
}
Accessing the http://localhost:5601/ from the browser giving me below err
Kibana server is not ready yet.
Kibana logs
2025-03-24 11:48:50 [2025-03-24T06:18:50.353+00:00][INFO ][node] Kibana process configured with roles: [background_tasks, ui]
2025-03-24 11:48:59 [2025-03-24T06:18:59.711+00:00][INFO ][plugins-service] Plugin "cloudExperiments" is disabled.
2025-03-24 11:48:59 [2025-03-24T06:18:59.725+00:00][INFO ][plugins-service] Plugin "profiling" is disabled.
2025-03-24 11:48:59 [2025-03-24T06:18:59.841+00:00][INFO ][http.server.Preboot] http server running at http://0.0.0.0:5601
2025-03-24 11:48:59 [2025-03-24T06:18:59.892+00:00][INFO ][plugins-system.preboot] Setting up [1] plugins: [interactiveSetup]
2025-03-24 11:48:59 [2025-03-24T06:18:59.940+00:00][WARN ][config.deprecation] The default mechanism for Reporting privileges will work differently in future versions, which will affect the behavior of this cluster. Set "xpack.reporting.roles.enabled" to "false" to adopt the future behavior before upgrading.
2025-03-24 11:49:00 [2025-03-24T06:19:00.235+00:00][INFO ][plugins-system.standard] Setting up [125] plugins: [translations,monitoringCollection,licensing,globalSearch,globalSearchProviders,features,mapsEms,licenseApiGuard,usageCollection,taskManager,telemetryCollectionManager,telemetryCollectionXpack,kibanaUsageCollection,share,screenshotMode,banners,newsfeed,guidedOnboarding,fieldFormats,expressions,dataViews,embeddable,uiActionsEnhanced,charts,esUiShared,customIntegrations,home,searchprofiler,painlessLab,grokdebugger,management,advancedSettings,spaces,security,lists,files,encryptedSavedObjects,cloud,snapshotRestore,screenshotting,telemetry,licenseManagement,eventLog,actions,stackConnectors,console,bfetch,data,watcher,reporting,fileUpload,ingestPipelines,alerting,aiops,unifiedSearch,unifiedFieldList,savedSearch,savedObjects,graph,savedObjectsTagging,savedObjectsManagement,presentationUtil,expressionShape,expressionRevealImage,expressionRepeatImage,expressionMetric,expressionImage,controls,eventAnnotation,dataViewFieldEditor,triggersActionsUi,transform,stackAlerts,ruleRegistry,discover,fleet,indexManagement,remoteClusters,crossClusterReplication,indexLifecycleManagement,cloudSecurityPosture,discoverEnhanced,visualizations,canvas,visTypeXy,visTypeVislib,visTypeVega,visTypeTimeseries,rollup,visTypeTimelion,visTypeTagcloud,visTypeTable,visTypeMetric,visTypeHeatmap,visTypeMarkdown,dashboard,dashboardEnhanced,expressionXY,expressionTagcloud,expressionPartitionVis,visTypePie,expressionMetricVis,expressionLegacyMetricVis,expressionHeatmap,expressionGauge,lens,maps,dataVisualizer,cases,timelines,sessionView,kubernetesSecurity,observability,osquery,ml,synthetics,securitySolution,infra,upgradeAssistant,monitoring,logstash,enterpriseSearch,apm,visTypeGauge,dataViewManagement]
2025-03-24 11:49:00 [2025-03-24T06:19:00.258+00:00][INFO ][plugins.taskManager] TaskManager is identified by the Kibana UUID: 2bbbd5e7-f6e5-4cec-ae25-a7364971df05
2025-03-24 11:49:00 [2025-03-24T06:19:00.361+00:00][WARN ][plugins.security.config] Generating a random key for xpack.security.encryptionKey. To prevent sessions from being invalidated on restart, please set xpack.security.encryptionKey in the kibana.yml or use the bin/kibana-encryption-keys command.
2025-03-24 11:49:00 [2025-03-24T06:19:00.362+00:00][WARN ][plugins.security.config] Session cookies will be transmitted over insecure connections. This is not recommended.
2025-03-24 11:49:00 [2025-03-24T06:19:00.398+00:00][WARN ][plugins.security.config] Generating a random key for xpack.security.encryptionKey. To prevent sessions from being invalidated on restart, please set xpack.security.encryptionKey in the kibana.yml or use the bin/kibana-encryption-keys command.
2025-03-24 11:49:00 [2025-03-24T06:19:00.398+00:00][WARN ][plugins.security.config] Session cookies will be transmitted over insecure connections. This is not recommended.
2025-03-24 11:49:00 [2025-03-24T06:19:00.408+00:00][WARN ][plugins.encryptedSavedObjects] Saved objects encryption key is not set. This will severely limit Kibana functionality. Please set xpack.encryptedSavedObjects.encryptionKey in the kibana.yml or use the bin/kibana-encryption-keys command.
2025-03-24 11:49:00 [2025-03-24T06:19:00.426+00:00][WARN ][plugins.actions] APIs are disabled because the Encrypted Saved Objects plugin is missing encryption key. Please set xpack.encryptedSavedObjects.encryptionKey in the kibana.yml or use the bin/kibana-encryption-keys command.
2025-03-24 11:49:00 [2025-03-24T06:19:00.534+00:00][WARN ][plugins.reporting.config] Generating a random key for xpack.reporting.encryptionKey. To prevent sessions from being invalidated on restart, please set xpack.reporting.encryptionKey in the kibana.yml or use the bin/kibana-encryption-keys command.
2025-03-24 11:49:00 [2025-03-24T06:19:00.536+00:00][WARN ][plugins.reporting.config] Found 'server.host: "0.0.0.0"' in Kibana configuration. Reporting is not able to use this as the Kibana server hostname. To enable PNG/PDF Reporting to work, 'xpack.reporting.kibanaServer.hostname: localhost' is automatically set in the configuration. You can prevent this message by adding 'xpack.reporting.kibanaServer.hostname: localhost' in kibana.yml.
2025-03-24 11:49:00 [2025-03-24T06:19:00.542+00:00][WARN ][plugins.alerting] APIs are disabled because the Encrypted Saved Objects plugin is missing encryption key. Please set xpack.encryptedSavedObjects.encryptionKey in the kibana.yml or use the bin/kibana-encryption-keys command.
2025-03-24 11:49:00 [2025-03-24T06:19:00.605+00:00][INFO ][plugins.ruleRegistry] Installing common resources shared between all indices
2025-03-24 11:49:00 [2025-03-24T06:19:00.653+00:00][INFO ][plugins.cloudSecurityPosture] Registered task successfully [Task: cloud_security_posture-stats_task]
2025-03-24 11:49:01 [2025-03-24T06:19:01.276+00:00][INFO ][plugins.screenshotting.config] Chromium sandbox provides an additional layer of protection, and is supported for Linux Ubuntu 20.04 OS. Automatically enabling Chromium sandbox.
2025-03-24 11:49:01 [2025-03-24T06:19:01.413+00:00][ERROR][elasticsearch-service] Unable to retrieve version information from Elasticsearch nodes. self signed certificate
2025-03-24 11:49:01 [2025-03-24T06:19:01.912+00:00][INFO ][plugins.screenshotting.chromium] Browser executable: /usr/share/kibana/x-pack/plugins/screenshotting/chromium/headless_shell-linux_x64/headless_shell
But I want to test the api in secure mode and also kibana is not getting started along with Elasticsearch when I do docker compose up --build. From docker desktop I have to restart the kibana manually.