• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

paulbouwer/hello-kubernetes: Provides a demo app to deploy to a Kubernetes clust ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

paulbouwer/hello-kubernetes

开源软件地址(OpenSource Url):

https://github.com/paulbouwer/hello-kubernetes

开源编程语言(OpenSource Language):

Dockerfile 44.0%

开源软件介绍(OpenSource Introduction):

Hello Kubernetes!

Docker Image Version (latest semver) Docker Image Size (latest semver) Docker Pulls

This container image can be deployed on a Kubernetes cluster. It runs a web app, that displays the following:

  • a default Hello world! message
  • namespace, pod, and node details
  • container image details

Hello world! from the hello-kubernetes image

Quick start

You can deploy hello-kubernetes to your Kubernetes cluster using Helm 3. The Helm chart installation and configuration options can be found in the Deploy using Helm guide.

When running through the following examples, ensure that you are in the chart directory in the repo, since you are referencing a local helm chart.

cd deploy/helm

Example 1: Default

Deploy the hello-kubernetes app into the hello-kubernetes namespace with the default "Hello world!" message. The app is exposed via a public Load Balancer on port 80 by default - note that a LoadBalancer service typically only works in cloud provider based Kubernetes offerings.

helm install --create-namespace --namespace hello-kubernetes hello-world ./hello-kubernetes

# get the LoadBalancer ip address.
kubectl get svc hello-kubernetes-hello-world -n hello-kubernetes -o 'jsonpath={ .status.loadBalancer.ingress[0].ip }'

Example 2: Custom message

Deploy the hello-kubernetes app into the hello-kubernetes namespace with an "I just deployed this on Kubernetes!" message. The app is exposed via a public Load Balancer on port 80 by default - note that a LoadBalancer service typically only works in cloud provider based Kubernetes offerings.

helm install --create-namespace --namespace hello-kubernetes custom-message ./hello-kubernetes \
  --set message="I just deployed this on Kubernetes!"

# get the LoadBalancer ip address.
kubectl get svc hello-kubernetes-custom-message -n hello-kubernetes -o 'jsonpath={ .status.loadBalancer.ingress[0].ip }'

Example 3: Ingress

Deploy the hello-kubernetes app into the hello-kubernetes namespace. This example assumes that an ingress has been deployed and configured in the cluster, and that the ingress has a path of /app/hello-kubernetes/ mapped to the hello-kubernetes service.

The hello-kubernetes app can be reached on the ip address of the ingress via the /app/hello-kubernetes/ path.

helm install --create-namespace --namespace hello-kubernetes ingress ./hello-kubernetes \
  --set ingress.configured=true \
  --set ingress.pathPrefix="/app/hello-kubernetes/" \
  --set service.type="ClusterIP"

Documentation

Deploying

If you'd like to explore the various Helm chart configuration options, then read the Deploy with Helm documentation. You can also discover more about the ingress configuration options in the Deploy with ingress documentation

Building your own images

If you'd like to build the hello-kubernetes container image yourself and reference from your own registry or DockerHub repository, then you can get more details on how to do this in the Build and push container images documentation.

Development environment

If you have VS Code and the VS Code Remote Containers extension installed, the .devcontainer folder will be used to provide a container based development environment. You can read more about how to use this in the Development environments documentation.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap