Ajay Tripathy 7 лет назад
Родитель
Сommit
ec97770d77
1 измененных файлов с 11 добавлено и 3 удалено
  1. 11 3
      README.md

+ 11 - 3
README.md

@@ -26,9 +26,7 @@ The recommended way to install the Kubecost cost model (along with dashboards) i
 
 
 Compared to building from source, this is faster and includes all necessary dependencies. The Kubecost cost model is also available as a container (kubecost/cost-model) and you can deploy run the Golang code yourself as described in the section below.
 Compared to building from source, this is faster and includes all necessary dependencies. The Kubecost cost model is also available as a container (kubecost/cost-model) and you can deploy run the Golang code yourself as described in the section below.
 
 
-## Contributing
-
-We welcome any contributions to the project! 
+## Deploying as a pod
 
 
 If you want to just run the cost model (w/o dashboards) directly on your cluster, complete the following steps:
 If you want to just run the cost model (w/o dashboards) directly on your cluster, complete the following steps:
 
 
@@ -41,6 +39,16 @@ To test that the server is running, you can hit http://localhost:9001/costDataMo
 
 
 Note: the following dependencies mentioned above are required for this installation path.
 Note: the following dependencies mentioned above are required for this installation path.
 
 
+## Contributing
+
+We welcome any contributions to the project! To test, you'll need to build the cost-model docker container then push it to a kubernetes cluster with a running prometheus.
+
+1. `docker build --rm -f "Dockerfile" -t <repo>/kubecost-cost-model:<tag> .`
+2. Edit the [pulled image](https://github.com/kubecost/cost-model/blob/master/kubernetes/deployment.yaml#L22) in the deployment.yaml to <repo>/kubecost-cost-model:<tag>
+3. Set [this environment variable](https://github.com/kubecost/cost-model/blob/master/kubernetes/deployment.yaml#L30) to the address of your prometheus server
+4. `kubectl create namespace cost-model`
+5. `kubectl apply -f kubernetes/ --namespace cost-model`
+6. `kubectl port-forward --namespace cost-model service/cost-model 9001`
 
 
 ## Licensing
 ## Licensing