Lower cpu requirements in examples (from 1 to 0.5)
This commit is contained in:
parent
43889c612c
commit
49af3209f8
@ -28,7 +28,7 @@ spec:
|
||||
- /run.sh
|
||||
resources:
|
||||
limits:
|
||||
cpu: "1"
|
||||
cpu: "0.5"
|
||||
image: gcr.io/google_containers/cassandra:v3
|
||||
name: cassandra
|
||||
ports:
|
||||
@ -53,7 +53,7 @@ spec:
|
||||
|
||||
There are a few things to note in this description. First is that we are running the ```kubernetes/cassandra``` image. This is a standard Cassandra installation on top of Debian. However it also adds a custom [```SeedProvider```](https://svn.apache.org/repos/asf/cassandra/trunk/src/java/org/apache/cassandra/locator/SeedProvider.java) to Cassandra. In Cassandra, a ```SeedProvider``` bootstraps the gossip protocol that Cassandra uses to find other nodes. The ```KubernetesSeedProvider``` discovers the Kubernetes API Server using the built in Kubernetes discovery service, and then uses the Kubernetes API to find new nodes (more on this later)
|
||||
|
||||
You may also note that we are setting some Cassandra parameters (```MAX_HEAP_SIZE``` and ```HEAP_NEWSIZE```). We also tell Kubernetes that the container exposes both the ```CQL``` and ```Thrift``` API ports. Finally, we tell the cluster manager that we need 1 cpu (1 core).
|
||||
You may also note that we are setting some Cassandra parameters (```MAX_HEAP_SIZE``` and ```HEAP_NEWSIZE```). We also tell Kubernetes that the container exposes both the ```CQL``` and ```Thrift``` API ports. Finally, we tell the cluster manager that we need 0.5 cpu (0.5 core).
|
||||
|
||||
Given this configuration, we can create the pod from a file specification as follows
|
||||
|
||||
@ -154,7 +154,7 @@ spec:
|
||||
- /run.sh
|
||||
resources:
|
||||
limits:
|
||||
cpu: 1
|
||||
cpu: 0.5
|
||||
env:
|
||||
- name: MAX_HEAP_SIZE
|
||||
key: MAX_HEAP_SIZE
|
||||
|
@ -18,7 +18,7 @@ spec:
|
||||
- /run.sh
|
||||
resources:
|
||||
limits:
|
||||
cpu: 1
|
||||
cpu: 0.5
|
||||
env:
|
||||
- name: MAX_HEAP_SIZE
|
||||
value: 512M
|
||||
|
@ -10,7 +10,7 @@ spec:
|
||||
- /run.sh
|
||||
resources:
|
||||
limits:
|
||||
cpu: "1"
|
||||
cpu: "0.5"
|
||||
image: gcr.io/google_containers/cassandra:v4
|
||||
name: cassandra
|
||||
ports:
|
||||
|
@ -77,7 +77,7 @@ spec:
|
||||
containers:
|
||||
- resources:
|
||||
limits:
|
||||
cpu: 1
|
||||
cpu: 0.5
|
||||
image: quay.io/pires/hazelcast-kubernetes:0.3.1
|
||||
name: hazelcast
|
||||
env:
|
||||
|
@ -16,7 +16,7 @@ spec:
|
||||
containers:
|
||||
- resources:
|
||||
limits:
|
||||
cpu: 1
|
||||
cpu: 0.5
|
||||
image: quay.io/pires/hazelcast-kubernetes:0.3.1
|
||||
name: hazelcast
|
||||
env:
|
||||
|
@ -72,7 +72,7 @@ spec:
|
||||
containers:
|
||||
- resources:
|
||||
limits :
|
||||
cpu: 1
|
||||
cpu: 0.5
|
||||
image: mysql
|
||||
name: mysql
|
||||
env:
|
||||
|
@ -18,7 +18,7 @@ spec:
|
||||
- containerPort: 6379
|
||||
resources:
|
||||
limits:
|
||||
cpu: "1"
|
||||
cpu: "0.5"
|
||||
volumeMounts:
|
||||
- mountPath: /redis-master-data
|
||||
name: data
|
||||
|
@ -17,7 +17,7 @@ spec:
|
||||
- containerPort: 6379
|
||||
resources:
|
||||
limits:
|
||||
cpu: "1"
|
||||
cpu: "0.5"
|
||||
volumeMounts:
|
||||
- mountPath: /redis-master-data
|
||||
name: data
|
||||
|
Loading…
Reference in New Issue
Block a user