Drone CI 中文文档

HostAliases

The HostAliases section can add entries to a Pod’s /etc/hosts file provides Pod-level override of hostname resolution when DNS and other options are not applicable

Learn more about HostAliases

Example configuration:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
kind: pipeline
type: kubernetes
name: default

steps:
- name: cat-hosts
  image: busybox
  commands:
  - cat /etc/hosts

host_aliases:
  - ip: 127.0.0.1
    hostnames:
      - www.baidu.com