Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
DescriptionDavid Darrah/Red Hat QE
2016-03-29 20:44:16 UTC
On the "Red Hat Enterprise Linux Atomic Host 7 Getting Started with Containers" documentation page, in section 2.3.3 Launching container pods with Kubernetes the example yaml files for the replication controllers are missing the host port specifications that will allow the web server and db server to be accessible from the host os when launched from Kubernetes.
In the red-hat-enterprise-linux-atomic-host/version-7/getting-started-guide/, the images are built exposing the ports from the Dockerfile, then run with 'docker run -p' to map them to the host ports. When Kubernetes runs them, the option for a host port is not specified in the yaml, so the web server is not available from the host OS.
Suggested change to the files (just the hostPort parameter added under containerPort in the containers section:
[cloud-user@atomic01 yamlfiles]$ more db-rc.yaml
apiVersion: v1
kind: ReplicationController
metadata:
name: db-controller
spec:
replicas: 1
selector:
app: "db"
template:
metadata:
name: "db"
labels:
app: "db"
spec:
containers:
- name: "db"
image: "dbforweb"
ports:
- containerPort: 3306
hostPort: 3306
[cloud-user@atomic01 yamlfiles]$ more webserver-rc.yaml
kind: "ReplicationController"
apiVersion: "v1"
metadata:
name: "webserver-controller"
spec:
replicas: 1
selector:
name: "webserver"
template:
spec:
containers:
- name: "apache-frontend"
image: "webwithdb"
ports:
- containerPort: 80
hostPort: 80
metadata:
labels:
name: "webserver"
uses: db
[cloud-user@atomic01 yamlfiles]$
On the "Red Hat Enterprise Linux Atomic Host 7 Getting Started with Containers" documentation page, in section 2.3.3 Launching container pods with Kubernetes the example yaml files for the replication controllers are missing the host port specifications that will allow the web server and db server to be accessible from the host os when launched from Kubernetes. In the red-hat-enterprise-linux-atomic-host/version-7/getting-started-guide/, the images are built exposing the ports from the Dockerfile, then run with 'docker run -p' to map them to the host ports. When Kubernetes runs them, the option for a host port is not specified in the yaml, so the web server is not available from the host OS. Suggested change to the files (just the hostPort parameter added under containerPort in the containers section: [cloud-user@atomic01 yamlfiles]$ more db-rc.yaml apiVersion: v1 kind: ReplicationController metadata: name: db-controller spec: replicas: 1 selector: app: "db" template: metadata: name: "db" labels: app: "db" spec: containers: - name: "db" image: "dbforweb" ports: - containerPort: 3306 hostPort: 3306 [cloud-user@atomic01 yamlfiles]$ more webserver-rc.yaml kind: "ReplicationController" apiVersion: "v1" metadata: name: "webserver-controller" spec: replicas: 1 selector: name: "webserver" template: spec: containers: - name: "apache-frontend" image: "webwithdb" ports: - containerPort: 80 hostPort: 80 metadata: labels: name: "webserver" uses: db [cloud-user@atomic01 yamlfiles]$