Course Hero Logo

Selector matchlabels name include remind me webname

  • No School
  • AA 1
  • 121
  • 100% (1) 1 out of 1 people found this document helpful

Course Hero uses AI to attempt to automatically extract content from documents to surface to you and others so you can study better, e.g., in search results, to enrich docs, and more. This preview shows page 109 - 113 out of 121 pages.

selector:matchLabels:name: {{ include "remind-me-web.name" . }}template:
110metadata:labels:name: {{ include "remind-me-web.name" . }}spec:containers:- name: {{ .Chart.Name }} #the substitution value of thisparameter is present in Chart.yaml file.image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"ports:- name: httpcontainerPort: 80protocol: TCP---To keep the chart configurable by the end user, we have used several parameters in ourdefinitions.Let’s define the default values of these parameters in theValues.yaml file. Modifythe code in the file to reflect the following code listing.Code Listing 97: Define default valuesreplicaCount: 2nameOverride: ""fullnameOverride: ""service:port: 80targetPort: 80nodePort: 31120image:repository: "kubernetessuccinctly/remind-me-web"tag: "1.0.0"As a good practice, let’s now modify the code in theChart.yaml file to add metadata for ourchart to help the users. Modify the code to reflect the following code listing.Code Listing 98: MetadataapiVersion: v1appVersion: "1.0"description: Helm chart for remind-me-web v1name: remind-me-webversion: 0.1.0Our chart is now ready for deployment to our cluster. In the next section, we will deploy ourchart to our cluster and perform some common operations on it.
111Deploying chartsNow that our chart is ready,let’svalidate whether our chart is appropriately formed byprocessing it through a linter. Execute the following command in your terminal to validate yourchart.Code Listing 99: Validate charthelm lint ./remind-me-webFigure 63: Output validate chartNow that we have agreen signal from the linter, let’s move on to deploy this chart onthe localcluster with this command.Code Listing 100: Deploy charthelm install --name remind-me-web ./remind-me-webIn this command, you can see that we have provided the value of the.Release.Nameparameter in the command. We have used this parameter in the /templates/_help.tpl templateand the NOTES.txt file.Figure 64: Installing chart
112Your service should not be available on. Congratulations! You havesuccessfully deployed your first chart on a live cluster.You can modify values in yourDeploymenttemplate or theValuestemplate and reinstall thechart to make any modifications to your deployment.Debugging chartsWriting charts can be tricky because the templates are rendered on Tiller, which in turn sendsthe generated templates to the Kubernetes API server for processing. If you want to check thegenerated value of an expression, then comment out the expression that you want to test andexecute the following command.Code Listing 101: Check chart expressionhelm install ./remind-me-web --dry-run --debugThis command will return the manifest with the comment intact. For example, if we want toevaluate the value of the following complex expression in thehelper’stemplate, we can copythe relevant section, paste it in either thedeploymentorservicetemplate, and execute theprevious command.

Upload your study docs or become a

Course Hero member to access this document

Upload your study docs or become a

Course Hero member to access this document

End of preview. Want to read all 121 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
Fall
Professor
NoProfessor
Tags
IP address, Kubernetes

Newly uploaded documents

Show More

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture