Use IBM kubernetes
1. Install some related plugins.
$ curl -sL https://ibm.biz/idt-installer | bash
2. Login to IBM Cloud Container Registry CLI
$ ibmcloud cr login
3. Check the namespace in your registry.
$ ibmcloud cr namespace-list
4. Build.
$ ibmcloud cr build -t us.icr.io/<namespace>/hello-world:1 .
5. Run image.
$ kubectl run hello-world-deployment --image=us.icr.io/<namespace>/hello-world:1 -- <your params>
6. Then you can login to your IBM Cloud control panel to check the status of your container.
7. Expose certain port.
$ kubectl expose deployment/hello-world-deployment --type=NodePort --port=8080 --name=hello-world-service --target-port=8080
------------------------------------------------------------
Other useful commands:
1. Get your current deployments.
$ kubectl get deployments
2. Inspect the basic information of your deployment.
$ kubectl describe deployments <your deployment's name>
3. Stop the deployment
$ kubectl delete deployment <your deployment's name>
4. Get available clusters
$ ibmcloud ks clusters
5. Get works of certain cluster
$ ibmcloud ks workers <cluster's name>
$ curl -sL https://ibm.biz/idt-installer | bash
2. Login to IBM Cloud Container Registry CLI
$ ibmcloud cr login
3. Check the namespace in your registry.
$ ibmcloud cr namespace-list
4. Build.
$ ibmcloud cr build -t us.icr.io/<namespace>/hello-world:1 .
5. Run image.
$ kubectl run hello-world-deployment --image=us.icr.io/<namespace>/hello-world:1 -- <your params>
6. Then you can login to your IBM Cloud control panel to check the status of your container.
7. Expose certain port.
$ kubectl expose deployment/hello-world-deployment --type=NodePort --port=8080 --name=hello-world-service --target-port=8080
------------------------------------------------------------
Other useful commands:
1. Get your current deployments.
$ kubectl get deployments
2. Inspect the basic information of your deployment.
$ kubectl describe deployments <your deployment's name>
3. Stop the deployment
$ kubectl delete deployment <your deployment's name>
4. Get available clusters
$ ibmcloud ks clusters
5. Get works of certain cluster
$ ibmcloud ks workers <cluster's name>
评论
发表评论