Open
Conversation
Author
|
https://hub.docker.com/r/somefive/hello-world/tags Tags (2) |
wonderflow
reviewed
Jul 31, 2019
| 在根目录下我们看到有一个`values.yaml`文件,这个文件提供了应用在安装时的默认参数。在默认的`Values`中,我们看到`replicaCount: 1`说明该应用在默认部署的状态下只有一个副本。 | ||
|
|
||
| 为了使用我们要部署应用的镜像,我们看到deployment.yaml里在`spec.template.spec.containers`里,`image`和`imagePullPolicy`都使用了`Values`中的值。其中`image`字段由`.Values.image.repository`和`.Chart.AppVersion`组成。看到这里,同学们应该就知道我们需要变更的字段了,一个是位于values.yaml内的`image.repository`,另一个是位于Chart.yaml里的`AppVersion`。我们将它们与我们需要部署应用的docker镜像匹配起来。这里我们把values.yaml里的`image.repository`设置成`somefive/hello-world`,把Chart.yaml里的`AppVersion`设置成`1.0.0`即可。 | ||
| 为了使用我们要部署应用的镜像,我们看到deployment.yaml里在`spec.template.spec.containers`里,`image`和`imagePullPolicy`都使用了`Values`中的值。其中`image`字段由`.Values.image.repository`和`.Chart.AppVersion`组成。看到这里,同学们应该就知道我们需要变更的字段了,一个是位于values.yaml内的`image.repository`,另一个是位于Chart.yaml里的`AppVersion`。我们将它们与我们需要部署应用的docker镜像匹配起来。这里我们把values.yaml里的`image.repository`设置成`somefive/hello-world`,`image.tag`设置成`1.0.0`即可。 |
Contributor
|
In deployment.yaml, we set the image field to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.