I am using the click-to-deploy repository for Wordpress installation.
the is a commend in the instruction Update TLS certificate for WordPress
If you want to update the certificate that the application uses, copy the new certificate and key pair in to the /tmp/tls.crt, and /tmp/tls.key files, and execute the following command:
kubectl --namespace $NAMESPACE create secret tls $APP_INSTANCE_NAME-tls \
--cert=/tmp/tls.crt --key=/tmp/tls.key --dry-run -o yaml | kubectl apply -f -I saw so many video references and articles. they Use One VM and for that, they can start there shell very easily.
I am using Kubernaties it has three VM and if I run this command it will destroy the container infrastructure.
Which cloud shell I run to write this commend so I can implement my SSL.
From the output I can tell that Your environmental value $NAMESPACE is empty.
So the command:
kubectl --namespace $NAMESPACE create secret tls ...is the same as
kubectl --namespace create secret tls ...this is why Your output said unknown command "secret" for "kubectl" the flag --namespace used up word create as its value because $NAMESPACE was empty.
To fix this make sure the environmental values are set up correctly.
You can check their values by using:
echo $APP_INSTANCE_NAME
echo $NAMESPACEIf they are indeed empty or different than expected use like mentioned in the guide:
export APP_INSTANCE_NAME=wordpress-1
export NAMESPACE=defaultHope it helps.