I followed all the google documentation to deploy a docker image into goole compute (this one) but I can't find more informations about google-container-manifest options.
For example I can't add a port range. I tried that without success :
ports:
- containerPort: 80
hostPort: 80
- containerPort: 443
hostPort: 443
- containerPort: "10000-20000"
hostPort: "10000-20000"
Where can we find all parameters we can use for google container manifest ? And is it possible to add a port range mapping ?
Thx
[Edit with @alex solution]
apiVersion: v1
kind: Pod
metadata:
name: test
spec:
hostNetwork: true
containers:
- name: test1
image: eu.gcr.io/app-1234/image
imagePullPolicy: Always
And now all port on docker container are expose on google VM.
Do not forget to configure a network to expose all port you need like that :
gcloud compute networks create test-network
gcloud compute firewall-rules create test-allow-http --allow tcp:80 --network test-network
gcloud compute firewall-rules create test-allow-ssh --allow tcp:22 --network test-network
gcloud compute firewall-rules create test-allow-https --allow tcp:443 --network test-network
gcloud compute firewall-rules create test-allow-video --allow udp:10000-20000,icmp --network test-network
And run instance like that :
gcloud compute instances create test-example \
--image container-vm \
--metadata-from-file google-container-manifest=containers.yaml \
--zone europe-west1-b \
--machine-type n1-standard-2 \
--network test-network