You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# files are present in demo4 folder and we going to use namespace as demo4
$ cd kubectl create -f demo4/ -n demo4
service/cassandra created
storageclass.storage.k8s.io/fast-sc created
statefulset.apps/cassandra created
# create a secret with 2 key value pairs
$ kubectl create secret generic test-secret --from-literal=username='user1' --from-literal=password='password'
secret/test-secret created
# this secret can be accessed as environment variable or volume mount. In this sts.yaml we are using it as env var.
Check how rollout works
# Upgarde Cassndra v12 to v13
$ kubectl patch statefulset cassandra -n demo4 --type='json' -p='[{"op": "replace", "path": "/spec/template/spec/containers/0/image", "value":"gcr.io/google-samples/cassandra:v13"}]'
statefulset.apps/cassandra patched
# Post this - check the pods using 'watch -n1 "kubectl get pods -n demo4 | grep cassandra"'# It shall provide the way rollout is happening pod per pod and thus ensuring availability of service always