148422597X Kubernetes Management Design Patterns [Vohra 2017-01-29] {E559F6BB}

marco.cirilli
from marco.cirilli More from this publisher
19.06.2021 Views

Chapter 14 ■ Configuring LoggingFigure 14-21. Replication controller definition file for KibanaCreate a service definition file kibana-service.yaml for the RC and copy the following listing to the file.The Kibana service is exposed at port 5601.---apiVersion: v1kind: Servicemetadata:labels:k8s-app: elasticsearch-loggingkubernetes.io/cluster-service: "true"kubernetes.io/name: Kibananame: kibana-loggingnamespace: kube-systemspec:ports:-port: 5601protocol: TCPselector:k8s-app: kibana-logging326

Chapter 14 ■ Configuring LoggingThe service definition file in the vi editor is shown in Figure 14-22.Figure 14-22. Service definition file for KibanaCreate an RC for Kibana:./kubectl create -f kibana-rc.yamlAlso, create the Kibana service:./kubectl create -f kibana-service.yamlKibana RC and service are created as shown in Figure 14-23. List the RC and service, which are in thekube-system namespace.Figure 14-23. Creating and listing RC and service for Kibana327

Chapter 14 ■ Configuring Logging

The service definition file in the vi editor is shown in Figure 14-22.

Figure 14-22. Service definition file for Kibana

Create an RC for Kibana:

./kubectl create -f kibana-rc.yaml

Also, create the Kibana service:

./kubectl create -f kibana-service.yaml

Kibana RC and service are created as shown in Figure 14-23. List the RC and service, which are in the

kube-system namespace.

Figure 14-23. Creating and listing RC and service for Kibana

327

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!