| Summary: | [DOCS] example YAML files have a number of invalid fields in "Atomic Host 7 Getting Started with Containers" | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Micah Abbott <miabbott> | |
| Component: | doc-RHEL-Atomic | Assignee: | Chris Negus <cnegus> | |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Vikram Goyal <vigoyal> | |
| Severity: | high | Docs Contact: | Vikram Goyal <vigoyal> | |
| Priority: | urgent | |||
| Version: | 7.2 | CC: | cnegus, yruseva, zdover | |
| Target Milestone: | rc | Keywords: | Documentation, Reopened | |
| Target Release: | --- | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | Doc Type: | Bug Fix | ||
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1322121 1322123 (view as bug list) | Environment: | ||
| Last Closed: | 2016-03-25 13:45:14 UTC | Type: | Bug | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
I've corrected the three files and prepared the chapter for publishing. I'll comment again when the new chapter is published. I corrected the db-rc.yaml file as follows:
-------
apiVersion: v1
kind: ReplicationController
metadata:
name: db-controller
labels:
app: db
spec:
replicas: 2
selector:
app: "db"
template:
metadata:
labels:
app: "db"
spec:
containers:
- name: "db"
image: "dbforweb"
ports:
- containerPort: 3306
-------
I corrected the webserver-service.yaml file to not use a specific IP address:
-------
apiVersion: v1
kind: Service
metadata:
labels:
name: webserver
name: webserver-service
namespace: default
spec:
ports:
- port: 80
selector:
name: webserver
-------
I corrected the webserver-rc.yaml file as follows:
-------
kind: "ReplicationController"
apiVersion: "v1"
metadata:
name: "webserver-controller"
spec:
replicas: 2
selector:
name: "webserver"
template:
spec:
containers:
- name: "apache-frontend"
image: "webwithdb"
ports:
- containerPort: 80
metadata:
labels:
name: "webserver"
uses: db
-------
Please try the service and two replication controllers again using the updated yaml files.
Chris's changes are now live here [1]. Moving this bug to CLOSED-->CURRENTRELEASE. [1] https://access.redhat.com/documentation/en/red-hat-enterprise-linux-atomic-host/version-7/getting-started-with-containers/#creating_a_kubernetes_cluster_to_run_docker_formatted_container_images I tested the modified YAML files and they work with with 'kubectl' However, I'm re-opening the bug because the link to the docs still shows the old YAML files for me (checked via two browsers). Sorry Micah. Please try now. For some reason the fix didn't go through. https://access.redhat.com/documentation/en/red-hat-enterprise-linux-atomic-host/version-7/getting-started-with-containers/#creating_a_kubernetes_cluster_to_run_docker_formatted_container_images Looks good now! |
In section 3.7 "Launching Services, Replication Controllers, and Container Pods with Kubernetes", the example YAML files have a number of invalid fields for the v1 API of Kubernetes. Below is what happens when you try to use them using the 7.2.2.-2 version of RHEALAH. # atomic host status TIMESTAMP (UTC) VERSION ID OSNAME REFSPEC * 2016-03-01 01:35:21 7.2.2-2 8b2cf24b42 rhel-atomic-host rhel-atomic-host-ostree:rhel-atomic-host/7/x86_64/standard # cat db-rc.yaml --- kind: ReplicationController apiVersion: v1 metadata: name: db-controller spec: replicas: 2 selector: name: db template: spec: containers: - name: db image: dbforweb ports: - containerPort: 3306 metadata: labels: name: "db" selectorname: "db" labels: name: "db" # kubectl create -f db-rc.yaml error validating "db-rc.yaml": error validating data: [found invalid field selectorname for v1.ObjectMeta, found invalid field labels for v1.ReplicationControllerSpec]; if you choose to ignore these errors, turn validation off with --validate=false # cat webserver-service.yaml --- apiVersion: v1 kind: Service metadata: labels: name: webserver name: webserver-service namespace: default spec: ports: - port: 80 publicIPs: - 192.168.122.182 selector: name: webserver kubectl create -f webserver-service.yaml error validating "webserver-service.yaml": error validating data: found invalid field publicIPs for v1.ServiceSpec; if you choose to ignore these errors, turn validation off with --validate=false # cat webserver-rc.yaml --- apiVersion: v1 kind: ReplicationController metadata: name: webserver-controller spec: replicas: 2 selector: name: webserver template: spec: containers: - name: apache-frontend image: webwithdb ports: - containerPort: 80 metadata: labels: name: webserver uses: db labels: name: "webserver" # kubectl create -f webserver-rc.yaml error validating "webserver-rc.yaml": error validating data: found invalid field labels for v1.ReplicationControllerSpec; if you choose to ignore these errors, turn validation off with --validate=false