digital-ocean

kubernetes UnexpectedAdmissionError after rollout

风格不统一 提交于 2021-01-27 23:31:22
问题 I had a service failing to reply to some HTTP requests, digging it's logs it seemed to be some sort of DNS failure on reaching a proxy service 'proxy' failed to resolve 'proxy.default.svc.cluster.local' after 2 queries So I could not find anything wrong and tried kubectl rollout restart deployment/backend . Just after that these appeared in the pods list: backend-54769cbb4-xkwf2 0/1 UnexpectedAdmissionError 0 4h6m backend-54769cbb4-xlpgf 0/1 UnexpectedAdmissionError 0 4h4m backend-54769cbb4

Puppeteer doesn't work at VPS (DigitalOcean)

大城市里の小女人 提交于 2021-01-27 22:53:53
问题 I'm in a droplet at DigitalOcean and i'm getting this error. (node:5549) UnhandledPromiseRejectionWarning: TimeoutError: Navigation Timeout Exceeded: 300000ms exceeded at Promise.then (/var/www/screenshot/node_modules/puppeteer/lib/NavigatorWatcher.js:94: at <anonymous> The url that I'm trying to screenshot is https://www.pontofrio.com.br/ I added an user agent to bypass the protection against headless request. It worked in my local machine but when I run at my VPS it get the error, even if I

Persist environment variable for a Rails app on Digital Ocean

左心房为你撑大大i 提交于 2021-01-27 12:37:55
问题 How can I persist environment variables for my Rails app hosted on Digital Ocean? Locally I run a bash script with commands like, export SERVICE_USERNAME='somekey' . But when I try to manually run export SERVICE_USERNAME='somekey' , while ssh-ing onto the Ubuntu server, they only last for the session... which is not helpful for my app. How can I persist environment variables on Digital Ocean? Is there a simple way? 回答1: You can either set your environment variables to the user (in the ~/

Persist environment variable for a Rails app on Digital Ocean

我只是一个虾纸丫 提交于 2021-01-27 12:34:47
问题 How can I persist environment variables for my Rails app hosted on Digital Ocean? Locally I run a bash script with commands like, export SERVICE_USERNAME='somekey' . But when I try to manually run export SERVICE_USERNAME='somekey' , while ssh-ing onto the Ubuntu server, they only last for the session... which is not helpful for my app. How can I persist environment variables on Digital Ocean? Is there a simple way? 回答1: You can either set your environment variables to the user (in the ~/

502 Bad Gateway with DigitalOcean (gunicorn/nginx) using Selenium and Django

纵然是瞬间 提交于 2021-01-20 09:07:30
问题 I have a web-app with DigitalOcean (gunicorn/nginx) using Selenium and Django. I'm trying to scrap data from 3 websites and save this data in a database, but I get this error if the process take more than 60 seconds 502 Bad Gateway nginx/1.14.0 (Ubuntu) How can I extend or disable response waiting time for nginx ? 回答1: This error message... 502 Bad Gateway nginx/1.14.0 (Ubuntu) ...using DigitalOcean (gunicorn/nginx) can occur for a number of reasons. Determining the exact cause of 502 error

Getting SignatureDoesNotMatch: null error while uploading images to DigitalOcean Spaces using multers3 node.js

给你一囗甜甜゛ 提交于 2021-01-05 07:24:06
问题 Error: code:'SignatureDoesNotMatch' extendedRequestId:undefined message:null name:'SignatureDoesNotMatch' region:null // Load dependencies const aws = require('aws-sdk'); const express = require('express'); const multer = require('multer'); const multerS3 = require('multer-s3'); const app = express(); // Set S3 endpoint to DigitalOcean Spaces const spacesEndpoint = new aws.Endpoint('fra1.digitaloceanspaces.com'); const s3 = new aws.S3({ endpoint: spacesEndpoint, accessKeyId: '*************',

Unable to login to Postgres inside Kubernetes cluster from the outside

╄→гoц情女王★ 提交于 2021-01-01 06:40:20
问题 I want to simply login to a postgres db from outside my K8 cluster. I'm created the following config: apiVersion: apps/v1 kind: Deployment metadata: name: postgres spec: replicas: 1 selector: matchLabels: app: postgres template: metadata: labels: app: postgres spec: volumes: - name: postgres-storage persistentVolumeClaim: claimName: database-persistent-volume-claim containers: - name: postgres image: postgres volumeMounts: - name: postgres-storage mountPath: /var/lib/postgresql/data subPath:

Go Gin Gonic Unit Testing Deployment Issue

倖福魔咒の 提交于 2020-12-15 05:29:45
问题 I have a Go API built using the Gin framework. Reading the docs in the testing section here, i tried to implement something similar: main.go package main import ( "mes/routes" "github.com/gin-gonic/gin" ) func setupMainRoutes(engine *gin.Engine) { engine.GET("/mesg/:language/services", routes.AllServices) engine.GET("/mesg/:language/service/:id", routes.OneService) engine.GET("/mesg/:language/services/search", routes.SearchService) } func setupErrorRoutes(engine *gin.Engine) { engine.NoRoute

Go Gin Gonic Unit Testing Deployment Issue

*爱你&永不变心* 提交于 2020-12-15 05:29:09
问题 I have a Go API built using the Gin framework. Reading the docs in the testing section here, i tried to implement something similar: main.go package main import ( "mes/routes" "github.com/gin-gonic/gin" ) func setupMainRoutes(engine *gin.Engine) { engine.GET("/mesg/:language/services", routes.AllServices) engine.GET("/mesg/:language/service/:id", routes.OneService) engine.GET("/mesg/:language/services/search", routes.SearchService) } func setupErrorRoutes(engine *gin.Engine) { engine.NoRoute

How do managed Kubernetes providers hide the master nodes?

坚强是说给别人听的谎言 提交于 2020-12-08 07:24:51
问题 If I run kubectl get nodes on GKE, EKS, or DigitalOcean Kubernetes, I only see the worker nodes. How are these systems architected at the network or application level to create this separation between workers and masters? 回答1: You can run the Kubernetes control plane outside Kubernetes as long as the worker nodes have network access to the control plane. This approach is used on most managed Kubernetes solutions. 回答2: A Container Engine cluster is a group of Compute Engine instances running