I trying to setup drone on kubernetes runner.
I found a document that Kubernetes runner required to specify a port in yaml file.
Strangely, if hostname contains an underscore, the service cannot be accessed from the pipeline step.
When I was delete underscore on service name, It works properly.
Here is the example.
- name: db_db
- name: ping-mysql
# wait for mysql service to become available
until ( mysqladmin -u$DATABASE_USERNAME -p$DATABASE_PASSWORD -h$DATABASE_HOSTNAME ping --connect_timeout=2 )
if [ $count -gt $RETRY_COUNT ]
echo "Failed to start required services."
echo "Checking the services(retry = $count)"
step ping-mysql output:
mysqladmin: connect to server at 'db_db' failed
error: 'Unknown MySQL server host 'db_db' (0)'
Check that mysqld is running on db_db and that the port is 3306.
You can check this by doing 'telnet db_db 3306'
Checking the services(retry = 1)
One thing that jumps out is that steps with commands should be placed in the steps section, not in the service section. Also can you confirm you installed the drone/drone-kube-runner:1 image? If you installed from Helm stable please read this comment.
The charts in Helm stable are broken and are not an officially supported installation method. We recommend using gtaylor/drone-charts instead, which we plan to adopt as our official charts in the coming weeks.
If you used helm stable your installation is not going to work.
Here is more information for kubernetes executor:
This image was used by an experimental kubernetes integration that was deprecated almost a year ago. The stable helm chart produces an invalid installation that uses this deprecated feature and should therefore be avoided. Instead use gtaylor/drone-charts.